Merge branch 'feature/nominatimService' into 'develop'

Feature/nominatim service

See merge request witelgroup/rms_v2!4
This commit is contained in:
Hamidreza Ranjbarpour
2024-03-09 10:56:53 +00:00
182 changed files with 7370 additions and 64 deletions

View File

@@ -13,6 +13,13 @@ DB_DATABASE=rms_db
DB_USERNAME=rms_user
DB_PASSWORD=1qaz@WSX
DB_CONNECTION_2=
DB_HOST_2=
DB_PORT_2=
DB_DATABASE_2=
DB_USERNAME_2=
DB_PASSWORD_2=
BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync

65
.env.testing Normal file
View File

@@ -0,0 +1,65 @@
APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:R0FQ6mq9Ar2n5ToqeseUNN6zh94JGDnECsjF/pLOqaM=
APP_DEBUG=false
APP_URL=https://rms.witel.ir
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=rms_db
DB_USERNAME=root
DB_PASSWORD=password
DB_CONNECTION_2=
DB_HOST_2=
DB_PORT_2=
DB_DATABASE_2=
DB_USERNAME_2=
DB_PASSWORD_2=
BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=null
MAIL_FROM_NAME="${APP_NAME}"
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
PAYMENT_USERNAME="cspay"
PAYMENT_PASSWORD="cspay123"
PAYMENT_LINK="https://payment.rmto.ir"
RMS_VERSION=3.0
RMS_CTO_PHONE_NUMBER="09380220400"
TELESCOPE_RESPONSE_SIZE_LIMIT=128
DEBUGBAR_ENABLED=false

View File

@@ -70,7 +70,7 @@ if (! function_exists('process_datatable')) {
$value = $attributes['value'];
if ($attributes['type'] == 'text') {
$data = $data->where($field, 'LIKE', "%${value}%");
$data = $data->where($field, 'LIKE', "%{$value}%");
} elseif ($attributes['type'] == 'between') {
$date_values = explode('&', $value);
$date_values[0] .= " 00:00:00";
@@ -89,7 +89,7 @@ if (! function_exists('process_datatable')) {
}
});
} elseif ($attributes['type'] == 'select') {
$data = $data->where($field, "${value}");
$data = $data->where($field, "{$value}");
}
// following types have been added for making finance table serverside.

View File

@@ -139,7 +139,7 @@ class SafetyAndPrivacyController extends Controller
if ($request->has('recognize_picture')) {
$recognize_picture = $request->file('recognize_picture')->store('safety_and_privacy/'.$safety_and_privacy->id.'/recognize_picture', 'public');
$safety_and_privacy->recognize_picture = 'https://rms.rmto.ir/storage/'.$recognize_picture;
$safety_and_privacy->recognize_picture = Storage::disk('public')->url($recognize_picture);
// \App\Helpers\Compress::resize("/var/www/rms/public/storage/{$recognize_picture}");
}
@@ -230,7 +230,7 @@ class SafetyAndPrivacyController extends Controller
try {
\DB::transaction(function () use ($request, $safety_and_privacy) {
$action_picture = $request->file('action_picture')->store('safety_and_privacy/'.$safety_and_privacy->id.'/action_picture', 'public');
$safety_and_privacy->action_picture = 'https://rms.rmto.ir/storage/'.$action_picture;
$safety_and_privacy->action_picture = Storage::disk('public')->url($action_picture);
// \App\Helpers\Compress::resize("/var/www/rms/public/storage/{$action_picture}");
$safety_and_privacy->action_picture_document_upload_date = now();
@@ -255,7 +255,7 @@ class SafetyAndPrivacyController extends Controller
$result = [];
foreach ($datas as $data) {
$result[] = 'https://rms.rmto.ir/storage/'.$data;
$result[] = Storage::disk('public')->url($data);
}
return response()->json([

View File

@@ -2,10 +2,12 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class City extends Model
{
use HasFactory;
/**
* The attributes that should be hidden for arrays.
*

View File

@@ -2,10 +2,12 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class EdarateOstani extends Model
{
use HasFactory;
protected $table = 'edarate_ostani';
public function roadObserved()

View File

@@ -2,10 +2,12 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class EdarateShahri extends Model
{
use HasFactory;
protected $table = 'edarate_shahri';
public function cities()

View File

@@ -2,10 +2,14 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class InfoItem extends Model
{
use HasFactory;
public $timestamps = false;
public function roadItemsProjects()
{

View File

@@ -2,9 +2,12 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class LogList extends Model
{
//
use HasFactory;
public $timestamps = false;
}

12
app/Models/Permission.php Normal file
View File

@@ -0,0 +1,12 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Spatie\Permission\Models\Permission as SpatiePermission;
class Permission extends SpatiePermission
{
use HasFactory;
}

View File

@@ -15,7 +15,7 @@ use DB;
class User extends Authenticatable
{
use Notifiable, HasRoles, HasPermissions;
use Notifiable, HasRoles, HasPermissions, HasFactory;
/**

View File

@@ -2,10 +2,12 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class UserActivityLog extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*

View File

@@ -2,10 +2,32 @@
namespace App\Services;
use Illuminate\Support\Facades\App;
class NominatimService
{
public function get_way_id_from_nominatim(): string
public function get_way_id_from_nominatim($lat = null, $lng = null)
{
if (App::isProduction())
{
$url = "https://testmap.141.ir/nominatim/reverse?format=jsonv2&lat=".$lat."&lon=".$lng."&zoom=16&addressdetails=16";
$arrContextOptions=array(
"ssl"=>array(
"verify_peer"=>false,
"verify_peer_name"=>false,
),
);
$result = file_get_contents($url, false, stream_context_create($arrContextOptions));
$result = json_decode($result);
if (isset($result->osm_type)) {
if ($result->osm_type == 'way') {
return $result->osm_id;
}
}
return 0;
}
return 0;
}
}
}

View File

@@ -21,6 +21,13 @@
'Verta' => 'Hekmatinasser\\Verta\\Verta',
),
),
'kitloong/laravel-migrations-generator' =>
array (
'providers' =>
array (
0 => 'KitLoong\\MigrationsGenerator\\MigrationsGeneratorServiceProvider',
),
),
'laravel/sail' =>
array (
'providers' =>

View File

@@ -25,24 +25,25 @@
21 => 'Illuminate\\View\\ViewServiceProvider',
22 => 'Barryvdh\\Debugbar\\ServiceProvider',
23 => 'Hekmatinasser\\Verta\\Laravel\\VertaServiceProvider',
24 => 'Laravel\\Sail\\SailServiceProvider',
25 => 'Laravel\\Sanctum\\SanctumServiceProvider',
26 => 'Laravel\\Telescope\\TelescopeServiceProvider',
27 => 'Laravel\\Tinker\\TinkerServiceProvider',
28 => 'Laravel\\Ui\\UiServiceProvider',
29 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
30 => 'Carbon\\Laravel\\ServiceProvider',
31 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider',
32 => 'Termwind\\Laravel\\TermwindServiceProvider',
33 => 'Spatie\\LaravelIgnition\\IgnitionServiceProvider',
34 => 'Spatie\\Permission\\PermissionServiceProvider',
24 => 'KitLoong\\MigrationsGenerator\\MigrationsGeneratorServiceProvider',
25 => 'Laravel\\Sail\\SailServiceProvider',
26 => 'Laravel\\Sanctum\\SanctumServiceProvider',
27 => 'Laravel\\Telescope\\TelescopeServiceProvider',
28 => 'Laravel\\Tinker\\TinkerServiceProvider',
29 => 'Laravel\\Ui\\UiServiceProvider',
30 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
31 => 'Carbon\\Laravel\\ServiceProvider',
32 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider',
33 => 'Termwind\\Laravel\\TermwindServiceProvider',
34 => 'Spatie\\LaravelIgnition\\IgnitionServiceProvider',
35 => 'Spatie\\Permission\\PermissionServiceProvider',
36 => 'App\\Providers\\AppServiceProvider',
37 => 'App\\Providers\\AuthServiceProvider',
38 => 'App\\Providers\\EventServiceProvider',
39 => 'App\\Providers\\RouteServiceProvider',
40 => 'App\\Providers\\TelescopeServiceProvider',
41 => 'Barryvdh\\Debugbar\\ServiceProvider',
36 => 'Spatie\\Permission\\PermissionServiceProvider',
37 => 'App\\Providers\\AppServiceProvider',
38 => 'App\\Providers\\AuthServiceProvider',
39 => 'App\\Providers\\EventServiceProvider',
40 => 'App\\Providers\\RouteServiceProvider',
41 => 'App\\Providers\\TelescopeServiceProvider',
42 => 'Barryvdh\\Debugbar\\ServiceProvider',
),
'eager' =>
array (
@@ -58,22 +59,23 @@
9 => 'Illuminate\\View\\ViewServiceProvider',
10 => 'Barryvdh\\Debugbar\\ServiceProvider',
11 => 'Hekmatinasser\\Verta\\Laravel\\VertaServiceProvider',
12 => 'Laravel\\Sanctum\\SanctumServiceProvider',
13 => 'Laravel\\Telescope\\TelescopeServiceProvider',
14 => 'Laravel\\Ui\\UiServiceProvider',
15 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
16 => 'Carbon\\Laravel\\ServiceProvider',
17 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider',
18 => 'Termwind\\Laravel\\TermwindServiceProvider',
19 => 'Spatie\\LaravelIgnition\\IgnitionServiceProvider',
20 => 'Spatie\\Permission\\PermissionServiceProvider',
12 => 'KitLoong\\MigrationsGenerator\\MigrationsGeneratorServiceProvider',
13 => 'Laravel\\Sanctum\\SanctumServiceProvider',
14 => 'Laravel\\Telescope\\TelescopeServiceProvider',
15 => 'Laravel\\Ui\\UiServiceProvider',
16 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
17 => 'Carbon\\Laravel\\ServiceProvider',
18 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider',
19 => 'Termwind\\Laravel\\TermwindServiceProvider',
20 => 'Spatie\\LaravelIgnition\\IgnitionServiceProvider',
21 => 'Spatie\\Permission\\PermissionServiceProvider',
22 => 'App\\Providers\\AppServiceProvider',
23 => 'App\\Providers\\AuthServiceProvider',
24 => 'App\\Providers\\EventServiceProvider',
25 => 'App\\Providers\\RouteServiceProvider',
26 => 'App\\Providers\\TelescopeServiceProvider',
27 => 'Barryvdh\\Debugbar\\ServiceProvider',
22 => 'Spatie\\Permission\\PermissionServiceProvider',
23 => 'App\\Providers\\AppServiceProvider',
24 => 'App\\Providers\\AuthServiceProvider',
25 => 'App\\Providers\\EventServiceProvider',
26 => 'App\\Providers\\RouteServiceProvider',
27 => 'App\\Providers\\TelescopeServiceProvider',
28 => 'Barryvdh\\Debugbar\\ServiceProvider',
),
'deferred' =>
array (

View File

@@ -22,6 +22,7 @@
"require-dev": {
"barryvdh/laravel-debugbar": "^3.9",
"fakerphp/faker": "^1.9.1",
"kitloong/laravel-migrations-generator": "^7.0",
"laravel/pint": "^1.0",
"laravel/sail": "^1.18",
"mockery/mockery": "^1.4.4",

75
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "687a4c2a80c569c39332ff856097dafd",
"content-hash": "f354c54643bedde32669099052baa40c",
"packages": [
{
"name": "beberlei/assert",
@@ -7420,6 +7420,79 @@
},
"time": "2020-07-09T08:09:16+00:00"
},
{
"name": "kitloong/laravel-migrations-generator",
"version": "v7.0.0",
"source": {
"type": "git",
"url": "https://github.com/kitloong/laravel-migrations-generator.git",
"reference": "44e070fffdc3a774439e7df4419e92b88e872574"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/kitloong/laravel-migrations-generator/zipball/44e070fffdc3a774439e7df4419e92b88e872574",
"reference": "44e070fffdc3a774439e7df4419e92b88e872574",
"shasum": ""
},
"require": {
"ext-pdo": "*",
"illuminate/support": "^10.43|^11.0",
"php": "^8.1"
},
"require-dev": {
"barryvdh/laravel-ide-helper": "^2.0|^3.0",
"friendsofphp/php-cs-fixer": "^3.1",
"larastan/larastan": "^1.0|^2.0",
"mockery/mockery": "^1.0",
"orchestra/testbench": "^8.0|^9.0",
"phpmd/phpmd": "^2.10",
"slevomat/coding-standard": "^8.0",
"squizlabs/php_codesniffer": "^3.5"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"KitLoong\\MigrationsGenerator\\MigrationsGeneratorServiceProvider"
]
}
},
"autoload": {
"psr-4": {
"KitLoong\\MigrationsGenerator\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Kit Loong",
"email": "kitloong1008@gmail.com"
}
],
"description": "Generates Laravel Migrations from an existing database",
"keywords": [
"artisan",
"generator",
"laravel",
"lumen",
"migration",
"migrations"
],
"support": {
"issues": "https://github.com/kitloong/laravel-migrations-generator/issues",
"source": "https://github.com/kitloong/laravel-migrations-generator/tree/v7.0.0"
},
"funding": [
{
"url": "https://www.buymeacoffee.com/kitloong",
"type": "custom"
}
],
"time": "2024-03-03T15:26:31+00:00"
},
{
"name": "laravel/pint",
"version": "v1.13.10",

View File

@@ -0,0 +1,23 @@
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
*/
class CityFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'name_fa' => $this->faker->name
];
}
}

View File

@@ -0,0 +1,23 @@
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
*/
class EdarateOstaniFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'name_fa' => $this->faker->name
];
}
}

