123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- namespace Database\Seeders\Agent;
- use Database\Seeders\BaseSeeder;
- use Illuminate\Support\Facades\DB;
- use Illuminate\Support\Facades\Hash;
- use Illuminate\Support\Str;
- use Txj\Elastic\Facades\Eav;
- use Txj\Elastic\Facades\ES;
- class AgentAccessTokenSeeder extends BaseSeeder
- {
- public function getColumnData()
- {
- return [
- 'name' => ['type' => 'string', 'title' => 'token名称'],
- 'token' => ['type' => 'string_64', 'title' => 'token'],
- 'last_used_at' => ['type' => 'uBigint', 'title' => '最后一个使用时间', 'is_null' => 1],
- ];
- }
- /**
- * 初始化内容
- */
- public function init()
- {
- }
- /**
- * Run the database seeds.
- *
- * @return void
- */
- public function run()
- {
- $this->schema = 'agent_access_token';
- $this->title = '用户登录token表';
- $this->start();
- }
- }
|