feat(WEB): 작업지시/출근부 기능 개선 및 마이그레이션 추가
- 작업지시 우선순위 필드 추가 (priority 마이그레이션) - 수주-작업지시 품목 연동 source_order_item_id 컬럼 추가 - 수주 테이블에 account_code 필드 추가 - 작업지시 StoreRequest/UpdateRequest 우선순위 검증 추가 - WorkOrder 모델 priority fillable 추가 - 출근부 StoreRequest/UpdateRequest 검증 규칙 개선 - Employee Request 검증 규칙 수정 - SaleService/ItemService 수정 - WorkResultService 결과 처리 개선 - BankTransactionService 수정 - routes/api.php 엔드포인트 업데이트 - error.php 에러 메시지 추가 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('sales', function (Blueprint $table) {
|
||||
$table->string('account_code', 50)->nullable()->after('status')->comment('계정과목코드');
|
||||
$table->index('account_code', 'idx_account_code');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('sales', function (Blueprint $table) {
|
||||
$table->dropIndex('idx_account_code');
|
||||
$table->dropColumn('account_code');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* 작업지시 테이블에 우선순위 컬럼 추가
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('work_orders', function (Blueprint $table) {
|
||||
$table->unsignedTinyInteger('priority')->default(5)->after('status')
|
||||
->comment('우선순위: 1(긴급)~9(낮음), 기본값 5(일반)');
|
||||
$table->index(['tenant_id', 'priority'], 'idx_work_orders_tenant_priority');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('work_orders', function (Blueprint $table) {
|
||||
$table->dropIndex('idx_work_orders_tenant_priority');
|
||||
$table->dropColumn('priority');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user