View File

@@ -0,0 +1,23 @@
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
*/
class EdarateShahriFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'name_fa' => $this->faker->name
];
}
}

View File

@@ -0,0 +1,23 @@
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
*/
class InfoItemFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'item' => $this->faker->randomNumber()
];
}
}

View File

@@ -0,0 +1,24 @@
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
*/
class LogListFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'description' => $this->faker->name,
'log_unique_code' => 1134
];
}
}

View File

@@ -0,0 +1,23 @@
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
*/
class PermissionFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'name' => $this->faker->name
];
}
}

View File

@@ -0,0 +1,23 @@
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
*/
class UserActivityLogFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'description' => $this->faker->name
];
}
}

View File

@@ -0,0 +1,25 @@
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
*/
class UserFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'username' => $this->faker->name,
'enabled' => true,
'confirmed' => 1
];
}
}

View File

@@ -0,0 +1,42 @@
<?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('_abrar_plan_project_histories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedSmallInteger('project_id')->nullable()->index('abrar_plan_project_histories_project_id_foreign');
$table->unsignedInteger('user_id')->nullable()->index('abrar_plan_project_histories_user_id_foreign');
$table->string('previous_type')->nullable();
$table->unsignedTinyInteger('previous_status')->nullable();
$table->string('previous_status_progress')->nullable();
$table->text('previous_status_description')->nullable();
$table->string('previous_status_date')->nullable();
$table->string('previous_start_latlng')->nullable();
$table->string('previous_end_latlng')->nullable();
$table->string('previous_length')->nullable();
$table->text('new_files')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('_abrar_plan_project_histories');
}
};

View File

@@ -0,0 +1,45 @@
<?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('_abrar_plan_projects', function (Blueprint $table) {
$table->smallIncrements('id');
$table->unsignedTinyInteger('province_id')->nullable()->index('abrar_plan_projects_province_id_foreign');
$table->string('province_name')->nullable();
$table->unsignedSmallInteger('city_id')->nullable()->index('abrar_plan_projects_city_id_foreign');
$table->string('city_name')->nullable();
$table->text('axis_name')->nullable();
$table->string('axis_length')->nullable();
$table->string('project_type')->nullable();
$table->unsignedTinyInteger('project_status')->nullable();
$table->string('project_status_progress')->nullable();
$table->text('project_status_description')->nullable();
$table->string('project_status_date')->nullable();
$table->string('project_start_latlng')->nullable();
$table->string('project_end_latlng')->nullable();
$table->string('project_length')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('_abrar_plan_projects');
}
};

View File

@@ -0,0 +1,40 @@
<?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('_accident_251_points_histories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedSmallInteger('point_id')->nullable()->index('accident_251_points_histories_point_id_foreign');
$table->unsignedInteger('user_id')->nullable()->index('accident_251_points_histories_user_id_foreign');
$table->string('previous_lat');
$table->string('previous_lng');
$table->string('previous_cost')->nullable();
$table->string('previous_progress')->nullable();
$table->string('previous_end_date')->nullable();
$table->text('previous_actions')->nullable();
$table->text('new_files')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('_accident_251_points_histories');
}
};

View File

@@ -0,0 +1,47 @@
<?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('_accident_251_points', function (Blueprint $table) {
$table->smallIncrements('id');
$table->unsignedTinyInteger('province_id')->nullable()->index('accident_251_points_province_id_foreign');
$table->unsignedSmallInteger('city_id')->nullable()->index('accident_251_points_city_id_foreign');
$table->unsignedSmallInteger('accident_point_id')->nullable()->index('accident_251_points_accident_point_id_foreign');
$table->string('lat');
$table->string('lng');
$table->string('province')->nullable();
$table->string('axis_name')->nullable();
$table->string('axis_start')->nullable();
$table->string('axis_end')->nullable();
$table->string('native_name')->nullable();
$table->text('operation')->nullable();
$table->string('target')->nullable();
$table->string('cost')->nullable();
$table->string('progress')->nullable();
$table->string('end_date')->nullable();
$table->text('actions')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('_accident_251_points');
}
};

View File

@@ -0,0 +1,42 @@
<?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('_b_b_jaheshes', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('province_fa')->nullable();
$table->unsignedTinyInteger('province_id')->nullable()->index('b_b_jaheshes_province_id_foreign');
$table->tinyInteger('project_type')->nullable();
$table->string('project_type_fa')->nullable();
$table->double('plan_id', null, 0)->nullable();
$table->string('plan_fa')->nullable();
$table->double('project_count_all', null, 0)->nullable();
$table->double('project_count_done', null, 0)->nullable();
$table->double('project_progress', null, 0)->nullable();
$table->string('unit')->nullable();
$table->timestamps();
$table->string('last_updated_at_fa')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('_b_b_jaheshes');
}
};

View File

@@ -0,0 +1,43 @@
<?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('_b_b_openings', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('office_name')->nullable();
$table->string('deputy_district')->nullable();
$table->string('province_fa')->nullable();
$table->unsignedTinyInteger('province_id')->nullable()->index('b_b_openings_province_id_foreign');
$table->string('activity')->nullable();
$table->string('plan_id')->nullable();
$table->string('plan_fa')->nullable();
$table->string('project_title')->nullable();
$table->string('unit')->nullable();
$table->double('amount', null, 0)->nullable()->default(0);
$table->double('national_consumer_credit', null, 0)->nullable();
$table->double('province_consumer_credit', null, 0)->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('_b_b_openings');
}
};

View File

@@ -0,0 +1,41 @@
<?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('_b_b_priorities', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('province')->nullable();
$table->tinyInteger('province_id')->nullable();
$table->string('assistance')->nullable();
$table->tinyInteger('assistance_id')->nullable();
$table->string('office')->nullable();
$table->tinyInteger('office_id')->nullable();
$table->string('project_title')->nullable();
$table->double('credits_required', null, 0)->nullable();
$table->string('project_completion')->nullable();
$table->string('project_completion_id')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('_b_b_priorities');
}
};

View File

@@ -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.
*
* @return void
*/
public function up()
{
Schema::create('_b_b_project_indicators', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('project_province_fa')->nullable();
$table->unsignedTinyInteger('project_province_id')->nullable();
$table->string('project_plan_fa')->nullable();
$table->unsignedTinyInteger('project_plan_id')->nullable();
$table->string('project_office_fa')->nullable();
$table->unsignedTinyInteger('project_office_id')->nullable();
$table->string('province_fa')->nullable();
$table->unsignedTinyInteger('province_id')->nullable();
$table->string('city_fa')->nullable();
$table->unsignedTinyInteger('city_id')->nullable();
$table->string('project_indicator_fa')->nullable();
$table->unsignedTinyInteger('project_indicator_id')->nullable();
$table->unsignedMediumInteger('project_year')->nullable();
$table->string('project_name')->nullable();
$table->string('project_related')->nullable();
$table->string('project_axis')->nullable();
$table->unsignedBigInteger('project_accept_value')->nullable();
$table->unsignedBigInteger('project_communicate_value')->nullable();
$table->unsignedBigInteger('project_allocate_value')->nullable();
$table->unsignedBigInteger('project_unique_id')->nullable();
$table->timestamps();
$table->mediumInteger('project_progress')->nullable();
$table->bigInteger('project_accept_done')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('_b_b_project_indicators');
}
};

View File

@@ -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.
*
* @return void
*/
public function up()
{
Schema::create('_contactuses', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('c_name');
$table->string('c_phone');
$table->string('c_title');
$table->string('c_describe');
$table->timestamps();
$table->bigInteger('user_id');
$table->string('admin_response')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('_contactuses');
}
};

View File

@@ -0,0 +1,33 @@
<?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('_geopoints_2', function (Blueprint $table) {
$table->integer('pid', true);
$table->point('geopoint');
//
// $table->spatialIndex(['geopoint'], 'geopoint');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('_geopoints_2');
}
};

View File

@@ -0,0 +1,33 @@
<?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('_geopoints', function (Blueprint $table) {
$table->integer('pid', true);
$table->point('geopoint');
//
// $table->spatialIndex(['geopoint'], 'geopoint');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('_geopoints');
}
};

View File

@@ -0,0 +1,45 @@
<?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('_jahesh_operation_histories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedSmallInteger('jahesh_operation_id')->nullable()->index('jahesh_operation_histories_jahesh_operation_id_foreign');
$table->unsignedInteger('user_id')->nullable()->index('jahesh_operation_histories_user_id_foreign');
$table->string('previous_operation_1')->nullable();
$table->string('previous_operation_2')->nullable();
$table->string('previous_operation_3')->nullable();
$table->string('previous_operation_4')->nullable();
$table->string('previous_operation_5')->nullable();
$table->string('previous_operation_6')->nullable();
$table->string('previous_operation_7')->nullable();
$table->string('previous_operation_8')->nullable();
$table->string('previous_operation_9')->nullable();
$table->string('previous_operation_10')->nullable();
$table->string('previous_operation_11')->nullable();
$table->string('previous_operation_12')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('_jahesh_operation_histories');
}
};

View File

