68 lines
2.7 KiB
PHP
68 lines
2.7 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
return new class extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('accidents', function (Blueprint $table) {
|
|
$table->increments('id');
|
|
$table->string('police_serial', 50)->nullable();
|
|
$table->text('police_file')->nullable();
|
|
$table->dateTime('police_file_date')->nullable();
|
|
$table->string('province_id', 100)->nullable();
|
|
$table->string('province_fa', 100)->nullable();
|
|
$table->decimal('lat', 12, 10)->nullable();
|
|
$table->decimal('lng', 12, 10)->nullable();
|
|
$table->boolean('accident_type')->nullable();
|
|
$table->string('accident_type_fa', 50)->nullable();
|
|
$table->time('accident_time')->nullable();
|
|
$table->dateTime('accident_date')->nullable();
|
|
$table->string('axis_name', 200)->nullable();
|
|
$table->integer('city_id')->nullable();
|
|
$table->string('city_fa')->nullable();
|
|
$table->string('driver_name', 200)->nullable();
|
|
$table->string('driver_phone_number', 20)->nullable();
|
|
$table->string('driver_national_code', 10)->nullable();
|
|
$table->string('plaque', 200)->nullable();
|
|
$table->text('damage_picture1')->nullable();
|
|
$table->text('damage_picture2')->nullable();
|
|
$table->boolean('report_base')->nullable();
|
|
$table->bigInteger('way_id')->nullable();
|
|
$table->unsignedBigInteger('sum')->nullable();
|
|
$table->bigInteger('ojrate_nasb')->nullable();
|
|
$table->text('deposit_insurance_image')->nullable();
|
|
$table->unsignedBigInteger('deposit_insurance_amount')->nullable()->default(0);
|
|
$table->text('deposit_daghi_image')->nullable();
|
|
$table->bigInteger('deposit_daghi_amount')->nullable()->default(0);
|
|
$table->timestamp('deposit_date')->nullable();
|
|
$table->boolean('status')->nullable()->default(false);
|
|
$table->string('status_fa', 100)->nullable();
|
|
$table->string('status_history', 100)->nullable()->default('0');
|
|
$table->timestamps();
|
|
$table->string('bill_code', 100)->nullable();
|
|
$table->string('final_amount', 100)->nullable();
|
|
$table->bigInteger('user_id')->nullable();
|
|
$table->text('support_description')->nullable();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('accidents');
|
|
}
|
|
};
|