feat: [expense,loan] 대시보드 상세 필터 및 가지급금 카테고리 분류
- ExpectedExpenseController/Service: dashboardDetail에 start_date/end_date/search 파라미터 추가 - Loan 모델: category 상수 및 라벨 정의 (카드/경조사/상품권/접대비) - LoanService: dashboard에 category_breakdown 집계 추가 - 마이그레이션: loans 테이블 category 컬럼 추가 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* 가지급금 카테고리 컬럼 추가
|
||||
* D1.7 기획서: 카드/경조사/상품권/접대비 4개 카테고리 분류
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('loans', function (Blueprint $table) {
|
||||
$table->string('category', 30)
|
||||
->default('card')
|
||||
->after('status')
|
||||
->comment('카테고리: card, congratulatory, gift_certificate, entertainment');
|
||||
|
||||
$table->index(['tenant_id', 'category'], 'idx_tenant_category');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('loans', function (Blueprint $table) {
|
||||
$table->dropIndex('idx_tenant_category');
|
||||
$table->dropColumn('category');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user