123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <?php
- namespace Database\Seeders\Backend;
- use Database\Seeders\BaseSeeder;
- use Illuminate\Support\Facades\Hash;
- use Txj\Elastic\Facades\Eav;
- use Txj\Elastic\Facades\ES;
- /**
- * 商品管理
- */
- class ProductSeeder extends BaseSeeder
- {
- public function getColumnData()
- {
- return [
- 'category_id' => ['type' => 'uBigint', 'title' => '产品分类'],
- 'title' => ['type' => 'string', 'title' => '商品标题'],
- 'domain_prefix' => ['type' => 'string', 'title' => '域名前缀'],
- 'logo' => ['type' => 'string', 'title' => '商品logo'],
- 'summary' => ['type' => 'text', 'title' => '简介'],
- 'desc' => ['type' => 'text', 'title' => '描述'],
- 'price1' => ['type' => 'decimal', 'length' => 8, 'decimal' => 2, 'title' => '月价格', 'is_null' => 0],
- 'price2' => ['type' => 'decimal', 'length' => 8, 'decimal' => 2, 'title' => '半年价格', 'is_null' => 0],
- 'price3' => ['type' => 'decimal', 'length' => 8, 'decimal' => 2, 'title' => '一年价格', 'is_null' => 0],
- 'price4' => ['type' => 'decimal', 'length' => 8, 'decimal' => 2, 'title' => '永久使用价格', 'is_null' => 0],
- 'price5' => ['type' => 'decimal', 'length' => 8, 'decimal' => 2, 'title' => '7天会员', 'is_null' => 0],
- 'market_price1' => ['type' => 'decimal', 'length' => 8, 'decimal' => 2, 'title' => '月价格', 'is_null' => 1],
- 'market_price2' => ['type' => 'decimal', 'length' => 8, 'decimal' => 2, 'title' => '半年价格', 'is_null' => 1],
- 'market_price3' => ['type' => 'decimal', 'length' => 8, 'decimal' => 2, 'title' => '一年价格', 'is_null' => 1],
- 'market_price4' => ['type' => 'decimal', 'length' => 8, 'decimal' => 2, 'title' => '永久使用价格', 'is_null' => 1],
- 'desc_price1' => ['type' => 'string', 'title' => '月价格', 'is_null' => 1],
- 'desc_price2' => ['type' => 'string', 'title' => '半年价格', 'is_null' => 1],
- 'desc_price3' => ['type' => 'string', 'title' => '一年价格', 'is_null' => 1],
- 'desc_price4' => ['type' => 'string', 'title' => '永久使用价格', 'is_null' => 1],
- 'desc_price5' => ['type' => 'string', 'title' => '七天会员标语', 'is_null' => 1],
- 'status' => ['type' => 'tinyint', 'title' => '状态', 'remark' => '1 上架 2 下架'],
- ];
- }
- /**
- * 初始化内容
- */
- public function init()
- {
- }
- /**
- * Run the database seeds.
- *
- * @return void
- */
- public function run()
- {
- $this->schema = 'product';
- $this->title = '产品表';
- $this->start();
- }
- }
|