UserBuyBillSeeder.php 942 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace Database\Seeders\Frontend;
  3. use Database\Seeders\BaseSeeder;
  4. /**
  5. * 用户购买的产品
  6. */
  7. class UserBuyBillSeeder 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. 'validity_type' => ['type' => 'tinyint', 'title' => '有效期类型 1 时间限制 2 永久有效', 'is_null' => 0],
  15. 'validity_end_time' => ['type' => 'uBigint', 'title' => '有效期结束时间', 'default' => 0, 'is_null' => 1],
  16. ];
  17. }
  18. /**
  19. * 初始化内容
  20. */
  21. public function init()
  22. {
  23. }
  24. /**
  25. * Run the database seeds.
  26. *
  27. * @return void
  28. */
  29. public function run()
  30. {
  31. $this->schema = 'user_buy_bill';
  32. $this->title = '用户购买产品表';
  33. $this->start();
  34. }
  35. }