feat: [pmis] 장비관리 테이블 생성 (pmis_equipments)

This commit is contained in:
김보곤
2026-03-12 14:13:34 +09:00
parent f231c60d3d
commit e371b7c9ab

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
{
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');
}
};