Files
sam-api/app/Http/Requests/V1/AccountSubject/StoreAccountSubjectRequest.php
유병철 0044779eb4 feat: [finance] 계정과목 확장 및 전표 연동 시스템 구현
- AccountCode 모델/서비스 확장 (업데이트, 기본 계정과목 시딩)
- JournalSyncService 추가 (전표 자동 연동)
- SyncsExpenseAccounts 트레이트 추가
- CardTransactionController, TaxInvoiceController 기능 확장
- expense_accounts 테이블에 전표 연결 컬럼 마이그레이션
- account_codes 테이블 확장 마이그레이션
- 전체 테넌트 기본 계정과목 시딩 마이그레이션

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 10:32:20 +09:00

40 lines
1.4 KiB
PHP

<?php
namespace App\Http\Requests\V1\AccountSubject;
use Illuminate\Foundation\Http\FormRequest;
class StoreAccountSubjectRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'code' => ['required', 'string', 'max:10'],
'name' => ['required', 'string', 'max:100'],
'category' => ['nullable', 'string', 'in:asset,liability,capital,revenue,expense'],
'sub_category' => ['nullable', 'string', 'max:50'],
'parent_code' => ['nullable', 'string', 'max:10'],
'depth' => ['nullable', 'integer', 'in:1,2,3'],
'department_type' => ['nullable', 'string', 'in:common,manufacturing,admin'],
'description' => ['nullable', 'string', 'max:500'],
'sort_order' => ['nullable', 'integer'],
];
}
public function messages(): array
{
return [
'code.required' => '계정과목 코드를 입력하세요.',
'name.required' => '계정과목명을 입력하세요.',
'category.in' => '유효한 분류를 선택하세요.',
'depth.in' => '계층은 1(대), 2(중), 3(소) 중 하나여야 합니다.',
'department_type.in' => '부문은 common, manufacturing, admin 중 하나여야 합니다.',
];
}
}