| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 | <?phpnamespace 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 AgentMobileSmsSeeder extends BaseSeeder{    public function getColumnData()    {        return [            'user_id' => ['type' => 'uBigInt', 'title' => '用户id'],            'prefix' => ['type' => 'string_60', 'title' => '手机号前缀'],            'mobile' => ['type' => 'string_60', 'title' => '手机号'],            'sms_yzm' => ['type' => 'string_60', 'title' => '短信验证码'],            'retries' => ['type' => 'tinyInt', 'default' => 0, 'title' => '失败重试次数'],        ];    }    /**     * 初始化内容     */    public function init()    {        DB::table($this->schema)->insert([            'mid' => Str::random(12),            'user_id' => 1,            'prefix' => '+86',            'mobile' => '18260175830',            'sms_yzm' => '',            'retries' => 1,            'created_at' => time(),            'updated_at' => time()        ]);    }    /**     * Run the database seeds.     *     * @return void     */    public function run()    {        $this->schema = 'agent_mobile_sms';        $this->title = '代理商手机短信验证码登录表';        $this->start();    }}
 |