AgentAccessTokenSeeder.php 917 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. namespace Database\Seeders\Agent;
  3. use Database\Seeders\BaseSeeder;
  4. use Illuminate\Support\Facades\DB;
  5. use Illuminate\Support\Facades\Hash;
  6. use Illuminate\Support\Str;
  7. use Txj\Elastic\Facades\Eav;
  8. use Txj\Elastic\Facades\ES;
  9. class AgentAccessTokenSeeder extends BaseSeeder
  10. {
  11. public function getColumnData()
  12. {
  13. return [
  14. 'name' => ['type' => 'string', 'title' => 'token名称'],
  15. 'token' => ['type' => 'string_64', 'title' => 'token'],
  16. 'last_used_at' => ['type' => 'uBigint', 'title' => '最后一个使用时间', 'is_null' => 1],
  17. ];
  18. }
  19. /**
  20. * 初始化内容
  21. */
  22. public function init()
  23. {
  24. }
  25. /**
  26. * Run the database seeds.
  27. *
  28. * @return void
  29. */
  30. public function run()
  31. {
  32. $this->schema = 'agent_access_token';
  33. $this->title = '用户登录token表';
  34. $this->start();
  35. }
  36. }