@@ -0,0 +1,44 @@
<?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('_jahesh_operations', function (Blueprint $table) {
$table->smallIncrements('id');
$table->unsignedTinyInteger('province_id')->nullable()->index('jahesh_operations_province_id_foreign');
$table->string('operation_1')->nullable();
$table->string('operation_2')->nullable();
$table->string('operation_3')->nullable();
$table->string('operation_4')->nullable();
$table->string('operation_5')->nullable();
$table->string('operation_6')->nullable();
$table->string('operation_7')->nullable();
$table->string('operation_8')->nullable();
$table->string('operation_9')->nullable();
$table->string('operation_10')->nullable();
$table->string('operation_11')->nullable();
$table->string('operation_12')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('_jahesh_operations');
}
};

View File

@@ -0,0 +1,35 @@
<?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('_rms_event_histories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedInteger('rms_event_id')->nullable()->index('rms_event_histories_rms_event_id_foreign');
$table->unsignedInteger('user_id')->nullable()->index('rms_event_histories_user_id_foreign');
$table->boolean('status');
$table->string('path_file')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('_rms_event_histories');
}
};

View File

@@ -0,0 +1,39 @@
<?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('_rms_events', function (Blueprint $table) {
$table->increments('id');
$table->unsignedInteger('user_id')->nullable()->index('rms_events_user_id_foreign');
$table->string('title');
$table->text('description')->nullable();
$table->string('path_file')->nullable();
$table->string('path_image')->nullable();
$table->timestamp('end_date')->nullable();
$table->boolean('archived')->default(false);
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('_rms_events');
}
};

View File

@@ -0,0 +1,64 @@
<?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('_road_construction_projects', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedInteger('user_id')->nullable()->index('road_construction_projects_user_id_foreign');
$table->unsignedTinyInteger('operation_type');
$table->string('operation_sub_types');
$table->decimal('start_lat', 12, 10);
$table->decimal('start_lng', 12, 10);
$table->decimal('end_lat', 12, 10);
$table->decimal('end_lng', 12, 10);
$table->string('project_distance');
$table->unsignedTinyInteger('province');
$table->unsignedTinyInteger('city');
$table->string('axis_name')->nullable();
$table->unsignedTinyInteger('axis_type');
$table->string('project_name')->nullable();
$table->unsignedTinyInteger('project_type');
$table->string('start_date')->nullable();
$table->string('consultant_name')->nullable();
$table->string('contractor_name')->nullable();
$table->string('ordered_credit');
$table->string('absorbed_credit');
$table->string('required_credit')->nullable();
$table->string('plan_number')->nullable();
$table->unsignedTinyInteger('plan_office')->nullable();
$table->string('announced_date')->nullable();
$table->string('credit_progress');
$table->string('physical_progress');
$table->text('project_problems')->nullable();
$table->unsignedTinyInteger('project_status');
$table->string('project_stop_reasons')->nullable();
$table->boolean('can_release')->default(false);
$table->string('release_date')->nullable();
$table->string('supervisor_name')->nullable();
$table->string('responsible_name')->nullable();
$table->string('report_date')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('_road_construction_projects');
}
};

View File

@@ -0,0 +1,55 @@
<?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('_road_construction_rural_histories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('project_id')->nullable()->index('road_construction_rural_histories_project_id_foreign');
$table->unsignedInteger('user_id')->nullable()->index('road_construction_rural_histories_user_id_foreign');
$table->string('previous_axis_name')->nullable();
$table->unsignedTinyInteger('previous_axis_type')->nullable();
$table->string('previous_project_name')->nullable();
$table->longText('previous_cities_id')->nullable();
$table->string('previous_contractor_name')->nullable();
$table->string('previous_consultant_name')->nullable();
$table->string('previous_contract_date')->nullable();
$table->string('previous_contract_credit')->nullable();
$table->string('previous_start_latlng')->nullable();
$table->string('previous_end_latlng')->nullable();
$table->string('previous_stop_reason')->nullable();
$table->string('previous_team_latlng')->nullable();
$table->timestamp('previous_submited_at')->nullable();
$table->timestamp('previous_last_updated_at')->nullable();
$table->longText('previous_project_distance')->nullable();
$table->longText('previous_project_distance_update')->nullable();
$table->string('previous_contractor_credit')->nullable();
$table->string('previous_physical_progress')->nullable();
$table->text('previous_description')->nullable();
$table->boolean('previous_status')->default(false);
$table->boolean('previous_project_status')->default(false);
$table->text('new_files')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('_road_construction_rural_histories');
}
};

View File

@@ -0,0 +1,62 @@
<?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('_road_construction_rurals', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedInteger('user_id')->index('road_construction_rurals_user_id_foreign');
$table->string('axis_name')->nullable();
$table->unsignedTinyInteger('axis_type')->nullable();
$table->string('axis_type_fa')->nullable();
$table->string('project_name')->nullable();
$table->unsignedTinyInteger('province_id')->nullable()->index('road_construction_rurals_province_id_foreign');
$table->string('province_fa')->nullable();
$table->longText('cities_id')->nullable();
$table->string('city_1_fa')->nullable();
$table->string('city_2_fa')->nullable();
$table->string('city_3_fa')->nullable();
$table->string('contractor_name')->nullable();
$table->string('consultant_name')->nullable();
$table->string('contract_date')->nullable();
$table->string('contract_credit')->nullable();
$table->string('start_latlng')->nullable();
$table->string('end_latlng')->nullable();
$table->timestamp('submited_at')->nullable();
$table->string('submited_at_fa')->nullable();
$table->timestamp('last_updated_at')->nullable();
$table->string('last_updated_at_fa')->nullable();
$table->longText('project_distance')->nullable();
$table->longText('project_distance_update')->nullable();
$table->string('contractor_credit')->nullable();
$table->string('physical_progress')->nullable();
$table->text('description')->nullable();
$table->boolean('status')->default(false);
$table->boolean('project_status')->default(false);
$table->boolean('rate')->nullable();
$table->string('rate_desc')->nullable();
$table->string('project_status_fa')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('_road_construction_rurals');
}
};

View File

@@ -0,0 +1,55 @@
<?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('_road_danger_prevention_histories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('project_id')->nullable()->index('road_danger_prevention_histories_project_id_foreign');
$table->unsignedInteger('user_id')->nullable()->index('road_danger_prevention_histories_user_id_foreign');
$table->string('previous_axis_name')->nullable();
$table->unsignedTinyInteger('previous_axis_type')->nullable();
$table->string('previous_project_name')->nullable();
$table->longText('previous_cities_id')->nullable();
$table->string('previous_contractor_name')->nullable();
$table->string('previous_consultant_name')->nullable();
$table->string('previous_contract_date')->nullable();
$table->string('previous_contract_credit')->nullable();
$table->string('previous_start_latlng')->nullable();
$table->string('previous_end_latlng')->nullable();
$table->string('previous_team_latlng')->nullable();
$table->string('previous_stop_reason')->nullable();
$table->timestamp('previous_submited_at')->nullable();
$table->timestamp('previous_last_updated_at')->nullable();
$table->longText('previous_project_distance')->nullable();
$table->longText('previous_project_distance_update')->nullable();
$table->string('previous_contractor_credit')->nullable();
$table->string('previous_physical_progress')->nullable();
$table->text('previous_description')->nullable();
$table->boolean('previous_status')->default(false);
$table->boolean('previous_project_status')->default(false);
$table->text('new_files')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('_road_danger_prevention_histories');
}
};

View File

@@ -0,0 +1,63 @@
<?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('_road_danger_preventions', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedInteger('user_id')->nullable()->index('road_danger_preventions_user_id_foreign');
$table->string('axis_name')->nullable();
$table->unsignedTinyInteger('axis_type')->nullable();
$table->string('axis_type_fa')->nullable();
$table->string('project_name')->nullable();
$table->unsignedTinyInteger('province_id')->nullable()->index('road_danger_preventions_province_id_foreign');
$table->string('province_fa')->nullable();
$table->longText('cities_id')->nullable();
$table->string('city_1_fa')->nullable();
$table->string('city_2_fa')->nullable();
$table->string('city_3_fa')->nullable();
$table->string('contractor_name')->nullable();
$table->string('consultant_name')->nullable();
$table->string('contract_date')->nullable();
$table->string('contract_credit')->nullable();
$table->string('start_latlng')->nullable();
$table->string('end_latlng')->nullable();
$table->timestamp('submited_at')->nullable();
$table->string('submited_at_fa')->nullable();
$table->timestamp('last_updated_at')->nullable();
$table->string('last_updated_at_fa')->nullable();
$table->longText('project_distance')->nullable();
$table->longText('project_distance_update')->nullable();
$table->string('contractor_credit')->nullable();
$table->string('physical_progress')->nullable();
$table->text('description')->nullable();
$table->boolean('status')->default(false);
$table->boolean('project_status')->default(false);
$table->string('project_status_fa')->nullable();
$table->boolean('rate')->nullable();
$table->string('rate_desc')->nullable();
$table->text('project_description')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('_road_danger_preventions');
}
};

View File

@@ -0,0 +1,55 @@
<?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('_road_maintenance_project_histories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('project_id')->nullable()->index('road_maintenance_project_histories_project_id_foreign');
$table->unsignedInteger('user_id')->nullable()->index('road_maintenance_project_histories_user_id_foreign');
$table->string('previous_axis_name')->nullable();
$table->unsignedTinyInteger('previous_axis_type')->nullable();
$table->string('previous_project_name')->nullable();
$table->longText('previous_cities_id')->nullable();
$table->string('previous_contractor_name')->nullable();
$table->string('previous_consultant_name')->nullable();
$table->string('previous_contract_date')->nullable();
$table->string('previous_contract_credit')->nullable();
$table->string('previous_start_latlng')->nullable();
$table->string('previous_end_latlng')->nullable();
$table->string('previous_team_latlng')->nullable();
$table->string('previous_stop_reason')->nullable();
$table->timestamp('previous_submited_at')->nullable();
$table->timestamp('previous_last_updated_at')->nullable();
$table->longText('previous_project_distance')->nullable();
$table->longText('previous_project_distance_update')->nullable();
$table->string('previous_contractor_credit')->nullable();
$table->string('previous_physical_progress')->nullable();
$table->text('previous_description')->nullable();
$table->boolean('previous_status')->default(false);
$table->boolean('previous_project_status')->default(false);
$table->text('new_files')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('_road_maintenance_project_histories');
}
};

View File

@@ -0,0 +1,62 @@
<?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('_road_maintenance_projects', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedInteger('user_id')->nullable()->index('road_maintenance_projects_user_id_foreign');
$table->string('axis_name')->nullable();
$table->unsignedTinyInteger('axis_type')->nullable();
$table->string('axis_type_fa')->nullable();
$table->string('project_name')->nullable();
$table->unsignedTinyInteger('province_id')->nullable()->index('road_maintenance_projects_province_id_foreign');
$table->string('province_fa')->nullable();
$table->longText('cities_id')->nullable();
$table->string('city_1_fa')->nullable();
$table->string('city_2_fa')->nullable();
$table->string('city_3_fa')->nullable();
$table->string('contractor_name')->nullable();
$table->string('consultant_name')->nullable();
$table->string('contract_date')->nullable();
$table->string('contract_credit')->nullable();
$table->string('start_latlng')->nullable();
$table->string('end_latlng')->nullable();
$table->timestamp('submited_at')->nullable();
$table->string('submited_at_fa')->nullable();
$table->timestamp('last_updated_at')->nullable();
$table->string('last_updated_at_fa')->nullable();
$table->longText('project_distance')->nullable();
$table->longText('project_distance_update')->nullable();
$table->string('contractor_credit')->nullable();
$table->string('physical_progress')->nullable();
$table->text('description')->nullable();
$table->boolean('status')->default(false);
$table->boolean('project_status')->default(false);
$table->boolean('rate')->nullable();
$table->string('rate_desc')->nullable();
$table->string('project_status_fa')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('_road_maintenance_projects');
}
};

