ProductComboSeeder.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 ProductComboSeeder extends BaseSeeder
  11. {
  12. public function getColumnData()
  13. {
  14. return [
  15. 'title' => ['type' => 'string', 'title' => '商品标题'],
  16. 'logo' => ['type' => 'string', 'title' => '商品logo'],
  17. 'summary' => ['type' => 'text', 'title' => '简介'],
  18. 'desc' => ['type' => 'text', 'title' => '描述'],
  19. 'price1' => ['type' => 'decimal', 'length' => 8, 'decimal' => 2, 'title' => '月价格', 'is_null' => 0],
  20. 'price2' => ['type' => 'decimal', 'length' => 8, 'decimal' => 2, 'title' => '半年价格', 'is_null' => 0],
  21. 'price3' => ['type' => 'decimal', 'length' => 8, 'decimal' => 2, 'title' => '一年价格', 'is_null' => 0],
  22. 'price4' => ['type' => 'decimal', 'length' => 8, 'decimal' => 2, 'title' => '永久使用价格', 'is_null' => 0],
  23. 'product_ids' => ['type' => 'json', 'title' => '产品id,数组', 'is_null' => 0],
  24. 'expiry_ent_time' => ['type' => 'uBigint', 'title' => '有效期(天)', 'is_null' => 0],
  25. 'status' => ['type' => 'tinyint', 'title' => '状态', 'remark' => '1 上架 2 下架'],
  26. ];
  27. }
  28. /**
  29. * 初始化内容
  30. */
  31. public function init()
  32. {
  33. }
  34. /**
  35. * Run the database seeds.
  36. *
  37. * @return void
  38. */
  39. public function run()
  40. {
  41. $this->schema = 'product_combo';
  42. $this->title = '产品套餐表';
  43. $this->start();
  44. }
  45. }