2021_11_03_111713_create_used_goods_table.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. use Illuminate\Database\Schema\Blueprint;
  3. use Illuminate\Database\Migrations\Migration;
  4. /**
  5. * Class CreateUsedGoodsTable.
  6. */
  7. class CreateUsedGoodsTable extends Migration
  8. {
  9. /**
  10. * Run the migrations.
  11. *
  12. * @return void
  13. */
  14. public function up()
  15. {
  16. Schema::create('used_goods', function(Blueprint $table) {
  17. $table->increments('id');
  18. $table->integer('m_id')->default(0)->index('m_id')->comment('会员ID');
  19. $table->integer('province_id')->comment('省ID');
  20. $table->integer('city_id')->comment('市ID');
  21. $table->integer('area_id')->comment('区ID');
  22. $table->string('city_name')->comment('城市名称');
  23. $table->string('used_name')->comment('闲置说明(名称)');
  24. $table->string('used_img')->comment('封面');
  25. $table->tinyInteger('status')->index('status')->comment('0:下架,1:上架,2:交易锁定中');
  26. $table->tinyInteger('deliver_type')->index('deliver_type')->comment('1:包邮,2:到付,3:自取');
  27. $table->tinyInteger('is_del')->index('is_del')->comment('0:否,1:是');
  28. $table->double('original_price',12,2)->comment('原价');
  29. $table->double('price',12,2)->comment('售价');
  30. $table->timestamps();
  31. });
  32. }
  33. /**
  34. * Reverse the migrations.
  35. *
  36. * @return void
  37. */
  38. public function down()
  39. {
  40. Schema::drop('used_goods');
  41. }
  42. }