View File

@@ -0,0 +1,49 @@
<?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('_road_patrol_projects', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedInteger('user_id')->nullable()->index('road_patrol_projects_user_id_foreign');
$table->decimal('start_lat', 12, 10);
$table->decimal('start_lng', 12, 10);
$table->decimal('end_lat', 12, 10);
$table->decimal('end_lng', 12, 10);
$table->string('project_distance');
$table->timestamps();
$table->bigInteger('province_id')->nullable();
$table->string('province_fa')->nullable();
$table->bigInteger('city_id')->nullable();
$table->string('city_fa')->nullable();
$table->bigInteger('start_way_id')->nullable();
$table->bigInteger('end_way_id')->nullable();
$table->string('user_name')->nullable();
$table->unsignedSmallInteger('status')->nullable();
$table->string('status_fa', 100)->nullable();
$table->unsignedInteger('supervisor_id')->nullable();
$table->text('supervisor_description')->nullable();
$table->timestamp('supervising_time')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('_road_patrol_projects');
}
};

View File

@@ -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.
*
* @return void
*/
public function up()
{
Schema::create('_road_patrol_sub_projects', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('road_patrol_project_id');
$table->decimal('project_lat', 12, 10);
$table->decimal('project_lng', 12, 10);
$table->unsignedTinyInteger('item');
$table->string('sub_items');
$table->longText('sub_items_data')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('_road_patrol_sub_projects');
}
};

View File

@@ -0,0 +1,55 @@
<?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('_road_technical_building_histories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('project_id')->nullable()->index('road_technical_building_histories_project_id_foreign');
$table->unsignedInteger('user_id')->nullable()->index('road_technical_building_histories_user_id_foreign');
$table->string('previous_axis_name')->nullable();
$table->unsignedTinyInteger('previous_axis_type')->nullable();
$table->string('previous_project_name')->nullable();
$table->longText('previous_cities_id')->nullable();
$table->string('previous_contractor_name')->nullable();
$table->string('previous_consultant_name')->nullable();
$table->string('previous_contract_date')->nullable();
$table->string('previous_contract_credit')->nullable();
$table->string('previous_start_latlng')->nullable();
$table->string('previous_end_latlng')->nullable();
$table->string('previous_team_latlng')->nullable();
$table->string('previous_stop_reason')->nullable();
$table->timestamp('previous_submited_at')->nullable();
$table->timestamp('previous_last_updated_at')->nullable();
$table->longText('previous_project_distance')->nullable();
$table->longText('previous_project_distance_update')->nullable();
$table->string('previous_contractor_credit')->nullable();
$table->string('previous_physical_progress')->nullable();
$table->text('previous_description')->nullable();
$table->boolean('previous_status')->default(false);
$table->boolean('previous_project_status')->default(false);
$table->text('new_files')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('_road_technical_building_histories');
}
};

View File

@@ -0,0 +1,63 @@
<?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('_road_technical_buildings', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedInteger('user_id')->nullable()->index('road_technical_buildings_user_id_foreign');
$table->string('axis_name')->nullable();
$table->unsignedTinyInteger('axis_type')->nullable();
$table->string('axis_type_fa')->nullable();
$table->string('project_name')->nullable();
$table->unsignedTinyInteger('province_id')->nullable()->index('road_technical_buildings_province_id_foreign');
$table->string('province_fa')->nullable();
$table->longText('cities_id')->nullable();
$table->string('city_1_fa')->nullable();
$table->string('city_2_fa')->nullable();
$table->string('city_3_fa')->nullable();
$table->string('contractor_name')->nullable();
$table->string('consultant_name')->nullable();
$table->string('contract_date')->nullable();
$table->string('contract_credit')->nullable();
$table->string('start_latlng')->nullable();
$table->string('end_latlng')->nullable();
$table->timestamp('submited_at')->nullable();
$table->string('submited_at_fa')->nullable();
$table->timestamp('last_updated_at')->nullable();
$table->string('last_updated_at_fa')->nullable();
$table->longText('project_distance')->nullable();
$table->longText('project_distance_update')->nullable();
$table->string('contractor_credit')->nullable();
$table->string('physical_progress')->nullable();
$table->text('description')->nullable();
$table->boolean('status')->default(false);
$table->boolean('project_status')->default(false);
$table->string('project_status_fa')->nullable();
$table->boolean('rate')->nullable();
$table->string('rate_desc')->nullable();
$table->text('project_describtion')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('_road_technical_buildings');
}
};

View File

@@ -0,0 +1,55 @@
<?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('_road_tollhouse_management_histories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('project_id')->nullable()->index('road_tollhouse_management_histories_project_id_foreign');
$table->unsignedInteger('user_id')->nullable()->index('road_tollhouse_management_histories_user_id_foreign');
$table->string('previous_axis_name')->nullable();
$table->unsignedTinyInteger('previous_axis_type')->nullable();
$table->string('previous_project_name')->nullable();
$table->longText('previous_cities_id')->nullable();
$table->string('previous_contractor_name')->nullable();
$table->string('previous_consultant_name')->nullable();
$table->string('previous_contract_date')->nullable();
$table->string('previous_contract_credit')->nullable();
$table->string('previous_start_latlng')->nullable();
$table->string('previous_end_latlng')->nullable();
$table->string('previous_team_latlng')->nullable();
$table->string('previous_stop_reason')->nullable();
$table->timestamp('previous_submited_at')->nullable();
$table->timestamp('previous_last_updated_at')->nullable();
$table->longText('previous_project_distance')->nullable();
$table->longText('previous_project_distance_update')->nullable();
$table->string('previous_contractor_credit')->nullable();
$table->string('previous_physical_progress')->nullable();
$table->text('previous_description')->nullable();
$table->boolean('previous_status')->default(false);
$table->boolean('previous_project_status')->default(false);
$table->text('new_files')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('_road_tollhouse_management_histories');
}
};

View File

@@ -0,0 +1,63 @@
<?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('_road_tollhouse_managements', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedInteger('user_id')->nullable()->index('road_tollhouse_managements_user_id_foreign');
$table->string('axis_name')->nullable();
$table->unsignedTinyInteger('axis_type')->nullable();
$table->string('axis_type_fa')->nullable();
$table->string('project_name')->nullable();
$table->unsignedTinyInteger('province_id')->nullable()->index('road_tollhouse_managements_province_id_foreign');
$table->binary('province_fa')->nullable();
$table->longText('cities_id')->nullable();
$table->string('city_1_fa')->nullable();
$table->string('city_2_fa')->nullable();
$table->string('city_3_fa')->nullable();
$table->string('contractor_name')->nullable();
$table->string('consultant_name')->nullable();
$table->string('contract_date')->nullable();
$table->string('contract_credit')->nullable();
$table->string('start_latlng')->nullable();
$table->string('end_latlng')->nullable();
$table->timestamp('submited_at')->nullable();
$table->string('submited_at_fa')->nullable();
$table->timestamp('last_updated_at')->nullable();
$table->string('last_updated_at_fa')->nullable();
$table->longText('project_distance')->nullable();
$table->longText('project_distance_update')->nullable();
$table->string('contractor_credit')->nullable();
$table->string('physical_progress')->nullable();
$table->text('description')->nullable();
$table->boolean('status')->default(false);
$table->boolean('project_status')->default(false);
$table->string('project_status_fa')->nullable();
$table->text('project_description')->nullable();
$table->boolean('rate')->nullable();
$table->string('rate_desc')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('_road_tollhouse_managements');
}
};

View File

@@ -0,0 +1,63 @@
<?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('_road_upgrade_safeties', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedInteger('user_id')->nullable()->index('road_upgrade_safeties_user_id_foreign');
$table->string('axis_name')->nullable();
$table->integer('axis_type')->nullable();
$table->string('axis_type_fa')->nullable();
$table->string('project_name')->nullable();
$table->unsignedTinyInteger('province_id')->nullable()->index('road_upgrade_safeties_province_id_foreign');
$table->string('province_fa')->nullable();
$table->longText('cities_id')->nullable();
$table->string('city_1_fa')->nullable();
$table->string('city_2_fa')->nullable();
$table->string('city_3_fa')->nullable();
$table->string('contractor_name')->nullable();
$table->string('consultant_name')->nullable();
$table->string('contract_date')->nullable();
$table->string('contract_credit')->nullable();
$table->string('start_latlng')->nullable();
$table->string('end_latlng')->nullable();
$table->timestamp('submited_at')->nullable();
$table->string('submited_at_fa')->nullable();
$table->timestamp('last_updated_at')->nullable();
$table->string('last_updated_at_fa')->nullable();
$table->longText('project_distance')->nullable();
$table->longText('project_distance_update')->nullable();
$table->string('contractor_credit')->nullable();
$table->string('physical_progress')->nullable();
$table->text('description')->nullable();
$table->boolean('status')->default(false);
$table->boolean('project_status')->default(false);
$table->string('project_status_fa')->nullable();
$table->text('project_description')->nullable();
$table->boolean('rate')->nullable();
$table->string('rate_desc')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('_road_upgrade_safeties');
}
};

View File

@@ -0,0 +1,55 @@
<?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('_road_upgrade_safety_histories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('project_id')->nullable()->index('road_upgrade_safety_histories_project_id_foreign');
$table->unsignedInteger('user_id')->nullable()->index('road_upgrade_safety_histories_user_id_foreign');
$table->string('previous_axis_name')->nullable();
$table->unsignedTinyInteger('previous_axis_type')->nullable();
$table->string('previous_project_name')->nullable();
$table->longText('previous_cities_id')->nullable();
$table->string('previous_contractor_name')->nullable();
$table->string('previous_consultant_name')->nullable();
$table->string('previous_contract_date')->nullable();
$table->string('previous_contract_credit')->nullable();
$table->string('previous_start_latlng')->nullable();
$table->string('previous_end_latlng')->nullable();
$table->string('previous_team_latlng')->nullable();
$table->string('previous_stop_reason')->nullable();
$table->timestamp('previous_submited_at')->nullable();
$table->timestamp('previous_last_updated_at')->nullable();
$table->longText('previous_project_distance')->nullable();
$table->longText('previous_project_distance_update')->nullable();
$table->string('previous_contractor_credit')->nullable();
$table->string('previous_physical_progress')->nullable();
$table->text('previous_description')->nullable();
$table->boolean('previous_status')->default(false);
$table->boolean('previous_project_status')->default(false);
$table->text('new_files')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('_road_upgrade_safety_histories');
}
};

View File

@@ -0,0 +1,33 @@
<?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('_route_paths', function (Blueprint $table) {
$table->id();
$table->decimal('lat1', 12, 10)->index('lat1');
$table->decimal('lng1', 12, 10)->index('lng1');
$table->string('identifier');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('_route_paths');
}
};

