UserWechatMiniProgramSeeder.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 UserWechatMiniProgramSeeder extends BaseSeeder
  10. {
  11. public function getColumnData()
  12. {
  13. return [
  14. 'user_id' => ['type' => 'uBigInt', 'title' => '用户id'],
  15. 'openid' => ['type' => 'string_60', 'title' => '微信openid'],
  16. 'session_key' => ['type' => 'string_60', 'title' => '微信session_key'],
  17. 'unionid' => ['type' => 'string_60', 'title' => '微信unionid'],
  18. 'nick' => ['type' => 'string_60', 'title' => '昵称'],
  19. 'wx_avatar' => ['type' => 'string', 'title' => '头像', 'is_null' => 1],
  20. 'wx_info' => ['type' => 'json', 'title' => '手机号', 'is_null' => 1],
  21. ];
  22. }
  23. /**
  24. * 初始化内容
  25. */
  26. public function init()
  27. {
  28. }
  29. /**
  30. * Run the database seeds.
  31. *
  32. * @return void
  33. */
  34. public function run()
  35. {
  36. $this->schema = 'user_wechat_mini_program';
  37. $this->title = '用户表微信小程序登录';
  38. $this->start();
  39. }
  40. }