2018_07_17_171612_create_furniture_goods_table.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateFurnitureGoodsTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('furniture_goods', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->string('name',255)->comment('产品名称');
  17. $table->string('img',255)->comment('产品图片');
  18. $table->integer('category_id')->comment('产品分类');
  19. $table->text('detail')->comment('产品详情');
  20. $table->integer('sort')->comment('排序,越大越靠前');
  21. $table->tinyInteger('status')->comment('状态:1:激活;0:未激活');
  22. $table->softDeletes();
  23. $table->timestamps();
  24. });
  25. }
  26. /**
  27. * Reverse the migrations.
  28. *
  29. * @return void
  30. */
  31. public function down()
  32. {
  33. Schema::dropIfExists('furniture_goods');
  34. }
  35. }