View File

@@ -0,0 +1,47 @@
<?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('_techno_transports', function (Blueprint $table) {
$table->integer('id', true);
$table->integer('presenter_type')->nullable();
$table->string('presenter_fa', 100)->nullable();
$table->string('company_type', 100)->nullable();
$table->string('ceo_name', 300)->nullable();
$table->string('ceo_cellphone', 300)->nullable();
$table->string('name', 300)->nullable();
$table->string('family', 300)->nullable();
$table->string('telphone', 50)->nullable();
$table->integer('province_id')->nullable();
$table->string('province_fa', 300)->nullable();
$table->text('address')->nullable();
$table->string('idea_title', 300)->nullable();
$table->text('file')->nullable();
$table->integer('event_type')->nullable();
$table->string('event_fa', 300)->nullable();
$table->dateTime('created_at')->nullable();
$table->dateTime('updated_at')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('_techno_transports');
}
};

View File

@@ -0,0 +1,35 @@
<?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('_weather_notices', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('type')->nullable();
$table->string('color')->nullable();
$table->string('notice_code')->nullable();
$table->text('notice_text')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('_weather_notices');
}
};

View File

@@ -0,0 +1,35 @@
<?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('accident_damage', function (Blueprint $table) {
$table->increments('id');
$table->unsignedInteger('accident_id')->nullable()->index('accident_damage_ibfk_1');
$table->unsignedInteger('damage_id')->nullable()->index('accident_damage_ibfk_2');
$table->integer('value')->nullable();
$table->bigInteger('amount')->nullable();
$table->string('unit', 50)->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('accident_damage');
}
};

View File

@@ -0,0 +1,42 @@
<?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('accident_point_histories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedSmallInteger('point_id')->index('accident_point_histories_point_id_foreign');
$table->unsignedInteger('user_id')->nullable()->index('accident_point_histories_user_id_foreign');
$table->string('previous_lat');
$table->string('previous_lng');
$table->text('previous_operation')->nullable();
$table->string('previous_target')->nullable();
$table->string('previous_cost')->nullable();
$table->string('previous_progress')->nullable();
$table->string('previous_end_date')->nullable();
$table->text('previous_actions')->nullable();
$table->text('new_files')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('accident_point_histories');
}
};

View File

@@ -0,0 +1,51 @@
<?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('accident_points', function (Blueprint $table) {
$table->smallIncrements('id');
$table->unsignedTinyInteger('province_id')->nullable()->index('accident_points_province_id_foreign');
$table->unsignedSmallInteger('city_id')->nullable()->index('accident_points_city_id_foreign');
$table->string('lat');
$table->string('lng');
$table->string('priority')->nullable();
$table->string('code')->nullable();
$table->string('province')->nullable();
$table->string('axis_name')->nullable();
$table->string('axis_type')->nullable();
$table->string('axis_start')->nullable();
$table->string('axis_end')->nullable();
$table->string('native_name')->nullable();
$table->string('distance')->nullable();
$table->string('geometric_desc')->nullable();
$table->text('operation')->nullable();
$table->string('target')->nullable();
$table->string('cost')->default('0');
$table->string('progress')->default('0');
$table->string('end_date')->nullable();
$table->text('actions')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('accident_points');
}
};

View File

@@ -0,0 +1,67 @@
<?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');
}
};

View File

@@ -0,0 +1,63 @@
<?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('camps', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedInteger('user_id')->nullable()->index('camps_user_id_foreign');
$table->unsignedTinyInteger('province_id')->nullable()->index('camps_province_id_foreign');
$table->string('province_fa')->nullable();
$table->string('axis_name')->nullable();
$table->unsignedTinyInteger('axis_type')->nullable();
$table->string('axis_type_fa')->nullable();
$table->unsignedTinyInteger('blockage_cause')->nullable();
$table->string('blockage_cause_fa')->nullable();
$table->unsignedTinyInteger('blockage_type')->nullable();
$table->string('blockage_type_fa')->nullable();
$table->string('blockage_length')->nullable();
$table->string('blockage_damage_money')->nullable();
$table->string('blockage_damage_lower_6_count')->nullable();
$table->string('blockage_damage_higher_6_count')->nullable();
$table->string('blockage_damage_count')->nullable();
$table->string('active_cars_count')->nullable();
$table->string('active_rahdar_count')->nullable();
$table->string('prediction_time_fa')->nullable();
$table->tinyInteger('prediction_time')->nullable();
$table->string('block_axis_desc')->nullable();
$table->unsignedTinyInteger('is_open')->nullable()->default(2);
$table->string('is_open_type')->nullable();
$table->string('is_open_type_fa')->nullable();
$table->longText('cities_id')->nullable();
$table->integer('city_id')->nullable();
$table->string('city_1_fa')->nullable();
$table->string('city_2_fa')->nullable();
$table->string('city_3_fa')->nullable();
$table->string('start_latlng')->nullable();
$table->string('end_latlng')->nullable();
$table->string('submited_at')->nullable();
$table->string('is_open_at')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('camps');
}
};

View File

@@ -0,0 +1,39 @@
<?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('cities', function (Blueprint $table) {
$table->smallIncrements('id');
$table->unsignedTinyInteger('province_id')->nullable()->index('cities_province_id_foreign');
$table->string('name_fa');
$table->string('name_en')->nullable();
$table->unsignedSmallInteger('type_id')->nullable();
$table->unsignedTinyInteger('province_feature_id')->nullable();
$table->decimal('center_lat', 12, 10)->nullable();
$table->decimal('center_long', 12, 10)->nullable();
$table->string('abrar_process')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('cities');
}
};

View File

@@ -0,0 +1,65 @@
<?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('cmms_demos', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('car_name')->nullable();
$table->tinyInteger('car_group')->nullable();
$table->string('car_group_fa')->nullable();
$table->tinyInteger('car_type')->nullable();
$table->string('car_type_fa')->nullable();
$table->string('machine_code')->nullable();
$table->string('estate_no')->nullable();
$table->string('build_date')->nullable();
$table->string('car_color')->nullable();
$table->string('plak_number')->nullable();
$table->string('plak_number_right')->nullable();
$table->string('plak_number_left')->nullable();
$table->string('plak_number_center')->nullable();
$table->string('plak_number_char')->nullable();
$table->string('body_number')->nullable();
$table->string('dam_number')->nullable();
$table->string('motor_number')->nullable();
$table->string('vin_number')->nullable();
$table->tinyInteger('section')->nullable();
$table->string('section_fa')->nullable();
$table->string('gps_code')->nullable();
$table->string('driver_name')->nullable();
$table->string('last_work_value')->nullable();
$table->string('unit_name')->nullable();
$table->string('status_fa')->nullable();
$table->tinyInteger('status')->nullable();
$table->string('repair_hourly_price')->nullable();
$table->tinyInteger('unit_group')->nullable();
$table->string('unit_group_fa')->nullable();
$table->string('res1')->nullable();
$table->string('mobile')->nullable();
$table->tinyInteger('category')->nullable();
$table->string('category_fa')->nullable();
$table->timestamps();
$table->boolean('proccessed')->nullable()->default(false);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('cmms_demos');
}
};

View File

@@ -0,0 +1,48 @@
<?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('cmms_forms_histories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('cmms_form_id')->nullable()->index('cmms_forms_histories_cmms_form_id_foreign');
$table->unsignedBigInteger('user_id');
$table->string('previous_chassis_number')->nullable();
$table->string('previous_province_id')->nullable();
$table->string('previous_province_fa')->nullable();
$table->string('previous_city_id')->nullable();
$table->string('previous_city_fa')->nullable();
$table->string('previous_device_name')->nullable();
$table->string('previous_operator_name')->nullable();
$table->string('previous_operator_nationalcode')->nullable();
$table->string('previous_operator_phone')->nullable();
$table->string('previous_gps_code')->nullable();
$table->timestamps();
$table->text('previous_image1')->nullable();
$table->text('previous_image2')->nullable();
$table->text('previous_image3')->nullable();
$table->text('previous_file1')->nullable();
$table->string('previous_form_number')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('cmms_forms_histories');
}
};

View File

@@ -0,0 +1,106 @@
<?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('cmms_forms', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('dedicated_number')->nullable();
$table->string('chassis_number')->nullable();
$table->bigInteger('province_id')->nullable();
$table->string('province_fa')->nullable();
$table->bigInteger('city_id')->nullable();
$table->string('city_fa')->nullable();
$table->string('device_name')->nullable();
$table->string('operator_name')->nullable();
$table->string('operator_nationalcode')->nullable();
$table->string('form_number')->nullable();
$table->enum('car_type', ['B', 'L', 'G', 'Ex'])->nullable();
$table->string('motor')->nullable();
$table->text('motor_description')->nullable();
$table->integer('motor_score')->nullable();
$table->string('power')->nullable();
$table->text('power_description')->nullable();
$table->integer('power_score')->nullable();
$table->string('zirbandi')->nullable();
$table->text('zirbandi_description')->nullable();
$table->integer('zirbandi_score')->nullable();
$table->string('chassis')->nullable();
$table->text('chassis_description')->nullable();
$table->integer('chassis_score')->nullable();
$table->string('electrical')->nullable();
$table->text('electrical_description')->nullable();
$table->integer('electrical_score')->nullable();
$table->string('safety')->nullable();
$table->text('safety_description')->nullable();
$table->integer('safety_score')->nullable();
$table->string('gps')->nullable();
$table->text('gps_description')->nullable();
$table->integer('gps_score')->nullable();
$table->string('color')->nullable();
$table->text('color_description')->nullable();
$table->integer('color_score')->nullable();
$table->string('bucket')->nullable();
$table->text('bucket_description')->nullable();
$table->integer('bucket_score')->nullable();
$table->string('hydraulic')->nullable();
$table->text('hydraulic_description')->nullable();
$table->integer('hydraulic_score')->nullable();
$table->string('jolobandi')->nullable();
$table->text('jolobandi_description')->nullable();
$table->integer('jolobandi_score')->nullable();
$table->string('ripper')->nullable();
$table->text('ripper_description')->nullable();
$table->integer('ripper_score')->nullable();
$table->string('service_status')->nullable();
$table->text('service_description')->nullable();
$table->string('fuel_form')->nullable();
$table->text('fuel_description')->nullable();
$table->boolean('question1')->nullable();
$table->boolean('question2')->nullable();
$table->boolean('question3')->nullable();
$table->boolean('question4')->nullable();
$table->boolean('question5')->nullable();
$table->string('auditor_name')->nullable();
$table->string('auditor_position')->nullable();
$table->string('member1_name')->nullable();
$table->string('member1_position')->nullable();
$table->string('member2_name')->nullable();
$table->string('member2_position')->nullable();
$table->string('member3_name')->nullable();
$table->string('member3_position')->nullable();
$table->bigInteger('total_points')->nullable();
$table->string('image1')->nullable();
$table->string('image2')->nullable();
$table->string('image3')->nullable();
$table->string('file1')->nullable();
$table->timestamps();
$table->string('gps_code')->nullable();
$table->string('operator_phone')->nullable();
$table->string('car_type_fa')->nullable();
$table->string('created_at_fa')->nullable();
$table->string('updated_at_fa')->nullable();
$table->integer('user_id')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('cmms_forms');
}
};

View File

