1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- namespace Database\Seeders\Frontend;
- use Database\Seeders\BaseSeeder;
- /**
- * 用户购买的产品
- */
- class UserBuyBillSeeder extends BaseSeeder
- {
- public function getColumnData()
- {
- return [
- 'user_id' => ['type' => 'uBigint', 'title' => '用户id'],
- 'product_id' => ['type' => 'uBigint', 'title' => '产品id'],
- 'validity_type' => ['type' => 'tinyint', 'title' => '有效期类型 1 时间限制 2 永久有效', 'is_null' => 0],
- 'validity_end_time' => ['type' => 'uBigint', 'title' => '有效期结束时间', 'default' => 0, 'is_null' => 1],
- ];
- }
- /**
- * 初始化内容
- */
- public function init()
- {
- }
- /**
- * Run the database seeds.
- *
- * @return void
- */
- public function run()
- {
- $this->schema = 'user_buy_bill';
- $this->title = '用户购买产品表';
- $this->start();
- }
- }
|