UserAccessTokenSeeder.php 1005 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace Database\Seeders\Frontend;
  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 UserAccessTokenSeeder extends BaseSeeder
  10. {
  11. public function getColumnData()
  12. {
  13. return [
  14. 'user_id' => ['type' => 'uBigint', 'title' => '用户id', 'is_null' => 0],
  15. 'name' => ['type' => 'string', 'title' => 'token名称'],
  16. 'token' => ['type' => 'string_64', 'title' => 'token'],
  17. 'last_used_at' => ['type' => 'uBigint', 'title' => '最后一个使用时间', 'is_null' => 1],
  18. ];
  19. }
  20. /**
  21. * 初始化内容
  22. */
  23. public function init()
  24. {
  25. }
  26. /**
  27. * Run the database seeds.
  28. *
  29. * @return void
  30. */
  31. public function run()
  32. {
  33. $this->schema = 'user_access_token';
  34. $this->title = '用户登录token表';
  35. $this->start();
  36. }
  37. }