@@ -0,0 +1,36 @@
<?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('cmms_province', function (Blueprint $table) {
$table->bigIncrements('id');
$table->bigInteger('province_id');
$table->string('province_fa');
$table->bigInteger('area_code');
$table->timestamps();
$table->bigInteger('rms_code');
$table->bigInteger('user_id')->default(0);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('cmms_province');
}
};

View File

@@ -0,0 +1,34 @@
<?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('constituencies', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('constituency_fa', 100)->nullable();
$table->integer('province_id')->nullable();
$table->string('province_fa', 100)->nullable();
$table->string('region', 100)->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('constituencies');
}
};

View File

@@ -0,0 +1,47 @@
<?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('contract_eblagh_melis', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('title')->nullable();
$table->integer('province_id')->nullable();
$table->string('province_fa')->nullable();
$table->integer('office_id')->nullable();
$table->string('office_fa')->nullable();
$table->string('mehvar_name')->nullable();
$table->string('tarh_number')->nullable();
$table->string('credit_eblagh_public')->nullable();
$table->string('credit_takhsis_public_cash')->nullable();
$table->string('credit_takhsis_public_not_cash')->nullable();
$table->string('credit_public_describe')->nullable();
$table->string('credit_eblagh_other')->nullable();
$table->string('credit_takhsis_other')->nullable();
$table->string('credit_eblagh_meli')->nullable();
$table->string('credit_takhsis_meli')->nullable();
$table->integer('used')->nullable()->default(0);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('contract_eblagh_melis');
}
};

View File

@@ -0,0 +1,43 @@
<?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('contract_mojavez_setads', function (Blueprint $table) {
$table->bigIncrements('id');
$table->integer('province_id');
$table->string('province_fa');
$table->integer('office_id');
$table->string('office_fa');
$table->string('title');
$table->string('mehvar_name')->nullable();
$table->string('mojavez_mablagh')->nullable();
$table->string('mojavez_number');
$table->string('mojavez_date');
$table->string('tarh_number_1')->nullable();
$table->string('tarh_number_2')->nullable();
$table->string('tarh_number_3')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('contract_mojavez_setads');
}
};

View File

@@ -0,0 +1,92 @@
<?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('contract_sub_items_histories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('project_title')->nullable();
$table->string('project_type_id');
$table->string('project_type_fa');
$table->string('operation_type_id1')->nullable();
$table->string('operation_type_fa1')->nullable();
$table->float('operation_type_amount1', null, 0)->nullable();
$table->float('operation_type_progress1', null, 0)->nullable();
$table->string('operation_type_id2')->nullable();
$table->string('operation_type_fa2')->nullable();
$table->float('operation_type_amount2', null, 0)->nullable();
$table->float('operation_type_progress2', null, 0)->nullable();
$table->string('operation_type_id3')->nullable();
$table->string('operation_type_fa3')->nullable();
$table->float('operation_type_amount3', null, 0)->nullable();
$table->float('operation_type_progress3', null, 0)->nullable();
$table->string('operation_type_id4')->nullable();
$table->string('operation_type_fa4')->nullable();
$table->float('operation_type_amount4', null, 0)->nullable();
$table->float('operation_type_progress4', null, 0)->nullable();
$table->integer('city_id')->nullable();
$table->string('city_fa')->nullable();
$table->integer('province_id')->nullable();
$table->string('province_fa')->nullable();
$table->string('axis_type_id')->nullable();
$table->string('axis_type_fa')->nullable();
$table->string('axis_name_id')->nullable();
$table->string('axis_name_fa')->nullable();
$table->string('start_lat')->nullable();
$table->string('end_lat')->nullable();
$table->string('start_lng')->nullable();
$table->string('end_lng')->nullable();
$table->string('followup_priority_project')->nullable();
$table->string('priority_project')->nullable();
$table->string('operator_name')->nullable();
$table->string('operator_phone')->nullable();
$table->dateTime('last_date_update')->nullable();
$table->string('updated_at_fa')->nullable();
$table->string('created_at_fa')->nullable();
$table->string('last_status_id')->nullable();
$table->string('last_status_fa')->nullable();
$table->string('last_digit_project')->nullable();
$table->string('last_function_operator')->nullable();
$table->string('last_payable_operator')->nullable();
$table->string('complete_payable')->nullable();
$table->string('image_path1')->nullable();
$table->string('image_path2')->nullable();
$table->string('unique_code')->nullable();
$table->unsignedBigInteger('subitem_id')->nullable()->index('contract_sub_items_histories_subitem_id_foreign');
$table->bigInteger('progress_project')->nullable()->default(0);
$table->string('operation_type_unit1')->nullable();
$table->string('operation_type_unit2')->nullable();
$table->string('operation_type_unit3')->nullable();
$table->string('operation_type_unit4')->nullable();
$table->float('operation_type_tonaj1', null, 0)->nullable();
$table->float('operation_type_tonaj2', null, 0)->nullable();
$table->float('operation_type_tonaj3', null, 0)->nullable();
$table->float('operation_type_tonaj4', null, 0)->nullable();
$table->integer('is_corrected')->nullable();
$table->timestamps();
$table->unsignedBigInteger('required_bitumen')->nullable();
$table->unsignedBigInteger('used_bitumen')->nullable();
$table->string('bridge_number', 50)->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('contract_sub_items_histories');
}
};

View File

@@ -0,0 +1,100 @@
<?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('contract_subitems', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('project_title')->nullable();
$table->tinyInteger('project_type_id')->nullable();
$table->string('project_type_fa')->nullable();
$table->string('project_type_fa_for_chart')->nullable();
$table->integer('city_id')->nullable();
$table->string('city_fa')->nullable();
$table->tinyInteger('province_id')->nullable();
$table->string('province_fa')->nullable();
$table->integer('axis_type_id')->nullable();
$table->string('axis_type_fa')->nullable();
$table->tinyInteger('followup_priority_project_id')->nullable();
$table->string('followup_priority_project')->nullable();
$table->tinyInteger('priority_project')->nullable();
$table->string('priority_project_fa', 119)->nullable();
$table->string('operator_name')->nullable();
$table->tinyInteger('last_status_id')->nullable();
$table->integer('progress_project')->nullable();
$table->string('last_status_fa')->nullable();
$table->string('last_status_fa_for_chart', 119)->nullable();
$table->string('last_digit_project')->nullable();
$table->string('last_function_operator')->nullable();
$table->string('last_payable_operator')->nullable();
$table->string('complete_payable')->nullable();
$table->dateTime('last_date_update')->nullable();
$table->string('created_at_fa')->nullable();
$table->string('updated_at_fa')->nullable();
$table->string('unique_code');
$table->string('operation_type_id1', 11)->nullable();
$table->string('operation_type_fa1', 255)->nullable();
$table->string('operation_type_unit1', 255)->nullable();
$table->float('operation_type_amount1', null, 0)->nullable();
$table->float('operation_type_progress1', null, 0)->nullable();
$table->float('operation_type_tonaj1', null, 0)->nullable();
$table->string('operation_type_id2', 11)->nullable();
$table->string('operation_type_fa2', 255)->nullable();
$table->string('operation_type_unit2', 255)->nullable();
$table->float('operation_type_amount2', null, 0)->nullable();
$table->float('operation_type_progress2', null, 0)->nullable();
$table->float('operation_type_tonaj2', null, 0)->nullable();
$table->string('operation_type_id3', 11)->nullable();
$table->string('operation_type_fa3', 255)->nullable();
$table->string('operation_type_unit3', 255)->nullable();
$table->float('operation_type_amount3', null, 0)->nullable();
$table->float('operation_type_progress3', null, 0)->nullable();
$table->float('operation_type_tonaj3', null, 0)->nullable();
$table->string('operation_type_id4', 11)->nullable();
$table->string('operation_type_fa4', 255)->nullable();
$table->string('operation_type_unit4', 255)->nullable();
$table->float('operation_type_amount4', null, 0)->nullable();
$table->float('operation_type_progress4', null, 0)->nullable();
$table->float('operation_type_tonaj4', null, 0)->nullable();
$table->string('image_path1', 255)->nullable();
$table->string('image_path2', 255)->nullable();
$table->string('axis_name_fa', 255)->nullable();
$table->string('start_lat', 255)->nullable();
$table->string('end_lat', 255)->nullable();
$table->string('start_lng', 255)->nullable();
$table->string('end_lng', 255)->nullable();
$table->string('operator_phone')->nullable();
$table->dateTime('contract_date_from_parent_contract')->nullable();
$table->unsignedBigInteger('contract_id')->index('contract_foreign_key');
$table->bigInteger('start_way_id')->nullable();
$table->bigInteger('end_way_id')->nullable();
$table->unsignedBigInteger('user_id')->nullable();
$table->string('contract_moshaver_tarahi')->nullable()->default('not_set');
$table->string('contract_moshaver_nezarat')->nullable()->default('not_set');
$table->timestamps();
$table->unsignedBigInteger('required_bitumen')->nullable();
$table->unsignedBigInteger('used_bitumen')->nullable();
$table->string('bridge_number', 50)->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('contract_subitems');
}
};

View File

@@ -0,0 +1,34 @@
<?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('contractors', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name', 50)->nullable();
$table->bigInteger('province_id')->nullable();
$table->timestamp('created_at')->useCurrentOnUpdate()->useCurrent();
$table->timestamp('updated_at')->default('0000-00-00 00:00:00');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('contractors');
}
};

View File

@@ -0,0 +1,70 @@
<?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('contracts', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedTinyInteger('province_id')->index('province_foroign_key');
$table->string('province_fa');
$table->integer('office_id');
$table->string('office_fa');
$table->string('title');
$table->integer('status_id');
$table->string('status_fa');
$table->string('contract_date');
$table->string('contract_mojavez');
$table->string('contract_mojavez_fa');
$table->string('contract_mojavez_data_meli')->nullable();
$table->string('contract_mojavez_data_setad')->nullable();
$table->string('contract_tarh')->nullable();
$table->boolean('national_credit_license')->nullable();
$table->string('contract_credit_national')->nullable();
$table->boolean('province_credit_license')->nullable();
$table->string('contract_credit_province')->nullable();
$table->boolean('headquarter_issued_license')->nullable();
$table->binary('contract_credit_headquarter')->nullable();
$table->boolean('province_issued_license')->nullable();
$table->string('contract_credit');
$table->string('contract_peymankar');
$table->string('contract_moshaver_tarahi');
$table->string('contract_moshaver_nezarat');
$table->timestamps();
$table->bigInteger('unique_id')->default(0);
$table->string('created_at_fa')->nullable();
$table->string('contract_mojavez_array', 255)->nullable();
$table->string('contract_mojavez_data_meli_array', 255)->nullable();
$table->string('contract_mojavez_data_setad_array', 255)->nullable();
$table->string('contract_credit_national_array', 255)->nullable();
$table->string('contract_tarh_array', 255)->nullable();
$table->string('contract_mojavez_fa_array', 255)->nullable();
$table->integer('status_rel')->nullable()->default(1);
$table->string('credit_eblagh_meli')->nullable();
$table->string('credit_takhsis_meli')->nullable();
$table->unsignedInteger('user_id')->nullable()->index('user_foreign_key');
$table->integer('is_new')->nullable()->default(0);
$table->string('contract_number', 20)->nullable();
$table->text('documents')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('contracts');
}
};

View File

