id(); $table->string('title')->comment('标题')->default(''); $table->string('comment')->comment('内容')->default(''); $table->dateTime('deadline')->comment('流拍时间')->nullable(); $table->decimal('price')->comment('起拍价格')->default(0); $table->integer('stock')->comment('库存')->default(0); $table->string('publisher_type')->comment('发布人身份 类型 关联模型')->default(''); $table->bigInteger('publisher_id')->index()->comment('发布人身份id 根据类型查不同的表')->default(1); $table->tinyInteger('state')->comment('状态 1 待竞标 2 已竞标 3 流拍')->default(1); $table->string('bidding_user_type')->comment('竞拍人 关联模型')->default(1); $table->bigInteger('bidding_user_id')->index()->comment('竞拍成功人用户id 关联竞标表')->default(0); $table->bigInteger('bidding_id')->index()->comment('竞拍成功id 关联竞标表')->default(0); $table->string('images')->index()->comment('图片')->default(''); $table->dateTime('created_at')->nullable(); $table->dateTime('updated_at')->nullable(); $table->dateTime('deleted_at')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('demand'); } }