WebPositionListSeeder.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. namespace Database\Seeders\Frontend;
  3. use Database\Seeders\BaseSeeder;
  4. use Illuminate\Support\Facades\DB;
  5. use Illuminate\Support\Str;
  6. /**
  7. * 广告列表
  8. *
  9. * Class BusinessSeeder
  10. * @package Database\Seeders
  11. */
  12. class WebPositionListSeeder extends BaseSeeder
  13. {
  14. public function getColumnData()
  15. {
  16. return [
  17. 'group_id' => ['type' => 'uBigint', 'title' => '分组id', 'is_null' => 0],
  18. 'tag' => ['type' => 'string_20', 'title' => '英文标识,方便查询'],
  19. 'title' => ['type' => 'string', 'title' => '标题', 'is_null' => 0],
  20. 'logo' => ['type' => 'string', 'title' => '封面图'],
  21. 'url' => ['type' => 'string', 'title' => '网址'],
  22. 'introduction' => ['type' => 'string', 'title' => '简介'],
  23. 'content' => ['type' => 'text', 'title' => '内容'],
  24. 'status' => ['type' => 'tinyint', 'title' => '状态', 'remark' => '1使用 2禁用',],
  25. ];
  26. }
  27. public function init()
  28. {
  29. // DB::table($this->schema)->insert([
  30. // 'mid' => Str::random(12),
  31. // 'group_id' => 1,
  32. // 'title' => '广告标题',
  33. // 'logo' => '',
  34. // 'url' => 'https://www.ttyuweb.com',
  35. // 'introduction' => '文字简介',
  36. // 'content' => '内容',
  37. // 'status' => 2,
  38. // 'created_at' => time(),
  39. // 'updated_at' => time()
  40. // ]);
  41. }
  42. /**
  43. * Run the database seeds.
  44. *
  45. * @return void
  46. */
  47. public function run()
  48. {
  49. $this->schema = 'web_position_list';
  50. $this->title = '广告列表';
  51. $this->start();
  52. }
  53. }