@@ -0,0 +1,59 @@
<?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('coridors', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedTinyInteger('province_id')->nullable()->index('coridors_province_id_foreign');
$table->unsignedSmallInteger('city_id')->nullable()->index('coridors_city_id_foreign');
$table->string('province_name')->nullable();
$table->string('city_name')->nullable();
$table->string('name')->nullable();
$table->string('status')->nullable();
$table->string('type')->nullable();
$table->string('team_num')->nullable();
$table->string('staff_num')->nullable();
$table->string('phone')->nullable();
$table->string('responsible_name')->nullable();
$table->string('responsible_mobile')->nullable();
$table->string('successor_name')->nullable();
$table->string('successor_mobile')->nullable();
$table->string('machines_light')->nullable();
$table->string('machines_sheavy')->nullable();
$table->string('machines_heavy')->nullable();
$table->string('code')->nullable();
$table->string('lat')->nullable();
$table->string('lng')->nullable();
$table->longText('machine_data')->nullable();
$table->longText('team_data')->nullable();
$table->string('start_lat')->nullable();
$table->string('start_lng')->nullable();
$table->string('end_lat')->nullable();
$table->string('end_lng')->nullable();
$table->string('color')->nullable();
$table->mediumText('geometry')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('coridors');
}
};

View File

@@ -0,0 +1,38 @@
<?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('daily_accident_histories', function (Blueprint $table) {
$table->bigInteger('id', true);
$table->boolean('state')->nullable();
$table->string('state_fa', 50)->nullable();
$table->string('message', 300)->nullable();
$table->integer('subject_id')->nullable();
$table->integer('user_id')->nullable();
$table->string('user_name', 100)->nullable();
$table->dateTime('created_at')->nullable();
$table->dateTime('updated_at')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('daily_accident_histories');
}
};

View File

@@ -0,0 +1,35 @@
<?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('daily_accident_settings', function (Blueprint $table) {
$table->integer('id', true);
$table->string('key', 70)->nullable();
$table->string('name', 70)->nullable();
$table->string('value', 100)->nullable();
$table->string('type', 70)->nullable();
$table->text('validation')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('daily_accident_settings');
}
};

View File

@@ -0,0 +1,114 @@
<?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('daily_accidents', function (Blueprint $table) {
$table->bigIncrements('id');
$table->integer('province_id')->nullable();
$table->string('province_fa')->nullable();
$table->string('axis_name', 200)->nullable();
$table->boolean('axis_type')->nullable();
$table->string('axis_type_fa', 200)->nullable();
$table->string('axis_start', 200)->nullable();
$table->string('axis_end', 200)->nullable();
$table->string('distance_axis_start', 20)->nullable();
$table->string('local_name', 200)->nullable();
$table->decimal('lat', 12, 10)->nullable();
$table->decimal('lng', 12, 10)->nullable();
$table->boolean('way_geometri')->nullable();
$table->string('way_geometri_fa', 80)->nullable();
$table->string('police_serial', 50)->nullable();
$table->integer('avarage_speed')->nullable();
$table->integer('legal_speed')->nullable();
$table->dateTime('accident_date')->nullable();
$table->time('accident_time')->nullable();
$table->string('day_of_the_week', 50)->nullable();
$table->boolean('direction')->nullable();
$table->string('direction_fa', 60)->nullable();
$table->integer('number_of_injured')->nullable();
$table->integer('number_of_died')->nullable();
$table->boolean('weather_condition')->nullable();
$table->string('weather_condition_fa', 100)->nullable();
$table->text('first_image')->nullable();
$table->text('second_image')->nullable();
$table->text('police_file')->nullable();
$table->boolean('collision_type')->nullable();
$table->string('collision_type_fa', 100)->nullable();
$table->boolean('participants_heavy_vehicle')->nullable();
$table->boolean('participants_light_vehicle')->nullable();
$table->boolean('participants_bicycle')->nullable();
$table->boolean('accident_type')->nullable();
$table->string('accident_type_fa', 50)->nullable();
$table->boolean('increase_damage_reasons_feqdan_jodakonnande_dar_miyane_rah')->nullable();
$table->boolean('increase_damage_reasons_naqs_ya_adam_kefayat_hefaze_miyani')->nullable();
$table->boolean('increase_damage_reasons_naqs_ya_adam_kefayat_narde_pol')->nullable();
$table->boolean('increase_damage_reasons_naqs_ya_adam_kefayat')->nullable();
$table->boolean('increase_damage_reasons_naqs_dar_naheye_enteqali')->nullable();
$table->boolean('increase_damage_reasons_mane_solb_bedone_hefaz')->nullable();
$table->boolean('increase_damage_reasons_sar_azad_hefaz')->nullable();
$table->boolean('increase_damage_reasons_shirvani_tond_ya_partgah')->nullable();
$table->boolean('accident_reason_dor_monaseb_dar_qus')->nullable();
$table->boolean('accident_reason_saraziri_tond')->nullable();
$table->boolean('accident_reason_nabod_dar_khat_sebqat_dar_sarbalaye')->nullable();
$table->boolean('accident_reason_mantaqe_ba_rizesh_az_divar')->nullable();
$table->boolean('accident_reason_mantaqe_ba_afzayesh_nagahani')->nullable();
$table->boolean('accident_reason_kahesh_na_monaseb_tedad')->nullable();
$table->boolean('accident_reason_mantaqe_ba_obor_heyvanat_ahli')->nullable();
$table->boolean('accident_reason_mantaqe_ba_tadakhol_terafiki')->nullable();
$table->boolean('accident_reason_arze_kam_savare_ro')->nullable();
$table->boolean('accident_reason_mantaqe_meh_gir')->nullable();
$table->boolean('accident_reason_adam_roshanaye_zarori_dar_noqte')->nullable();
$table->boolean('accident_reason_tabdil_na_monaseb_noe_rah')->nullable();
$table->boolean('accident_reason_oftadegi_dar_labe_asphalt')->nullable();
$table->boolean('accident_reason_naqs_dar_ashkarsazi_navahi')->nullable();
$table->boolean('accident_reason_mahal_na_monaseb_dastrasi')->nullable();
$table->boolean('accident_reason_roye_na_monaseb')->nullable();
$table->boolean('accident_reason_naqs_dar_ashkar_sazi_shrayet_khas')->nullable();
$table->boolean('accident_reason_hendese_na_monaseb_vorodi_va_khoroji')->nullable();
$table->boolean('accident_reason_adam_rayat_fasele_tooli')->nullable();
$table->boolean('accident_reason_naqs_dar_alayem_ekhtari_va_entezami')->nullable();
$table->boolean('accident_reason_qus_ofoqi_dar_saraziri_tond')->nullable();
$table->boolean('accident_reason_adam_rayat_obor')->nullable();
$table->boolean('accident_reason_naqs_dar_alayem_pish_agahi')->nullable();
$table->boolean('accident_reason_qarar_gire_qus_ofoqi')->nullable();
$table->boolean('accident_reason_adam_rayat_sebghat_mojaz')->nullable();
$table->boolean('accident_reason_did_na_kafi')->nullable();
$table->boolean('accident_reason_qus_tond_qaem')->nullable();
$table->boolean('accident_reason_adam_rayat_sorat_mojaz')->nullable();
$table->boolean('accident_reason_ebham_dar_masir')->nullable();
$table->boolean('accident_reason_qus_tond_ofoghi')->nullable();
$table->integer('state')->nullable()->default(2);
$table->string('state_fa', 50)->nullable()->default('در حال بررسی');
$table->string('message', 300)->nullable();
$table->dateTime('state_updated_at')->nullable();
$table->bigInteger('checker_user_id')->nullable();
$table->string('way_id', 255)->nullable();
$table->dateTime('created_at')->nullable();
$table->dateTime('updated_at')->nullable();
$table->integer('excell')->nullable()->default(1);
$table->string('time_temp', 255)->nullable();
$table->integer('develop')->nullable()->default(0);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('daily_accidents');
}
};

View File

@@ -0,0 +1,34 @@
<?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('damages', function (Blueprint $table) {
$table->increments('id');
$table->string('title', 200)->nullable();
$table->string('unit', 50)->nullable();
$table->unsignedBigInteger('base_price')->nullable();
$table->tinyInteger('status')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('damages');
}
};

View File

@@ -0,0 +1,43 @@
<?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('danger_point_accidents', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('point_id')->nullable()->index('danger_point_accidents_point_id_foreign');
$table->unsignedInteger('user_id')->nullable()->index('danger_point_accidents_user_id_foreign');
$table->string('serial_number')->nullable();
$table->date('accident_date')->nullable();
$table->string('accident_date_fa', 10)->nullable();
$table->unsignedTinyInteger('day')->nullable();
$table->string('time')->nullable();
$table->unsignedTinyInteger('accident_direction')->nullable();
$table->unsignedTinyInteger('collision_type')->nullable();
$table->longText('accident_factors')->nullable();
$table->unsignedTinyInteger('accident_type')->nullable();
$table->longText('accident_result')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('danger_point_accidents');
}
};

View File

@@ -0,0 +1,62 @@
<?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('danger_point_histories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('point_id')->nullable()->index('danger_point_histories_point_id_foreign');
$table->unsignedInteger('user_id')->nullable()->index('danger_point_histories_user_id_foreign');
$table->string('previous_code')->nullable();
$table->string('previous_axis_name')->nullable();
$table->unsignedTinyInteger('previous_axis_type')->nullable();
$table->string('previous_axis_start')->nullable();
$table->string('previous_axis_end')->nullable();
$table->string('previous_distance_axis_start')->nullable();
$table->string('previous_local_name')->nullable();
$table->string('previous_lat')->nullable();
$table->string('previous_lng')->nullable();
$table->boolean('previous_accident_251')->nullable();
$table->string('previous_accident_251_code')->nullable();
$table->string('previous_speed_limit')->nullable();
$table->string('previous_speed_average')->nullable();
$table->boolean('previous_accident_possibility')->nullable();
$table->boolean('previous_road_guard')->nullable();
$table->unsignedTinyInteger('previous_geometric_desc')->nullable();
$table->string('previous_accident_cause')->nullable();
$table->text('previous_accident_cause_suggest')->nullable();
$table->string('previous_accident_severity')->nullable();
$table->text('previous_accident_severity_suggest')->nullable();
$table->text('previous_correction_plan_done')->nullable();
$table->text('previous_correction_plan_doing')->nullable();
$table->text('previous_correction_plan_doing_desc')->nullable();
$table->text('previous_correction_plan_doing_suggest')->nullable();
$table->string('previous_signature_file')->nullable();
$table->string('previous_police_file')->nullable();
$table->boolean('previous_status')->nullable();
$table->text('previous_status_desc')->nullable();
$table->text('new_files')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('danger_point_histories');
}
};

View File

