id(); $table->date('date'); $table->integer('price'); $table->date('delivery_date'); $table->text('notes')->nullable(); $table->foreignId('contact_id') ->onUpdate('cascade') ->onDelete('cascade') ->constrained('contacts'); $table->foreignId('car_id') ->onUpdate('cascade') ->onDelete('cascade') ->constrained('cars'); $table->enum('insurance_type', InsuranceType::getValues()) ->default(InsuranceType::None); $table->enum('type', ContractType::getValues()) ->default(ContractType::SellContract); $table->timestamps(); $table->softDeletes(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('contracts'); } }