feat: [pmis] 장비관리 테이블 생성 (pmis_equipments)
This commit is contained in:
@@ -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
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('pmis_equipments', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('tenant_id');
|
||||
$table->string('company_name', 200);
|
||||
$table->string('equipment_code', 50)->nullable();
|
||||
$table->string('equipment_name', 200);
|
||||
$table->string('specification', 300)->nullable();
|
||||
$table->string('unit', 50)->nullable();
|
||||
$table->string('equipment_number', 100);
|
||||
$table->string('operator', 50)->nullable()->comment('운전원');
|
||||
$table->date('inspection_end_date')->nullable()->comment('검사종료일');
|
||||
$table->boolean('inspection_not_applicable')->default(false)->comment('검사 해당없음');
|
||||
$table->date('insurance_end_date')->nullable()->comment('보험종료일');
|
||||
$table->boolean('insurance_not_applicable')->default(false)->comment('보험 해당없음');
|
||||
$table->json('options')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
$table->index('tenant_id');
|
||||
$table->index(['tenant_id', 'company_name']);
|
||||
$table->index(['tenant_id', 'equipment_name']);
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('pmis_equipments');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user