rewrite proses harim
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('harims', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('state_id')->constrained('harim_states');
|
||||
$table->string('state_name');
|
||||
$table->string('first_name');
|
||||
$table->string('last_name');
|
||||
$table->string('phone_number');
|
||||
$table->string('request_number');
|
||||
$table->date('request_date');
|
||||
$table->unsignedTinyInteger('province_id');
|
||||
$table->foreign('province_id')->references('id')->on('provinces');
|
||||
$table->string('province_name');
|
||||
$table->unsignedSmallInteger('city_id');
|
||||
$table->foreign('city_id')->references('id')->on('cities');
|
||||
$table->string('city_name');
|
||||
$table->unsignedBigInteger('edareh_shahri_id');
|
||||
$table->foreign('edareh_shahri_id')->references('id')->on('edarate_shahri');
|
||||
$table->string('county');
|
||||
$table->string('division');
|
||||
$table->string('village');
|
||||
$table->integer('grand_area');
|
||||
$table->integer('plan_area');
|
||||
$table->string('requested_organization');
|
||||
$table->string('plan_group');
|
||||
$table->string('plan_title');
|
||||
$table->string('address');
|
||||
$table->string('file');
|
||||
$table->polygon('polygon');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('harims');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('harim_actions', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('harim_actions');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('harim_histories', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('previous_state_id')->constrained('harim_states');
|
||||
$table->string('previous_state_name');
|
||||
$table->foreignId('current_state_id')->constrained('harim_states');
|
||||
$table->string('current_state_name');
|
||||
$table->foreignId('action_id')->constrained('harim_actions');
|
||||
$table->string('action_name');
|
||||
$table->unsignedInteger('expert_id');
|
||||
$table->foreign('expert_id')->references('id')->on('users');
|
||||
$table->string('expert_description');
|
||||
$table->json('previous_data');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('harim_histories');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('harim_states', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('harim_states');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user