@@ -0,0 +1,77 @@
<?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('danger_points', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('code')->nullable();
$table->unsignedInteger('user_id')->nullable()->index('danger_points_user_id_foreign');
$table->unsignedTinyInteger('province_id')->nullable()->index('danger_points_province_id_foreign');
$table->string('province_fa')->nullable();
$table->unsignedSmallInteger('city_id')->nullable()->index('danger_points_city_id_foreign');
$table->string('city_fa')->nullable();
$table->string('axis_name')->nullable();
$table->unsignedTinyInteger('axis_type')->nullable();
$table->string('axis_type_fa')->nullable();
$table->string('axis_start')->nullable();
$table->string('axis_end')->nullable();
$table->string('distance_axis_start')->nullable();
$table->string('local_name')->nullable();
$table->string('lat')->nullable();
$table->string('lng')->nullable();
$table->boolean('accident_251')->default(false);
$table->string('accident_251_code')->nullable();
$table->string('speed_limit')->nullable();
$table->string('speed_average')->nullable();
$table->boolean('accident_possibility')->nullable();
$table->boolean('road_guard')->nullable();
$table->unsignedTinyInteger('geometric_desc')->nullable();
$table->string('geometric_desc_fa')->nullable();
$table->string('accident_cause')->nullable();
$table->text('accident_cause_suggest')->nullable();
$table->string('accident_severity')->nullable();
$table->text('accident_severity_suggest')->nullable();
$table->text('correction_plan_done')->nullable();
$table->text('correction_plan_doing')->nullable();
$table->text('correction_plan_doing_desc')->nullable();
$table->text('correction_plan_doing_suggest')->nullable();
$table->string('signature_file')->nullable();
$table->string('police_file')->nullable();
$table->boolean('status')->default(false);
$table->text('status_desc')->nullable();
$table->tinyInteger('accident_result_de')->nullable();
$table->tinyInteger('accident_result_in')->nullable();
$table->double('weighted_average', null, 0)->nullable();
$table->double('accident_zi', null, 0)->nullable();
$table->double('accident_p', null, 0)->nullable();
$table->double('accident_avg_weighted_average', null, 0)->nullable();
$table->double('standard_deviation', null, 0)->nullable();
$table->double('accident_sigma', null, 0)->nullable();
$table->double('accident_sigma_2', null, 0)->nullable();
$table->timestamps();
$table->string('n_axis_type_fa')->nullable();
$table->string('n_geometric_desc_fa')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('danger_points');
}
};

View File

@@ -0,0 +1,33 @@
<?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('edarate_ostani', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name_fa');
$table->timestamps();
$table->text('items_for_confirm')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('edarate_ostani');
}
};

View File

@@ -0,0 +1,34 @@
<?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('edarate_shahri_be_city', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('edarate_shahri_id')->default(0);
$table->smallInteger('city_id')->nullable();
$table->tinyInteger('is_primary')->nullable()->default(1);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('edarate_shahri_be_city');
}
};

View File

@@ -0,0 +1,33 @@
<?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('edarate_shahri', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name_fa');
$table->unsignedTinyInteger('province_id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('edarate_shahri');
}
};

View File

@@ -0,0 +1,35 @@
<?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('http_errors_list', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('status', 50)->nullable();
$table->text('value')->nullable();
$table->integer('serialized')->nullable();
$table->dateTime('updated_at')->nullable();
$table->dateTime('created_at')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('http_errors_list');
}
};

View File

@@ -0,0 +1,41 @@
<?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('info_items', function (Blueprint $table) {
$table->bigIncrements('id');
$table->integer('item')->nullable()->index('item');
$table->string('item_id')->nullable();
$table->string('item_str')->nullable();
$table->integer('sub_item')->nullable();
$table->string('sub_item_id')->nullable();
$table->string('sub_item_str')->nullable();
$table->string('sub_item_unit')->nullable();
$table->unsignedSmallInteger('needs_image')->nullable()->default(0);
$table->unsignedSmallInteger('needs_end_point')->nullable()->default(0);
$table->string('icon')->nullable();
$table->string('type')->nullable()->default('item');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('info_items');
}
};

View File

@@ -0,0 +1,52 @@
<?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('lawmakers_correspondences', function (Blueprint $table) {
$table->bigInteger('id', true);
$table->string('unique_code')->nullable();
$table->integer('province_id')->nullable();
$table->string('province_fa')->nullable();
$table->integer('constituency_id')->nullable();
$table->string('constituency_fa')->nullable();
$table->string('lawmaker_name')->nullable();
$table->text('project_name')->nullable();
$table->integer('unit_id')->nullable();
$table->string('unit_fa')->nullable();
$table->double('amount', null, 0)->nullable();
$table->double('total_credit', null, 0)->nullable();
$table->double('national_credit', null, 0)->nullable();
$table->double('province_credit', null, 0)->nullable();
$table->double('licence_credit', null, 0)->nullable();
$table->text('preaction_by_setad')->nullable();
$table->text('action_by_province')->nullable();
$table->text('needed_actions')->nullable();
$table->text('last_action')->nullable();
$table->integer('last_status_id')->nullable()->default(0);
$table->string('last_update_fa')->nullable();
$table->timestamp('created_at')->useCurrentOnUpdate()->useCurrent();
$table->timestamp('updated_at')->default('0000-00-00 00:00:00');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('lawmakers_correspondences');
}
};

View File

@@ -0,0 +1,34 @@
<?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('log_lists', function (Blueprint $table) {
$table->integer('id', true);
$table->string('description', 200)->nullable();
$table->string('log_unique_code', 20)->nullable();
$table->string('action_type', 20)->nullable();
$table->integer('is_done')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('log_lists');
}
};

View File

@@ -0,0 +1,35 @@
<?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('model_has_permissions', function (Blueprint $table) {
$table->unsignedBigInteger('permission_id');
$table->string('model_type');
$table->unsignedBigInteger('model_id');
$table->index(['model_id', 'model_type']);
$table->primary(['permission_id', 'model_id', 'model_type']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('model_has_permissions');
}
};

View File

@@ -0,0 +1,35 @@
<?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('model_has_roles', function (Blueprint $table) {
$table->unsignedBigInteger('role_id');
$table->string('model_type');
$table->unsignedBigInteger('model_id');
$table->index(['model_id', 'model_type']);
$table->primary(['role_id', 'model_id', 'model_type']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('model_has_roles');
}
};

View File

@@ -0,0 +1,49 @@
<?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('new_randd', function (Blueprint $table) {
$table->increments('id');
$table->string('title', 500)->nullable();
$table->string('province_id');
$table->string('province_fa');
$table->boolean('domain_id');
$table->string('domain_fa');
$table->string('project_amount');
$table->boolean('credit_status');
$table->string('rfp_file');
$table->string('unique_code');
$table->string('created_time_jalali');
$table->string('fname_creator');
$table->string('lname_creator');
$table->string('phone_creator');
$table->boolean('operation_status')->default(false);
$table->timestamps();
$table->string('proj_credit_resourse', 20)->nullable();
$table->string('unique_id', 255)->nullable();
$table->tinyInteger('project_status')->nullable()->default(1);
$table->text('reject_description')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('new_randd');
}
};

View File

@@ -0,0 +1,47 @@
<?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('observed_items', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('road_patrol_id')->nullable()->index('observed_items_road_patrol_id_foreign');
$table->unsignedTinyInteger('item_id')->nullable();
$table->string('item_name')->nullable();
$table->unsignedTinyInteger('sub_item_id')->nullable();
$table->string('sub_item_name')->nullable();
$table->string('local_name')->nullable();
$table->text('description')->nullable();
$table->unsignedSmallInteger('status')->nullable();
$table->string('status_fa', 100)->nullable();
$table->unsignedBigInteger('road_item_id')->nullable()->index('observed_items_road_item_id_foreign');
$table->double('start_lat', null, 0);
$table->double('start_lon', null, 0);
$table->double('end_lat', null, 0)->nullable();
$table->double('end_lon', null, 0)->nullable();
$table->timestamps();
$table->unsignedSmallInteger('priority')->nullable();
$table->string('priority_fa', 100)->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('observed_items');
}
};

View File

@@ -0,0 +1,36 @@
<?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('otps', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('phone_number');
$table->integer('verification_code');
$table->boolean('used')->default(false);
$table->string('ip');
$table->dateTime('expired_at');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('otps');
}
};

View File

@@ -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.
*
* @return void
*/
public function up()
{
Schema::create('password_resets', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('username');
$table->string('token');
$table->string('code');
$table->boolean('code_status')->nullable();
$table->boolean('status')->default(false);
$table->timestamp('expired_at')->useCurrentOnUpdate()->useCurrent();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('password_resets');
}
};

View File

@@ -0,0 +1,41 @@
<?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('permissions', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->string('guard_name');
$table->string('name_fa')->nullable();
$table->text('description')->nullable();
$table->timestamps();
$table->text('back_end_implementation_document')->nullable();
$table->text('fron_end_implementation_document')->nullable();
$table->string('type', 100)->nullable();
$table->string('type_fa', 119)->nullable();
$table->boolean('need_province')->nullable();
$table->boolean('need_edare_shahri')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('permissions');
}
};

View File

@@ -0,0 +1,34 @@
<?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('point_files', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('point_fileable_id');
$table->string('point_fileable_type');
$table->string('path');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('point_files');
}
};

View File

@@ -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.
*
* @return void
*/
public function up()
{
Schema::create('project_files', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('project_fileable_id');
$table->string('project_fileable_type');
$table->string('path');
$table->decimal('lat', 12, 10)->nullable();
$table->decimal('lng', 12, 10)->nullable();
$table->timestamps();
$table->integer('is_new')->nullable()->default(0);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('project_files');
}
};

View File

@@ -0,0 +1,75 @@
<?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('proposal_histories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('project_title', 300)->nullable();
$table->tinyInteger('project_type_id')->nullable();
$table->string('project_type_fa', 100)->nullable();
$table->tinyInteger('office_id')->nullable();
$table->string('office_fa', 100)->nullable();
$table->tinyInteger('province_id')->nullable();
$table->string('province_fa', 100)->nullable();
$table->integer('axis_type_id')->nullable();
$table->string('axis_type_fa', 100)->nullable();
$table->string('axis_name', 300)->nullable();
$table->tinyInteger('followup_priority_project_id')->nullable();
$table->string('followup_priority_project', 100)->nullable();
$table->tinyInteger('priority_project')->nullable();
$table->string('priority_project_fa', 100)->nullable();
$table->tinyInteger('status_id')->nullable();
$table->string('status_fa', 100)->nullable();
$table->string('unique_code', 100);
$table->integer('operation_type_id1')->nullable();
$table->string('operation_type_fa1', 255)->nullable();
$table->string('operation_type_unit1', 255)->nullable();
$table->string('operation_type_amount1', 255)->nullable();
$table->integer('operation_type_id2')->nullable();
$table->string('operation_type_fa2', 255)->nullable();
$table->string('operation_type_unit2', 255)->nullable();
$table->string('operation_type_amount2', 255)->nullable();
$table->integer('operation_type_id3')->nullable();
$table->string('operation_type_fa3', 255)->nullable();
$table->string('operation_type_unit3', 255)->nullable();
$table->string('operation_type_amount3', 255)->nullable();
$table->integer('operation_type_id4')->nullable();
$table->string('operation_type_fa4', 255)->nullable();
$table->string('operation_type_unit4', 255)->nullable();
$table->string('operation_type_amount4', 255)->nullable();
$table->string('start_lat', 255)->nullable();
$table->string('end_lat', 255)->nullable();
$table->string('start_lng', 255)->nullable();
$table->string('end_lng', 255)->nullable();
$table->unsignedBigInteger('user_id')->nullable();
$table->text('user_description')->nullable();
$table->string('national_credit')->nullable();
$table->string('province_credit')->nullable();
$table->string('created_at_fa')->nullable();
$table->string('updated_at_fa')->nullable();
$table->timestamps();
$table->unsignedBigInteger('proposal_id')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('proposal_histories');
}
};

Some files were not shown because too many files have changed in this diff Show More