ProductVersionSeeder.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. namespace Database\Seeders\Backend;
  3. use Database\Seeders\BaseSeeder;
  4. use Illuminate\Support\Facades\Hash;
  5. use Txj\Elastic\Facades\Eav;
  6. use Txj\Elastic\Facades\ES;
  7. /**
  8. * 商品版本管理
  9. */
  10. class ProductVersionSeeder extends BaseSeeder
  11. {
  12. public function getColumnData()
  13. {
  14. return [
  15. 'product_id' => ['type' => 'uBigint', 'title' => '商品标题,固定到软件里'],
  16. 'os_type' => ['type' => 'string_60', 'title' => '操作系统类型 windows linux android ios'],
  17. 'version' => ['type' => 'string_60', 'title' => '版本号'],
  18. 'download_url' => ['type' => 'string', 'title' => '下载地址'],
  19. 'agent_mid' => ['type' => 'string_20', 'default' => '0', 'title' => '代理商的标志,固定到软件里,同一类产品,可以统计不用标签'],
  20. 'status' => ['type' => 'tinyint', 'title' => '状态', 'default' => 0, 'remark' => '1 启用 0 禁用'],
  21. 'desc' => ['type' => 'mediumtext', 'title' => '版本描述', 'is_null' => 1],
  22. ];
  23. }
  24. /**
  25. * 初始化内容
  26. */
  27. public function init()
  28. {
  29. }
  30. /**
  31. * Run the database seeds.
  32. *
  33. * @return void
  34. */
  35. public function run()
  36. {
  37. $this->schema = 'product_version';
  38. $this->title = '产品软件版本';
  39. $this->start();
  40. }
  41. }