UserUseLogSeeder.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. namespace Database\Seeders\Frontend;
  3. use Database\Seeders\BaseSeeder;
  4. /**
  5. * 用户日志
  6. */
  7. class UserUseLogSeeder extends BaseSeeder
  8. {
  9. public function getColumnData()
  10. {
  11. return [
  12. 'user_id' => ['type' => 'uBigint', 'title' => '用户id'],
  13. 'product_id' => ['type' => 'uBigint', 'title' => '产品id'],
  14. 'product_version' => ['type' => 'string_20', 'title' => '产品版本'],
  15. 'type' => ['type' => 'uBigint', 'title' => '0 下载 1 安装 2 卸载 3 运行'],
  16. 'statistics_flag' => ['type' => 'string_60', 'title' => '软件标志', 'is_null' => 1],
  17. 'tag' => ['type' => 'string_100', 'title' => '点击的标签,可以统计点击次数', 'is_null' => 1],
  18. 'windows_uuid' => ['type' => 'string_100', 'title' => '系统唯一码', 'is_null' => 0],
  19. 'os_platform' => ['type' => 'string_20', 'title' => '平台系统 windows,linux,android,ios,mac', 'is_null' => 0],
  20. 'os_version' => ['type' => 'string_60', 'title' => '平台系统版本'],
  21. 'ip' => ['type' => 'string_200', 'title' => 'IP地址'],
  22. 'cpu' => ['type' => 'string_20', 'title' => 'cpu信息32位,64位'],
  23. 'from' => ['type' => 'string', 'title' => 'refer来源'],
  24. 'year' => ['type' => 'integer', 'title' => '年'],
  25. 'month' => ['type' => 'integer', 'title' => '月'],
  26. 'day' => ['type' => 'integer', 'title' => '日'],
  27. ];
  28. }
  29. /**
  30. * 初始化内容
  31. */
  32. public function init()
  33. {
  34. }
  35. /**
  36. * Run the database seeds.
  37. *
  38. * @return void
  39. */
  40. public function run()
  41. {
  42. $this->schema = 'user_use_log';
  43. $this->title = '用户日志表';
  44. $this->start();
  45. }
  46. }