1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?php
- namespace Database\Seeders\Frontend;
- use Database\Seeders\BaseSeeder;
- use Illuminate\Support\Facades\DB;
- use Illuminate\Support\Str;
- /**
- * 广告列表
- *
- * Class BusinessSeeder
- * @package Database\Seeders
- */
- class WebPositionListSeeder extends BaseSeeder
- {
- public function getColumnData()
- {
- return [
- 'group_id' => ['type' => 'uBigint', 'title' => '分组id', 'is_null' => 0],
- 'tag' => ['type' => 'string_20', 'title' => '英文标识,方便查询'],
- 'title' => ['type' => 'string', 'title' => '标题', 'is_null' => 0],
- 'logo' => ['type' => 'string', 'title' => '封面图'],
- 'url' => ['type' => 'string', 'title' => '网址'],
- 'introduction' => ['type' => 'string', 'title' => '简介'],
- 'content' => ['type' => 'text', 'title' => '内容'],
- 'status' => ['type' => 'tinyint', 'title' => '状态', 'remark' => '1使用 2禁用',],
- ];
- }
- public function init()
- {
- // DB::table($this->schema)->insert([
- // 'mid' => Str::random(12),
- // 'group_id' => 1,
- // 'title' => '广告标题',
- // 'logo' => '',
- // 'url' => 'https://www.ttyuweb.com',
- // 'introduction' => '文字简介',
- // 'content' => '内容',
- // 'status' => 2,
- // 'created_at' => time(),
- // 'updated_at' => time()
- // ]);
- }
- /**
- * Run the database seeds.
- *
- * @return void
- */
- public function run()
- {
- $this->schema = 'web_position_list';
- $this->title = '广告列表';
- $this->start();
- }
- }
|