| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- /**
- * Class CreateUsedGoodsTable.
- */
- class CreateUsedGoodsTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('used_goods', function(Blueprint $table) {
- $table->increments('id');
- $table->integer('m_id')->default(0)->index('m_id')->comment('会员ID');
- $table->integer('province_id')->comment('省ID');
- $table->integer('city_id')->comment('市ID');
- $table->integer('area_id')->comment('区ID');
- $table->string('city_name')->comment('城市名称');
- $table->string('used_name')->comment('闲置说明(名称)');
- $table->string('used_img')->comment('封面');
- $table->tinyInteger('status')->index('status')->comment('0:下架,1:上架,2:交易锁定中');
- $table->tinyInteger('deliver_type')->index('deliver_type')->comment('1:包邮,2:到付,3:自取');
- $table->tinyInteger('is_del')->index('is_del')->comment('0:否,1:是');
- $table->double('original_price',12,2)->comment('原价');
- $table->double('price',12,2)->comment('售价');
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::drop('used_goods');
- }
- }
|