From f231c60d3d3ab20bb5b0e364ebd2dc96282216c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Thu, 12 Mar 2026 14:02:50 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20[pmis]=20=EC=8B=9C=EA=B3=B5=EA=B4=80?= =?UTF-8?q?=EB=A6=AC=20=EC=9D=B8=EC=9B=90=EA=B4=80=EB=A6=AC=20=ED=85=8C?= =?UTF-8?q?=EC=9D=B4=EB=B8=94=20=EC=83=9D=EC=84=B1=20(job=5Ftypes,=20const?= =?UTF-8?q?ruction=5Fworkers)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ..._12_140000_create_pmis_job_types_table.php | 30 ++++++++++++++ ...create_pmis_construction_workers_table.php | 39 +++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 database/migrations/2026_03_12_140000_create_pmis_job_types_table.php create mode 100644 database/migrations/2026_03_12_140001_create_pmis_construction_workers_table.php diff --git a/database/migrations/2026_03_12_140000_create_pmis_job_types_table.php b/database/migrations/2026_03_12_140000_create_pmis_job_types_table.php new file mode 100644 index 0000000..7fcaecd --- /dev/null +++ b/database/migrations/2026_03_12_140000_create_pmis_job_types_table.php @@ -0,0 +1,30 @@ +id(); + $table->unsignedBigInteger('tenant_id'); + $table->string('name', 100); + $table->integer('sort_order')->default(0); + $table->boolean('is_active')->default(true); + $table->json('options')->nullable(); + $table->timestamps(); + $table->softDeletes(); + + $table->index('tenant_id'); + $table->index(['tenant_id', 'name']); + }); + } + + public function down(): void + { + Schema::dropIfExists('pmis_job_types'); + } +}; diff --git a/database/migrations/2026_03_12_140001_create_pmis_construction_workers_table.php b/database/migrations/2026_03_12_140001_create_pmis_construction_workers_table.php new file mode 100644 index 0000000..d2c021e --- /dev/null +++ b/database/migrations/2026_03_12_140001_create_pmis_construction_workers_table.php @@ -0,0 +1,39 @@ +id(); + $table->unsignedBigInteger('tenant_id'); + $table->string('company_name', 200); + $table->string('trade_name', 100); + $table->unsignedBigInteger('job_type_id')->nullable(); + $table->string('name', 50); + $table->string('phone', 20)->nullable(); + $table->string('birth_date', 6)->nullable()->comment('YYMMDD'); + $table->char('ssn_gender', 1)->nullable()->comment('주민번호 뒷자리 첫째'); + $table->unsignedInteger('wage')->default(0); + $table->string('blood_type', 5)->nullable(); + $table->text('remark')->nullable(); + $table->json('options')->nullable(); + $table->timestamps(); + $table->softDeletes(); + + $table->index('tenant_id'); + $table->index(['tenant_id', 'company_name']); + $table->index(['tenant_id', 'name']); + $table->foreign('job_type_id')->references('id')->on('pmis_job_types')->nullOnDelete(); + }); + } + + public function down(): void + { + Schema::dropIfExists('pmis_construction_workers'); + } +};