UserWechatAppSeeder.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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 UserWechatAppSeeder 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. 'unionid' => ['type' => 'string_60', 'title' => '微信unionid'],
  17. 'nick' => ['type' => 'string_60', 'title' => '昵称'],
  18. 'wx_avatar' => ['type' => 'string', 'title' => '头像', 'is_null' => 1],
  19. 'wx_info' => ['type' => 'json', 'title' => '手机号', 'is_null' => 1],
  20. ];
  21. }
  22. /**
  23. * 初始化内容
  24. */
  25. public function init()
  26. {
  27. }
  28. /**
  29. * Run the database seeds.
  30. *
  31. * @return void
  32. */
  33. public function run()
  34. {
  35. $this->schema = 'user_wechat_app';
  36. $this->title = '用户表手机app登录';
  37. $this->start();
  38. }
  39. }