UserWechatOfficialAccountSeeder.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 UserWechatOfficialAccountSeeder extends BaseSeeder
  10. {
  11. public function getColumnData()
  12. {
  13. return [
  14. 'user_id' => ['type' => 'uBigInt', 'title' => '用户id'],
  15. 'openid' => ['type' => 'string_60', 'title' => '微信的FormUsername'],
  16. 'follow_openid' => ['type' => 'string_60', 'title' => '关注微信获取的openid'],
  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' => '微信返回的json信息', 'is_null' => 1],
  21. 'authorizer_appid' => ['type' => 'string', 'title' => '微信授权方appid', 'is_null' => 1],
  22. 'authorizer_refresh_token' => ['type' => 'string', 'title' => '微信接口调用凭据刷新令牌', 'is_null' => 1],
  23. 'authorization_info' => ['type' => 'string', 'title' => '授权信息', 'is_null' => 1],
  24. ];
  25. }
  26. /**
  27. * 初始化内容
  28. */
  29. public function init()
  30. {
  31. }
  32. /**
  33. * Run the database seeds.
  34. *
  35. * @return void
  36. */
  37. public function run()
  38. {
  39. $this->schema = 'user_wechat_official_account';
  40. $this->title = '用户表微信公众号登录';
  41. $this->start();
  42. }
  43. }