2019_07_08_123809_create_love_roses_table.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateLoveRosesTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('love_roses', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->string('name',100)->comment('名称');
  17. $table->decimal('money', 11, 2)->comment('价格');
  18. $table->decimal('ios_money', 11, 2)->default(0.00)->comment('ios价格');
  19. $table->unsignedInteger('give_rose')->default(0)->comment('赠送玫瑰数');
  20. $table->unsignedInteger('rose')->default(0)->comment('多少玫瑰');
  21. $table->unsignedInteger('give_vip_day')->default(0)->comment('赠送多少天vip');
  22. $table->timestamps();
  23. $table->comment = '玫瑰套餐表';
  24. });
  25. }
  26. /**
  27. * Reverse the migrations.
  28. *
  29. * @return void
  30. */
  31. public function down()
  32. {
  33. Schema::dropIfExists('love_roses');
  34. }
  35. }