feat:바로빌 계좌 거래 동기화 상태 테이블 마이그레이션 추가
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# 논리적 데이터베이스 관계 문서
|
# 논리적 데이터베이스 관계 문서
|
||||||
|
|
||||||
> **자동 생성**: 2026-02-12 20:26:02
|
> **자동 생성**: 2026-02-19 16:26:58
|
||||||
> **소스**: Eloquent 모델 관계 분석
|
> **소스**: Eloquent 모델 관계 분석
|
||||||
|
|
||||||
## 📊 모델별 관계 현황
|
## 📊 모델별 관계 현황
|
||||||
@@ -635,8 +635,10 @@ ### work_orders
|
|||||||
- **items()**: hasMany → `work_order_items`
|
- **items()**: hasMany → `work_order_items`
|
||||||
- **issues()**: hasMany → `work_order_issues`
|
- **issues()**: hasMany → `work_order_issues`
|
||||||
- **stepProgress()**: hasMany → `work_order_step_progress`
|
- **stepProgress()**: hasMany → `work_order_step_progress`
|
||||||
|
- **materialInputs()**: hasMany → `work_order_material_inputs`
|
||||||
- **shipments()**: hasMany → `shipments`
|
- **shipments()**: hasMany → `shipments`
|
||||||
- **bendingDetail()**: hasOne → `work_order_bending_details`
|
- **bendingDetail()**: hasOne → `work_order_bending_details`
|
||||||
|
- **documents()**: morphMany → `documents`
|
||||||
|
|
||||||
### work_order_assignees
|
### work_order_assignees
|
||||||
**모델**: `App\Models\Production\WorkOrderAssignee`
|
**모델**: `App\Models\Production\WorkOrderAssignee`
|
||||||
@@ -662,6 +664,16 @@ ### work_order_items
|
|||||||
- **workOrder()**: belongsTo → `work_orders`
|
- **workOrder()**: belongsTo → `work_orders`
|
||||||
- **item()**: belongsTo → `items`
|
- **item()**: belongsTo → `items`
|
||||||
- **sourceOrderItem()**: belongsTo → `order_items`
|
- **sourceOrderItem()**: belongsTo → `order_items`
|
||||||
|
- **materialInputs()**: hasMany → `work_order_material_inputs`
|
||||||
|
|
||||||
|
### work_order_material_inputs
|
||||||
|
**모델**: `App\Models\Production\WorkOrderMaterialInput`
|
||||||
|
|
||||||
|
- **workOrder()**: belongsTo → `work_orders`
|
||||||
|
- **workOrderItem()**: belongsTo → `work_order_items`
|
||||||
|
- **stockLot()**: belongsTo → `stock_lots`
|
||||||
|
- **item()**: belongsTo → `items`
|
||||||
|
- **inputBy()**: belongsTo → `users`
|
||||||
|
|
||||||
### work_order_step_progress
|
### work_order_step_progress
|
||||||
**모델**: `App\Models\Production\WorkOrderStepProgress`
|
**모델**: `App\Models\Production\WorkOrderStepProgress`
|
||||||
|
|||||||
@@ -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.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('barobill_bank_sync_status', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->foreignId('tenant_id')->constrained()->onDelete('cascade');
|
||||||
|
$table->string('bank_account_num', 50)->comment('계좌번호');
|
||||||
|
$table->string('synced_year_month', 6)->comment('동기화 완료된 월 (YYYYMM)');
|
||||||
|
$table->timestamp('synced_at')->comment('마지막 동기화 시각');
|
||||||
|
$table->timestamps();
|
||||||
|
|
||||||
|
$table->unique(
|
||||||
|
['tenant_id', 'bank_account_num', 'synced_year_month'],
|
||||||
|
'bb_sync_status_unique'
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('barobill_bank_sync_status');
|
||||||
|
}
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user