PrizeSeeder.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <?php
  2. namespace Database\Seeders;
  3. use Illuminate\Database\Console\Seeds\WithoutModelEvents;
  4. use Illuminate\Database\Seeder;
  5. use \App\Models\Prize;
  6. class PrizeSeeder extends Seeder
  7. {
  8. /**
  9. * Run the database seeds.
  10. *
  11. * @return void
  12. */
  13. public function run()
  14. {
  15. Prize::truncate();
  16. Prize::insert([
  17. [
  18. 'activity_id' => '1',
  19. 'name' => '普獎現金 1,200 元',
  20. 'provider' => '亞新',
  21. 'count' => 0,
  22. 'created_at' => now(),
  23. 'updated_at' => now(),
  24. ],
  25. [
  26. 'activity_id' => '1',
  27. 'name' => '現金 16,800 元',
  28. 'provider' => '亞新',
  29. 'count' => 2,
  30. 'created_at' => now(),
  31. 'updated_at' => now(),
  32. ],
  33. [
  34. 'activity_id' => '1',
  35. 'name' => '現金 12,000 元',
  36. 'provider' => '亞新',
  37. 'count' => 1,
  38. 'created_at' => now(),
  39. 'updated_at' => now(),
  40. ],
  41. [
  42. 'activity_id' => '1',
  43. 'name' => '現金 10,000 元',
  44. 'provider' => '亞新',
  45. 'count' => 1,
  46. 'created_at' => now(),
  47. 'updated_at' => now(),
  48. ],
  49. [
  50. 'activity_id' => '1',
  51. 'name' => '大潤發禮券 10,000 元',
  52. 'provider' => '亞新',
  53. 'count' => 4,
  54. 'created_at' => now(),
  55. 'updated_at' => now(),
  56. ],
  57. [
  58. 'activity_id' => '1',
  59. 'name' => '現金 8,800 元',
  60. 'provider' => '亞新',
  61. 'count' => 5,
  62. 'created_at' => now(),
  63. 'updated_at' => now(),
  64. ],
  65. [
  66. 'activity_id' => '1',
  67. 'name' => '大潤發禮券 8,000 元',
  68. 'provider' => '亞新',
  69. 'count' => 6,
  70. 'created_at' => now(),
  71. 'updated_at' => now(),
  72. ],
  73. [
  74. 'activity_id' => '1',
  75. 'name' => '現金 6,600 元',
  76. 'provider' => '亞新',
  77. 'count' => 13,
  78. 'created_at' => now(),
  79. 'updated_at' => now(),
  80. ],
  81. [
  82. 'activity_id' => '1',
  83. 'name' => '大潤發禮券 6,000 元',
  84. 'provider' => '亞新',
  85. 'count' => 10,
  86. 'created_at' => now(),
  87. 'updated_at' => now(),
  88. ],
  89. [
  90. 'activity_id' => '1',
  91. 'name' => '大潤發禮券 3,000 元',
  92. 'provider' => '亞新',
  93. 'count' => 80,
  94. 'created_at' => now(),
  95. 'updated_at' => now(),
  96. ],
  97. [
  98. 'activity_id' => '1',
  99. 'name' => '大潤發禮券 2,000 元',
  100. 'provider' => '亞新',
  101. 'count' => 50,
  102. 'created_at' => now(),
  103. 'updated_at' => now(),
  104. ],
  105. [
  106. 'activity_id' => '1',
  107. 'name' => '福利即享券 2,000 元',
  108. 'provider' => '亞新',
  109. 'count' => 50,
  110. 'created_at' => now(),
  111. 'updated_at' => now(),
  112. ],
  113. ]);
  114. }
  115. }