2025-09-24 22:30:28 +09:00
|
|
|
# 논리적 데이터베이스 관계 문서
|
|
|
|
|
|
2026-02-11 15:58:43 +09:00
|
|
|
> **자동 생성**: 2026-02-11 13:41:26
|
2025-10-14 22:26:15 +09:00
|
|
|
> **소스**: Eloquent 모델 관계 분석
|
|
|
|
|
|
|
|
|
|
## 📊 모델별 관계 현황
|
|
|
|
|
|
feat: Phase 6.1 악성채권 추심관리 API 구현
- 테이블 3개: bad_debts, bad_debt_documents, bad_debt_memos
- 모델 3개: BadDebt, BadDebtDocument, BadDebtMemo
- BadDebtService: CRUD, 요약 통계, 서류/메모 관리
- API 엔드포인트 11개 (목록, 등록, 상세, 수정, 삭제, 토글, 서류/메모 CRUD)
- Swagger 문서 작성 완료
2025-12-19 15:57:04 +09:00
|
|
|
### bad_debts
|
|
|
|
|
**모델**: `App\Models\BadDebts\BadDebt`
|
|
|
|
|
|
|
|
|
|
- **client()**: belongsTo → `clients`
|
|
|
|
|
- **assignedUser()**: belongsTo → `users`
|
|
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
- **documents()**: hasMany → `bad_debt_documents`
|
|
|
|
|
- **memos()**: hasMany → `bad_debt_memos`
|
|
|
|
|
|
|
|
|
|
### bad_debt_documents
|
|
|
|
|
**모델**: `App\Models\BadDebts\BadDebtDocument`
|
|
|
|
|
|
|
|
|
|
- **badDebt()**: belongsTo → `bad_debts`
|
|
|
|
|
- **file()**: belongsTo → `files`
|
|
|
|
|
|
|
|
|
|
### bad_debt_memos
|
|
|
|
|
**모델**: `App\Models\BadDebts\BadDebtMemo`
|
|
|
|
|
|
|
|
|
|
- **badDebt()**: belongsTo → `bad_debts`
|
|
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
|
2026-01-21 10:39:17 +09:00
|
|
|
### biddings
|
|
|
|
|
**모델**: `App\Models\Bidding\Bidding`
|
|
|
|
|
|
|
|
|
|
- **quote()**: belongsTo → `quotes`
|
|
|
|
|
- **client()**: belongsTo → `clients`
|
|
|
|
|
- **bidder()**: belongsTo → `users`
|
|
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
- **updater()**: belongsTo → `users`
|
|
|
|
|
|
2025-10-14 22:26:15 +09:00
|
|
|
### boards
|
|
|
|
|
**모델**: `App\Models\Boards\Board`
|
|
|
|
|
|
2025-12-09 09:40:01 +09:00
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
- **updater()**: belongsTo → `users`
|
2025-10-14 22:26:15 +09:00
|
|
|
- **customFields()**: hasMany → `board_settings`
|
|
|
|
|
- **posts()**: hasMany → `posts`
|
|
|
|
|
|
|
|
|
|
### board_comments
|
|
|
|
|
**모델**: `App\Models\Boards\BoardComment`
|
|
|
|
|
|
|
|
|
|
- **post()**: belongsTo → `posts`
|
|
|
|
|
- **user()**: belongsTo → `users`
|
|
|
|
|
- **parent()**: belongsTo → `board_comments`
|
|
|
|
|
- **children()**: hasMany → `board_comments`
|
|
|
|
|
|
|
|
|
|
### board_settings
|
|
|
|
|
**모델**: `App\Models\Boards\BoardSetting`
|
|
|
|
|
|
|
|
|
|
- **board()**: belongsTo → `boards`
|
|
|
|
|
|
|
|
|
|
### posts
|
|
|
|
|
**모델**: `App\Models\Boards\Post`
|
|
|
|
|
|
|
|
|
|
- **board()**: belongsTo → `boards`
|
2025-12-29 19:31:51 +09:00
|
|
|
- **files()**: hasMany → `files`
|
2025-10-14 22:26:15 +09:00
|
|
|
- **comments()**: hasMany → `board_comments`
|
|
|
|
|
|
|
|
|
|
### post_custom_field_values
|
|
|
|
|
**모델**: `App\Models\Boards\PostCustomFieldValue`
|
|
|
|
|
|
|
|
|
|
- **post()**: belongsTo → `posts`
|
|
|
|
|
- **field()**: belongsTo → `board_settings`
|
|
|
|
|
|
2026-01-02 21:06:06 +09:00
|
|
|
### category_groups
|
|
|
|
|
**모델**: `App\Models\CategoryGroup`
|
|
|
|
|
|
|
|
|
|
- **tenant()**: belongsTo → `tenants`
|
|
|
|
|
|
2025-10-14 22:26:15 +09:00
|
|
|
### categorys
|
|
|
|
|
**모델**: `App\Models\Commons\Category`
|
|
|
|
|
|
|
|
|
|
- **parent()**: belongsTo → `categories`
|
|
|
|
|
- **children()**: hasMany → `categories`
|
2026-01-20 20:51:42 +09:00
|
|
|
- **products()**: hasMany → `products`
|
2025-10-14 22:26:15 +09:00
|
|
|
- **categoryFields()**: hasMany → `category_fields`
|
|
|
|
|
|
|
|
|
|
### category_fields
|
|
|
|
|
**모델**: `App\Models\Commons\CategoryField`
|
|
|
|
|
|
|
|
|
|
- **category()**: belongsTo → `categories`
|
|
|
|
|
|
|
|
|
|
### category_logs
|
|
|
|
|
**모델**: `App\Models\Commons\CategoryLog`
|
|
|
|
|
|
|
|
|
|
- **category()**: belongsTo → `categories`
|
|
|
|
|
|
|
|
|
|
### category_templates
|
|
|
|
|
**모델**: `App\Models\Commons\CategoryTemplate`
|
|
|
|
|
|
|
|
|
|
- **category()**: belongsTo → `categories`
|
|
|
|
|
|
|
|
|
|
### files
|
|
|
|
|
**모델**: `App\Models\Commons\File`
|
|
|
|
|
|
2025-11-11 11:30:17 +09:00
|
|
|
- **tenant()**: belongsTo → `tenants`
|
feat: 파일 저장 시스템 DB 마이그레이션
- enhance_files_table: 이중 파일명 시스템 (display_name/stored_name), 폴더 관리, 문서 연결 지원
- create_folders_table: 동적 폴더 관리 시스템 (tenant별 커스터마이징 가능)
- 5개 stub 마이그레이션 생성 (file_share_links, file_deletion_logs, storage_usage_history, add_storage_columns_to_tenants)
- FolderSeeder stub 생성
- CURRENT_WORKS.md에 Phase 1 진행상황 문서화
fix: 파일 공유 및 삭제 기능 버그 수정
- ShareLinkRequest: PATH 파라미터 {id}를 file_id로 자동 병합
- routes/api.php: 공유 링크 다운로드를 auth.apikey 그룹 밖으로 이동 (인증 불필요)
- FileShareLink: File, Tenant 클래스 import 추가
- File 모델: softDeleteFile()에서 SoftDeletes의 delete() 메서드 사용
- FileStorageService: getTrash(), restoreFile(), permanentDelete()에서 onlyTrashed() 사용
- File 모델: Tenant 네임스페이스 수정 (App\Models\Tenants\Tenant)
refactor: Swagger 문서 정리 - File 태그를 Files로 통합
- FileApi.php의 모든 태그를 Files로 변경
- 구 파일 시스템 라우트 삭제 (prefix 'file')
- 구 FileController.php 삭제
- 신규 파일 저장소 시스템으로 완전 통합
fix: 모든 legacy 파일 컬럼 nullable 일괄 처리
- 5개 legacy 컬럼을 한 번에 nullable로 변경
* original_name, file_name, file_name_old (string)
* fileable_id, fileable_type (polymorphic)
- foreach 루프로 반복 작업 자동화
- 신규/기존 시스템 간 완전한 하위 호환성 확보
fix: legacy 파일 컬럼 nullable 처리 완료
- file_name, file_name_old 컬럼도 nullable로 변경
- 기존 시스템과 신규 시스템 간 완전한 하위 호환성 확보
- Legacy: original_name, file_name, file_name_old (nullable)
- New: display_name, stored_name (required)
fix: original_name 컬럼 nullable 처리
- original_name을 nullable로 변경하여 하위 호환성 유지
- 새 시스템에서는 display_name 사용, 기존 시스템은 original_name 사용 가능
fix: 파일 업로드 DB 컬럼 누락 및 메시지 구조 개선
- files 테이블에 감사 컬럼 추가 (created_by, updated_by, uploaded_by)
- ApiResponse::handle() 메시지 로직 개선 (접미사 제거)
- 다국어 지원을 위한 완성된 문장 구조 유지
- FileUploadRequest 파일 검증 규칙 수정
fix: 파일 저장소 버그 수정 및 신규 테넌트 폴더 자동 생성
- FolderSeeder 네임스페이스 수정 (App\Models\Tenant → App\Models\Tenants\Tenant)
- FileStorageController use 문 구문 오류 수정 (/ → \)
- TenantObserver에 신규 테넌트 기본 폴더 자동 생성 로직 추가
- 5개 기본 폴더 (생산관리, 품질관리, 회계, 인사, 일반)
- 에러 처리 및 로깅
- 회원가입 시 자동 실행
2025-11-10 19:08:56 +09:00
|
|
|
- **folder()**: belongsTo → `folders`
|
2025-10-14 22:26:15 +09:00
|
|
|
- **uploader()**: belongsTo → `users`
|
feat: 파일 저장 시스템 DB 마이그레이션
- enhance_files_table: 이중 파일명 시스템 (display_name/stored_name), 폴더 관리, 문서 연결 지원
- create_folders_table: 동적 폴더 관리 시스템 (tenant별 커스터마이징 가능)
- 5개 stub 마이그레이션 생성 (file_share_links, file_deletion_logs, storage_usage_history, add_storage_columns_to_tenants)
- FolderSeeder stub 생성
- CURRENT_WORKS.md에 Phase 1 진행상황 문서화
fix: 파일 공유 및 삭제 기능 버그 수정
- ShareLinkRequest: PATH 파라미터 {id}를 file_id로 자동 병합
- routes/api.php: 공유 링크 다운로드를 auth.apikey 그룹 밖으로 이동 (인증 불필요)
- FileShareLink: File, Tenant 클래스 import 추가
- File 모델: softDeleteFile()에서 SoftDeletes의 delete() 메서드 사용
- FileStorageService: getTrash(), restoreFile(), permanentDelete()에서 onlyTrashed() 사용
- File 모델: Tenant 네임스페이스 수정 (App\Models\Tenants\Tenant)
refactor: Swagger 문서 정리 - File 태그를 Files로 통합
- FileApi.php의 모든 태그를 Files로 변경
- 구 파일 시스템 라우트 삭제 (prefix 'file')
- 구 FileController.php 삭제
- 신규 파일 저장소 시스템으로 완전 통합
fix: 모든 legacy 파일 컬럼 nullable 일괄 처리
- 5개 legacy 컬럼을 한 번에 nullable로 변경
* original_name, file_name, file_name_old (string)
* fileable_id, fileable_type (polymorphic)
- foreach 루프로 반복 작업 자동화
- 신규/기존 시스템 간 완전한 하위 호환성 확보
fix: legacy 파일 컬럼 nullable 처리 완료
- file_name, file_name_old 컬럼도 nullable로 변경
- 기존 시스템과 신규 시스템 간 완전한 하위 호환성 확보
- Legacy: original_name, file_name, file_name_old (nullable)
- New: display_name, stored_name (required)
fix: original_name 컬럼 nullable 처리
- original_name을 nullable로 변경하여 하위 호환성 유지
- 새 시스템에서는 display_name 사용, 기존 시스템은 original_name 사용 가능
fix: 파일 업로드 DB 컬럼 누락 및 메시지 구조 개선
- files 테이블에 감사 컬럼 추가 (created_by, updated_by, uploaded_by)
- ApiResponse::handle() 메시지 로직 개선 (접미사 제거)
- 다국어 지원을 위한 완성된 문장 구조 유지
- FileUploadRequest 파일 검증 규칙 수정
fix: 파일 저장소 버그 수정 및 신규 테넌트 폴더 자동 생성
- FolderSeeder 네임스페이스 수정 (App\Models\Tenant → App\Models\Tenants\Tenant)
- FileStorageController use 문 구문 오류 수정 (/ → \)
- TenantObserver에 신규 테넌트 기본 폴더 자동 생성 로직 추가
- 5개 기본 폴더 (생산관리, 품질관리, 회계, 인사, 일반)
- 에러 처리 및 로깅
- 회원가입 시 자동 실행
2025-11-10 19:08:56 +09:00
|
|
|
- **shareLinks()**: hasMany → `file_share_links`
|
2025-10-14 22:26:15 +09:00
|
|
|
- **fileable()**: morphTo → `(Polymorphic)`
|
|
|
|
|
|
2025-12-02 22:11:25 +09:00
|
|
|
### global_menus
|
|
|
|
|
**모델**: `App\Models\Commons\GlobalMenu`
|
|
|
|
|
|
|
|
|
|
- **parent()**: belongsTo → `global_menus`
|
|
|
|
|
- **children()**: hasMany → `global_menus`
|
|
|
|
|
- **tenantMenus()**: hasMany → `menus`
|
|
|
|
|
|
2025-10-14 22:26:15 +09:00
|
|
|
### menus
|
|
|
|
|
**모델**: `App\Models\Commons\Menu`
|
|
|
|
|
|
|
|
|
|
- **parent()**: belongsTo → `menus`
|
2025-12-02 22:11:25 +09:00
|
|
|
- **globalMenu()**: belongsTo → `global_menus`
|
2025-10-14 22:26:15 +09:00
|
|
|
- **children()**: hasMany → `menus`
|
|
|
|
|
|
|
|
|
|
### tags
|
|
|
|
|
**모델**: `App\Models\Commons\Tag`
|
|
|
|
|
|
|
|
|
|
- **tenant()**: belongsTo → `tenants`
|
|
|
|
|
|
2025-12-22 17:42:59 +09:00
|
|
|
### company_requests
|
|
|
|
|
**모델**: `App\Models\CompanyRequest`
|
|
|
|
|
|
|
|
|
|
- **user()**: belongsTo → `users`
|
|
|
|
|
- **approver()**: belongsTo → `users`
|
|
|
|
|
- **createdTenant()**: belongsTo → `tenants`
|
|
|
|
|
|
2026-01-13 19:49:49 +09:00
|
|
|
### contracts
|
|
|
|
|
**모델**: `App\Models\Construction\Contract`
|
|
|
|
|
|
|
|
|
|
- **contractManager()**: belongsTo → `users`
|
|
|
|
|
- **constructionPm()**: belongsTo → `users`
|
2026-01-21 10:39:17 +09:00
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
- **updater()**: belongsTo → `users`
|
|
|
|
|
- **handoverReport()**: hasOne → `handover_reports`
|
|
|
|
|
|
|
|
|
|
### handover_reports
|
|
|
|
|
**모델**: `App\Models\Construction\HandoverReport`
|
|
|
|
|
|
|
|
|
|
- **contract()**: belongsTo → `contracts`
|
|
|
|
|
- **contractManager()**: belongsTo → `users`
|
|
|
|
|
- **constructionPm()**: belongsTo → `users`
|
|
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
- **updater()**: belongsTo → `users`
|
|
|
|
|
- **managers()**: hasMany → `handover_report_managers`
|
|
|
|
|
- **items()**: hasMany → `handover_report_items`
|
|
|
|
|
|
|
|
|
|
### handover_report_items
|
|
|
|
|
**모델**: `App\Models\Construction\HandoverReportItem`
|
|
|
|
|
|
|
|
|
|
- **handoverReport()**: belongsTo → `handover_reports`
|
|
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
- **updater()**: belongsTo → `users`
|
|
|
|
|
|
|
|
|
|
### handover_report_managers
|
|
|
|
|
**모델**: `App\Models\Construction\HandoverReportManager`
|
|
|
|
|
|
|
|
|
|
- **handoverReport()**: belongsTo → `handover_reports`
|
|
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
- **updater()**: belongsTo → `users`
|
|
|
|
|
|
|
|
|
|
### structure_reviews
|
|
|
|
|
**모델**: `App\Models\Construction\StructureReview`
|
|
|
|
|
|
2026-01-13 19:49:49 +09:00
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
- **updater()**: belongsTo → `users`
|
|
|
|
|
|
2025-10-14 22:26:15 +09:00
|
|
|
### bom_templates
|
|
|
|
|
**모델**: `App\Models\Design\BomTemplate`
|
|
|
|
|
|
|
|
|
|
- **modelVersion()**: belongsTo → `model_versions`
|
|
|
|
|
- **items()**: hasMany → `bom_template_items`
|
|
|
|
|
|
|
|
|
|
### bom_template_items
|
|
|
|
|
**모델**: `App\Models\Design\BomTemplateItem`
|
|
|
|
|
|
|
|
|
|
- **template()**: belongsTo → `bom_templates`
|
|
|
|
|
|
|
|
|
|
### design_models
|
|
|
|
|
**모델**: `App\Models\Design\DesignModel`
|
|
|
|
|
|
|
|
|
|
- **versions()**: hasMany → `model_versions`
|
|
|
|
|
|
|
|
|
|
### model_versions
|
|
|
|
|
**모델**: `App\Models\Design\ModelVersion`
|
|
|
|
|
|
|
|
|
|
- **model()**: belongsTo → `models`
|
|
|
|
|
- **bomTemplates()**: hasMany → `bom_templates`
|
|
|
|
|
|
2026-01-29 01:12:40 +09:00
|
|
|
### documents
|
|
|
|
|
**모델**: `App\Models\Documents\Document`
|
|
|
|
|
|
2026-02-03 17:13:04 +09:00
|
|
|
- **template()**: belongsTo → `document_templates`
|
2026-01-29 01:12:40 +09:00
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
- **updater()**: belongsTo → `users`
|
|
|
|
|
- **approvals()**: hasMany → `document_approvals`
|
|
|
|
|
- **data()**: hasMany → `document_data`
|
|
|
|
|
- **attachments()**: hasMany → `document_attachments`
|
|
|
|
|
- **linkable()**: morphTo → `(Polymorphic)`
|
|
|
|
|
|
|
|
|
|
### document_approvals
|
|
|
|
|
**모델**: `App\Models\Documents\DocumentApproval`
|
|
|
|
|
|
|
|
|
|
- **document()**: belongsTo → `documents`
|
|
|
|
|
- **user()**: belongsTo → `users`
|
|
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
|
|
|
|
|
### document_attachments
|
|
|
|
|
**모델**: `App\Models\Documents\DocumentAttachment`
|
|
|
|
|
|
|
|
|
|
- **document()**: belongsTo → `documents`
|
|
|
|
|
- **file()**: belongsTo → `files`
|
|
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
|
|
|
|
|
### document_datas
|
|
|
|
|
**모델**: `App\Models\Documents\DocumentData`
|
|
|
|
|
|
|
|
|
|
- **document()**: belongsTo → `documents`
|
|
|
|
|
|
2026-02-04 23:07:08 +09:00
|
|
|
### document_links
|
|
|
|
|
**모델**: `App\Models\Documents\DocumentLink`
|
|
|
|
|
|
|
|
|
|
- **document()**: belongsTo → `documents`
|
|
|
|
|
- **linkDefinition()**: belongsTo → `document_template_links`
|
|
|
|
|
|
2026-02-03 17:13:04 +09:00
|
|
|
### document_templates
|
|
|
|
|
**모델**: `App\Models\Documents\DocumentTemplate`
|
|
|
|
|
|
|
|
|
|
- **approvalLines()**: hasMany → `document_template_approval_lines`
|
|
|
|
|
- **basicFields()**: hasMany → `document_template_basic_fields`
|
|
|
|
|
- **sections()**: hasMany → `document_template_sections`
|
|
|
|
|
- **columns()**: hasMany → `document_template_columns`
|
2026-02-04 23:07:08 +09:00
|
|
|
- **sectionFields()**: hasMany → `document_template_section_fields`
|
|
|
|
|
- **links()**: hasMany → `document_template_links`
|
2026-02-03 17:13:04 +09:00
|
|
|
|
|
|
|
|
### document_template_approval_lines
|
|
|
|
|
**모델**: `App\Models\Documents\DocumentTemplateApprovalLine`
|
|
|
|
|
|
|
|
|
|
- **template()**: belongsTo → `document_templates`
|
|
|
|
|
|
|
|
|
|
### document_template_basic_fields
|
|
|
|
|
**모델**: `App\Models\Documents\DocumentTemplateBasicField`
|
|
|
|
|
|
|
|
|
|
- **template()**: belongsTo → `document_templates`
|
|
|
|
|
|
|
|
|
|
### document_template_columns
|
|
|
|
|
**모델**: `App\Models\Documents\DocumentTemplateColumn`
|
|
|
|
|
|
|
|
|
|
- **template()**: belongsTo → `document_templates`
|
|
|
|
|
|
2026-02-04 23:07:08 +09:00
|
|
|
### document_template_links
|
|
|
|
|
**모델**: `App\Models\Documents\DocumentTemplateLink`
|
|
|
|
|
|
|
|
|
|
- **template()**: belongsTo → `document_templates`
|
|
|
|
|
- **linkValues()**: hasMany → `document_template_link_values`
|
|
|
|
|
|
|
|
|
|
### document_template_link_values
|
|
|
|
|
**모델**: `App\Models\Documents\DocumentTemplateLinkValue`
|
|
|
|
|
|
|
|
|
|
- **template()**: belongsTo → `document_templates`
|
|
|
|
|
- **link()**: belongsTo → `document_template_links`
|
|
|
|
|
|
2026-02-03 17:13:04 +09:00
|
|
|
### document_template_sections
|
|
|
|
|
**모델**: `App\Models\Documents\DocumentTemplateSection`
|
|
|
|
|
|
|
|
|
|
- **template()**: belongsTo → `document_templates`
|
|
|
|
|
- **items()**: hasMany → `document_template_section_items`
|
|
|
|
|
|
2026-02-04 23:07:08 +09:00
|
|
|
### document_template_section_fields
|
|
|
|
|
**모델**: `App\Models\Documents\DocumentTemplateSectionField`
|
|
|
|
|
|
|
|
|
|
- **template()**: belongsTo → `document_templates`
|
|
|
|
|
|
2026-02-03 17:13:04 +09:00
|
|
|
### document_template_section_items
|
|
|
|
|
**모델**: `App\Models\Documents\DocumentTemplateSectionItem`
|
|
|
|
|
|
|
|
|
|
- **section()**: belongsTo → `document_template_sections`
|
|
|
|
|
|
2025-10-14 22:26:15 +09:00
|
|
|
### estimates
|
|
|
|
|
**모델**: `App\Models\Estimate\Estimate`
|
|
|
|
|
|
|
|
|
|
- **modelSet()**: belongsTo → `categories`
|
|
|
|
|
- **items()**: hasMany → `estimate_items`
|
|
|
|
|
|
|
|
|
|
### estimate_items
|
|
|
|
|
**모델**: `App\Models\Estimate\EstimateItem`
|
|
|
|
|
|
|
|
|
|
- **estimate()**: belongsTo → `estimates`
|
|
|
|
|
|
2025-12-24 08:54:52 +09:00
|
|
|
### fcm_send_logs
|
|
|
|
|
**모델**: `App\Models\FcmSendLog`
|
|
|
|
|
|
|
|
|
|
|
feat: 파일 저장 시스템 DB 마이그레이션
- enhance_files_table: 이중 파일명 시스템 (display_name/stored_name), 폴더 관리, 문서 연결 지원
- create_folders_table: 동적 폴더 관리 시스템 (tenant별 커스터마이징 가능)
- 5개 stub 마이그레이션 생성 (file_share_links, file_deletion_logs, storage_usage_history, add_storage_columns_to_tenants)
- FolderSeeder stub 생성
- CURRENT_WORKS.md에 Phase 1 진행상황 문서화
fix: 파일 공유 및 삭제 기능 버그 수정
- ShareLinkRequest: PATH 파라미터 {id}를 file_id로 자동 병합
- routes/api.php: 공유 링크 다운로드를 auth.apikey 그룹 밖으로 이동 (인증 불필요)
- FileShareLink: File, Tenant 클래스 import 추가
- File 모델: softDeleteFile()에서 SoftDeletes의 delete() 메서드 사용
- FileStorageService: getTrash(), restoreFile(), permanentDelete()에서 onlyTrashed() 사용
- File 모델: Tenant 네임스페이스 수정 (App\Models\Tenants\Tenant)
refactor: Swagger 문서 정리 - File 태그를 Files로 통합
- FileApi.php의 모든 태그를 Files로 변경
- 구 파일 시스템 라우트 삭제 (prefix 'file')
- 구 FileController.php 삭제
- 신규 파일 저장소 시스템으로 완전 통합
fix: 모든 legacy 파일 컬럼 nullable 일괄 처리
- 5개 legacy 컬럼을 한 번에 nullable로 변경
* original_name, file_name, file_name_old (string)
* fileable_id, fileable_type (polymorphic)
- foreach 루프로 반복 작업 자동화
- 신규/기존 시스템 간 완전한 하위 호환성 확보
fix: legacy 파일 컬럼 nullable 처리 완료
- file_name, file_name_old 컬럼도 nullable로 변경
- 기존 시스템과 신규 시스템 간 완전한 하위 호환성 확보
- Legacy: original_name, file_name, file_name_old (nullable)
- New: display_name, stored_name (required)
fix: original_name 컬럼 nullable 처리
- original_name을 nullable로 변경하여 하위 호환성 유지
- 새 시스템에서는 display_name 사용, 기존 시스템은 original_name 사용 가능
fix: 파일 업로드 DB 컬럼 누락 및 메시지 구조 개선
- files 테이블에 감사 컬럼 추가 (created_by, updated_by, uploaded_by)
- ApiResponse::handle() 메시지 로직 개선 (접미사 제거)
- 다국어 지원을 위한 완성된 문장 구조 유지
- FileUploadRequest 파일 검증 규칙 수정
fix: 파일 저장소 버그 수정 및 신규 테넌트 폴더 자동 생성
- FolderSeeder 네임스페이스 수정 (App\Models\Tenant → App\Models\Tenants\Tenant)
- FileStorageController use 문 구문 오류 수정 (/ → \)
- TenantObserver에 신규 테넌트 기본 폴더 자동 생성 로직 추가
- 5개 기본 폴더 (생산관리, 품질관리, 회계, 인사, 일반)
- 에러 처리 및 로깅
- 회원가입 시 자동 실행
2025-11-10 19:08:56 +09:00
|
|
|
### file_share_links
|
|
|
|
|
**모델**: `App\Models\FileShareLink`
|
|
|
|
|
|
2025-11-11 11:30:17 +09:00
|
|
|
- **file()**: belongsTo → `files`
|
|
|
|
|
- **tenant()**: belongsTo → `tenants`
|
feat: 파일 저장 시스템 DB 마이그레이션
- enhance_files_table: 이중 파일명 시스템 (display_name/stored_name), 폴더 관리, 문서 연결 지원
- create_folders_table: 동적 폴더 관리 시스템 (tenant별 커스터마이징 가능)
- 5개 stub 마이그레이션 생성 (file_share_links, file_deletion_logs, storage_usage_history, add_storage_columns_to_tenants)
- FolderSeeder stub 생성
- CURRENT_WORKS.md에 Phase 1 진행상황 문서화
fix: 파일 공유 및 삭제 기능 버그 수정
- ShareLinkRequest: PATH 파라미터 {id}를 file_id로 자동 병합
- routes/api.php: 공유 링크 다운로드를 auth.apikey 그룹 밖으로 이동 (인증 불필요)
- FileShareLink: File, Tenant 클래스 import 추가
- File 모델: softDeleteFile()에서 SoftDeletes의 delete() 메서드 사용
- FileStorageService: getTrash(), restoreFile(), permanentDelete()에서 onlyTrashed() 사용
- File 모델: Tenant 네임스페이스 수정 (App\Models\Tenants\Tenant)
refactor: Swagger 문서 정리 - File 태그를 Files로 통합
- FileApi.php의 모든 태그를 Files로 변경
- 구 파일 시스템 라우트 삭제 (prefix 'file')
- 구 FileController.php 삭제
- 신규 파일 저장소 시스템으로 완전 통합
fix: 모든 legacy 파일 컬럼 nullable 일괄 처리
- 5개 legacy 컬럼을 한 번에 nullable로 변경
* original_name, file_name, file_name_old (string)
* fileable_id, fileable_type (polymorphic)
- foreach 루프로 반복 작업 자동화
- 신규/기존 시스템 간 완전한 하위 호환성 확보
fix: legacy 파일 컬럼 nullable 처리 완료
- file_name, file_name_old 컬럼도 nullable로 변경
- 기존 시스템과 신규 시스템 간 완전한 하위 호환성 확보
- Legacy: original_name, file_name, file_name_old (nullable)
- New: display_name, stored_name (required)
fix: original_name 컬럼 nullable 처리
- original_name을 nullable로 변경하여 하위 호환성 유지
- 새 시스템에서는 display_name 사용, 기존 시스템은 original_name 사용 가능
fix: 파일 업로드 DB 컬럼 누락 및 메시지 구조 개선
- files 테이블에 감사 컬럼 추가 (created_by, updated_by, uploaded_by)
- ApiResponse::handle() 메시지 로직 개선 (접미사 제거)
- 다국어 지원을 위한 완성된 문장 구조 유지
- FileUploadRequest 파일 검증 규칙 수정
fix: 파일 저장소 버그 수정 및 신규 테넌트 폴더 자동 생성
- FolderSeeder 네임스페이스 수정 (App\Models\Tenant → App\Models\Tenants\Tenant)
- FileStorageController use 문 구문 오류 수정 (/ → \)
- TenantObserver에 신규 테넌트 기본 폴더 자동 생성 로직 추가
- 5개 기본 폴더 (생산관리, 품질관리, 회계, 인사, 일반)
- 에러 처리 및 로깅
- 회원가입 시 자동 실행
2025-11-10 19:08:56 +09:00
|
|
|
|
|
|
|
|
### folders
|
|
|
|
|
**모델**: `App\Models\Folder`
|
|
|
|
|
|
|
|
|
|
|
2026-02-07 03:27:07 +09:00
|
|
|
### interview_answers
|
|
|
|
|
**모델**: `App\Models\Interview\InterviewAnswer`
|
|
|
|
|
|
|
|
|
|
- **session()**: belongsTo → `interview_sessions`
|
|
|
|
|
- **question()**: belongsTo → `interview_questions`
|
|
|
|
|
- **template()**: belongsTo → `interview_templates`
|
|
|
|
|
|
|
|
|
|
### interview_categorys
|
|
|
|
|
**모델**: `App\Models\Interview\InterviewCategory`
|
|
|
|
|
|
|
|
|
|
- **templates()**: hasMany → `interview_templates`
|
|
|
|
|
- **sessions()**: hasMany → `interview_sessions`
|
|
|
|
|
|
|
|
|
|
### interview_questions
|
|
|
|
|
**모델**: `App\Models\Interview\InterviewQuestion`
|
|
|
|
|
|
|
|
|
|
- **template()**: belongsTo → `interview_templates`
|
|
|
|
|
|
|
|
|
|
### interview_sessions
|
|
|
|
|
**모델**: `App\Models\Interview\InterviewSession`
|
|
|
|
|
|
|
|
|
|
- **category()**: belongsTo → `interview_categories`
|
|
|
|
|
- **answers()**: hasMany → `interview_answers`
|
|
|
|
|
|
|
|
|
|
### interview_templates
|
|
|
|
|
**모델**: `App\Models\Interview\InterviewTemplate`
|
|
|
|
|
|
|
|
|
|
- **category()**: belongsTo → `interview_categories`
|
|
|
|
|
- **questions()**: hasMany → `interview_questions`
|
|
|
|
|
|
feat: ItemMaster 데이터베이스 구조 구축 (9개 테이블)
- 마이그레이션 9개 생성 (unit_options, section_templates, item_master_fields, item_pages, item_sections, item_fields, item_bom_items, custom_tabs, tab_columns)
- Eloquent 모델 9개 구현 (ItemMaster 네임스페이스)
- ItemMasterSeeder 작성 및 테스트 데이터 생성
주요 특징:
- Multi-tenant 지원 (BelongsToTenant trait)
- Soft Delete 적용 (deleted_at, deleted_by)
- 감사 로그 지원 (created_by, updated_by)
- JSON 필드로 동적 속성 지원 (display_condition, validation_rules, options, properties)
- FK 제약조건 및 Composite Index 설정
- 계층 구조 (ItemPage → ItemSection → ItemField/ItemBomItem)
SAM API Development Rules 준수
2025-11-20 16:36:55 +09:00
|
|
|
### custom_tabs
|
|
|
|
|
**모델**: `App\Models\ItemMaster\CustomTab`
|
|
|
|
|
|
|
|
|
|
- **columnSetting()**: hasOne → `tab_columns`
|
|
|
|
|
|
2025-11-26 14:09:31 +09:00
|
|
|
### entity_relationships
|
|
|
|
|
**모델**: `App\Models\ItemMaster\EntityRelationship`
|
|
|
|
|
|
|
|
|
|
- **parent()**: morphTo → `(Polymorphic)`
|
|
|
|
|
- **child()**: morphTo → `(Polymorphic)`
|
|
|
|
|
|
feat: ItemMaster 데이터베이스 구조 구축 (9개 테이블)
- 마이그레이션 9개 생성 (unit_options, section_templates, item_master_fields, item_pages, item_sections, item_fields, item_bom_items, custom_tabs, tab_columns)
- Eloquent 모델 9개 구현 (ItemMaster 네임스페이스)
- ItemMasterSeeder 작성 및 테스트 데이터 생성
주요 특징:
- Multi-tenant 지원 (BelongsToTenant trait)
- Soft Delete 적용 (deleted_at, deleted_by)
- 감사 로그 지원 (created_by, updated_by)
- JSON 필드로 동적 속성 지원 (display_condition, validation_rules, options, properties)
- FK 제약조건 및 Composite Index 설정
- 계층 구조 (ItemPage → ItemSection → ItemField/ItemBomItem)
SAM API Development Rules 준수
2025-11-20 16:36:55 +09:00
|
|
|
### item_pages
|
|
|
|
|
**모델**: `App\Models\ItemMaster\ItemPage`
|
|
|
|
|
|
2025-11-26 14:09:31 +09:00
|
|
|
- **sectionRelationships()**: hasMany → `entity_relationships`
|
|
|
|
|
- **fieldRelationships()**: hasMany → `entity_relationships`
|
|
|
|
|
- **allRelationships()**: hasMany → `entity_relationships`
|
feat: ItemMaster 데이터베이스 구조 구축 (9개 테이블)
- 마이그레이션 9개 생성 (unit_options, section_templates, item_master_fields, item_pages, item_sections, item_fields, item_bom_items, custom_tabs, tab_columns)
- Eloquent 모델 9개 구현 (ItemMaster 네임스페이스)
- ItemMasterSeeder 작성 및 테스트 데이터 생성
주요 특징:
- Multi-tenant 지원 (BelongsToTenant trait)
- Soft Delete 적용 (deleted_at, deleted_by)
- 감사 로그 지원 (created_by, updated_by)
- JSON 필드로 동적 속성 지원 (display_condition, validation_rules, options, properties)
- FK 제약조건 및 Composite Index 설정
- 계층 구조 (ItemPage → ItemSection → ItemField/ItemBomItem)
SAM API Development Rules 준수
2025-11-20 16:36:55 +09:00
|
|
|
|
|
|
|
|
### item_sections
|
|
|
|
|
**모델**: `App\Models\ItemMaster\ItemSection`
|
|
|
|
|
|
2025-11-26 14:09:31 +09:00
|
|
|
- **fieldRelationships()**: hasMany → `entity_relationships`
|
|
|
|
|
- **bomRelationships()**: hasMany → `entity_relationships`
|
|
|
|
|
- **allChildRelationships()**: hasMany → `entity_relationships`
|
feat: ItemMaster 데이터베이스 구조 구축 (9개 테이블)
- 마이그레이션 9개 생성 (unit_options, section_templates, item_master_fields, item_pages, item_sections, item_fields, item_bom_items, custom_tabs, tab_columns)
- Eloquent 모델 9개 구현 (ItemMaster 네임스페이스)
- ItemMasterSeeder 작성 및 테스트 데이터 생성
주요 특징:
- Multi-tenant 지원 (BelongsToTenant trait)
- Soft Delete 적용 (deleted_at, deleted_by)
- 감사 로그 지원 (created_by, updated_by)
- JSON 필드로 동적 속성 지원 (display_condition, validation_rules, options, properties)
- FK 제약조건 및 Composite Index 설정
- 계층 구조 (ItemPage → ItemSection → ItemField/ItemBomItem)
SAM API Development Rules 준수
2025-11-20 16:36:55 +09:00
|
|
|
|
|
|
|
|
### tab_columns
|
|
|
|
|
**모델**: `App\Models\ItemMaster\TabColumn`
|
|
|
|
|
|
|
|
|
|
- **tab()**: belongsTo → `custom_tabs`
|
|
|
|
|
|
2025-12-15 13:56:12 +09:00
|
|
|
### items
|
|
|
|
|
**모델**: `App\Models\Items\Item`
|
|
|
|
|
|
|
|
|
|
- **category()**: belongsTo → `categories`
|
feat: [approval] 전자결재 모듈 API 구현
- 마이그레이션 4개 (approval_forms, approval_lines, approvals, approval_steps)
- 모델 4개 (ApprovalForm, ApprovalLine, Approval, ApprovalStep)
- ApprovalService 비즈니스 로직 (양식/결재선 CRUD, 기안함/결재함/참조함, 결재 액션)
- 컨트롤러 3개 (ApprovalFormController, ApprovalLineController, ApprovalController)
- FormRequest 13개 (양식/결재선/문서 검증)
- Swagger 문서 3개 (26개 엔드포인트)
- i18n 메시지/에러 키 추가
- 라우트 26개 등록
2025-12-17 23:23:20 +09:00
|
|
|
- **files()**: hasMany → `files`
|
2025-12-15 13:56:12 +09:00
|
|
|
- **details()**: hasOne → `item_details`
|
2026-01-26 20:29:22 +09:00
|
|
|
- **stock()**: hasOne → `stocks`
|
2025-12-15 13:56:12 +09:00
|
|
|
|
|
|
|
|
### item_details
|
|
|
|
|
**모델**: `App\Models\Items\ItemDetail`
|
|
|
|
|
|
|
|
|
|
- **item()**: belongsTo → `items`
|
|
|
|
|
|
2025-12-29 19:31:51 +09:00
|
|
|
### item_receipts
|
|
|
|
|
**모델**: `App\Models\Items\ItemReceipt`
|
|
|
|
|
|
|
|
|
|
- **item()**: belongsTo → `items`
|
2026-01-21 10:39:17 +09:00
|
|
|
- **creator()**: belongsTo → `users`
|
2025-12-29 19:31:51 +09:00
|
|
|
|
2025-12-21 01:35:22 +09:00
|
|
|
### login_tokens
|
|
|
|
|
**모델**: `App\Models\LoginToken`
|
|
|
|
|
|
|
|
|
|
- **user()**: belongsTo → `users`
|
|
|
|
|
|
2025-10-14 22:26:15 +09:00
|
|
|
### main_requests
|
|
|
|
|
**모델**: `App\Models\MainRequest`
|
|
|
|
|
|
|
|
|
|
- **flows()**: hasMany → `main_request_flows`
|
|
|
|
|
|
|
|
|
|
### main_request_flows
|
|
|
|
|
**모델**: `App\Models\MainRequestFlow`
|
|
|
|
|
|
|
|
|
|
- **mainRequest()**: belongsTo → `main_requests`
|
|
|
|
|
- **flowable()**: morphTo → `(Polymorphic)`
|
|
|
|
|
|
2026-01-20 20:51:42 +09:00
|
|
|
### materials
|
|
|
|
|
**모델**: `App\Models\Materials\Material`
|
|
|
|
|
|
|
|
|
|
- **category()**: belongsTo → `categories`
|
|
|
|
|
- **receipts()**: hasMany → `material_receipts`
|
|
|
|
|
- **lots()**: hasMany → `lots`
|
|
|
|
|
- **files()**: morphMany → `files`
|
|
|
|
|
|
|
|
|
|
### material_inspections
|
|
|
|
|
**모델**: `App\Models\Materials\MaterialInspection`
|
|
|
|
|
|
|
|
|
|
- **receipt()**: belongsTo → `material_receipts`
|
|
|
|
|
- **items()**: hasMany → `material_inspection_items`
|
|
|
|
|
|
|
|
|
|
### material_inspection_items
|
|
|
|
|
**모델**: `App\Models\Materials\MaterialInspectionItem`
|
|
|
|
|
|
|
|
|
|
- **inspection()**: belongsTo → `material_inspections`
|
|
|
|
|
|
|
|
|
|
### material_receipts
|
|
|
|
|
**모델**: `App\Models\Materials\MaterialReceipt`
|
|
|
|
|
|
|
|
|
|
- **material()**: belongsTo → `materials`
|
|
|
|
|
- **inspections()**: hasMany → `material_inspections`
|
|
|
|
|
|
2025-10-14 22:26:15 +09:00
|
|
|
### users
|
|
|
|
|
**모델**: `App\Models\Members\User`
|
|
|
|
|
|
|
|
|
|
- **userTenants()**: hasMany → `user_tenants`
|
|
|
|
|
- **userRoles()**: hasMany → `user_roles`
|
2025-12-24 19:48:15 +09:00
|
|
|
- **tenantProfiles()**: hasMany → `tenant_user_profiles`
|
2025-10-14 22:26:15 +09:00
|
|
|
- **userTenant()**: hasOne → `user_tenants`
|
|
|
|
|
- **userTenantById()**: hasOne → `user_tenants`
|
2025-12-24 19:48:15 +09:00
|
|
|
- **tenantProfile()**: hasOne → `tenant_user_profiles`
|
2025-10-14 22:26:15 +09:00
|
|
|
- **tenantsMembership()**: belongsToMany → `tenants`
|
|
|
|
|
- **files()**: morphMany → `files`
|
|
|
|
|
|
|
|
|
|
### user_menu_permissions
|
|
|
|
|
**모델**: `App\Models\Members\UserMenuPermission`
|
|
|
|
|
|
|
|
|
|
- **user()**: belongsTo → `users`
|
|
|
|
|
- **menu()**: belongsTo → `menus`
|
|
|
|
|
|
|
|
|
|
### user_roles
|
|
|
|
|
**모델**: `App\Models\Members\UserRole`
|
|
|
|
|
|
|
|
|
|
- **user()**: belongsTo → `users`
|
|
|
|
|
- **tenant()**: belongsTo → `tenants`
|
|
|
|
|
- **role()**: belongsTo → `roles`
|
|
|
|
|
|
|
|
|
|
### user_tenants
|
|
|
|
|
**모델**: `App\Models\Members\UserTenant`
|
|
|
|
|
|
|
|
|
|
- **user()**: belongsTo → `users`
|
|
|
|
|
- **tenant()**: belongsTo → `tenants`
|
|
|
|
|
|
feat: Phase 6.1 악성채권 추심관리 API 구현
- 테이블 3개: bad_debts, bad_debt_documents, bad_debt_memos
- 모델 3개: BadDebt, BadDebtDocument, BadDebtMemo
- BadDebtService: CRUD, 요약 통계, 서류/메모 관리
- API 엔드포인트 11개 (목록, 등록, 상세, 수정, 삭제, 토글, 서류/메모 CRUD)
- Swagger 문서 작성 완료
2025-12-19 15:57:04 +09:00
|
|
|
### notification_settings
|
|
|
|
|
**모델**: `App\Models\NotificationSetting`
|
|
|
|
|
|
|
|
|
|
|
2025-12-22 17:42:59 +09:00
|
|
|
### notification_setting_groups
|
|
|
|
|
**모델**: `App\Models\NotificationSettingGroup`
|
|
|
|
|
|
|
|
|
|
- **items()**: hasMany → `notification_setting_group_items`
|
|
|
|
|
|
|
|
|
|
### notification_setting_group_items
|
|
|
|
|
**모델**: `App\Models\NotificationSettingGroupItem`
|
|
|
|
|
|
|
|
|
|
- **group()**: belongsTo → `notification_setting_groups`
|
|
|
|
|
|
|
|
|
|
### notification_setting_group_states
|
|
|
|
|
**모델**: `App\Models\NotificationSettingGroupState`
|
|
|
|
|
|
|
|
|
|
|
2025-10-14 22:26:15 +09:00
|
|
|
### clients
|
|
|
|
|
**모델**: `App\Models\Orders\Client`
|
|
|
|
|
|
|
|
|
|
- **clientGroup()**: belongsTo → `client_groups`
|
|
|
|
|
- **orders()**: hasMany → `orders`
|
2025-12-24 08:54:52 +09:00
|
|
|
- **badDebts()**: hasMany → `bad_debts`
|
|
|
|
|
- **activeBadDebts()**: hasMany → `bad_debts`
|
2025-10-14 22:26:15 +09:00
|
|
|
|
|
|
|
|
### client_groups
|
|
|
|
|
**모델**: `App\Models\Orders\ClientGroup`
|
|
|
|
|
|
|
|
|
|
- **clients()**: hasMany → `clients`
|
|
|
|
|
|
|
|
|
|
### orders
|
|
|
|
|
**모델**: `App\Models\Orders\Order`
|
|
|
|
|
|
2026-01-05 15:56:46 +09:00
|
|
|
- **quote()**: belongsTo → `quotes`
|
2026-01-21 10:39:17 +09:00
|
|
|
- **client()**: belongsTo → `clients`
|
|
|
|
|
- **writer()**: belongsTo → `users`
|
2025-12-15 13:56:12 +09:00
|
|
|
- **item()**: belongsTo → `items`
|
2026-01-22 23:19:05 +09:00
|
|
|
- **sale()**: belongsTo → `sales`
|
2025-10-14 22:26:15 +09:00
|
|
|
- **items()**: hasMany → `order_items`
|
2026-02-09 21:31:25 +09:00
|
|
|
- **nodes()**: hasMany → `order_nodes`
|
|
|
|
|
- **rootNodes()**: hasMany → `order_nodes`
|
2025-10-14 22:26:15 +09:00
|
|
|
- **histories()**: hasMany → `order_histories`
|
|
|
|
|
- **versions()**: hasMany → `order_versions`
|
2026-01-21 10:39:17 +09:00
|
|
|
- **workOrders()**: hasMany → `work_orders`
|
|
|
|
|
- **shipments()**: hasMany → `shipments`
|
2026-01-22 23:19:05 +09:00
|
|
|
- **sales()**: hasMany → `sales`
|
2025-10-14 22:26:15 +09:00
|
|
|
|
|
|
|
|
### order_historys
|
|
|
|
|
**모델**: `App\Models\Orders\OrderHistory`
|
|
|
|
|
|
|
|
|
|
- **order()**: belongsTo → `orders`
|
|
|
|
|
|
|
|
|
|
### order_items
|
|
|
|
|
**모델**: `App\Models\Orders\OrderItem`
|
|
|
|
|
|
|
|
|
|
- **order()**: belongsTo → `orders`
|
2026-02-09 21:31:25 +09:00
|
|
|
- **node()**: belongsTo → `order_nodes`
|
2025-12-15 13:56:12 +09:00
|
|
|
- **item()**: belongsTo → `items`
|
2026-01-05 15:56:46 +09:00
|
|
|
- **quote()**: belongsTo → `quotes`
|
|
|
|
|
- **quoteItem()**: belongsTo → `quote_items`
|
2025-10-14 22:26:15 +09:00
|
|
|
- **components()**: hasMany → `order_item_components`
|
|
|
|
|
|
|
|
|
|
### order_item_components
|
|
|
|
|
**모델**: `App\Models\Orders\OrderItemComponent`
|
|
|
|
|
|
|
|
|
|
- **orderItem()**: belongsTo → `order_items`
|
|
|
|
|
|
2026-02-09 21:31:25 +09:00
|
|
|
### order_nodes
|
|
|
|
|
**모델**: `App\Models\Orders\OrderNode`
|
|
|
|
|
|
|
|
|
|
- **parent()**: belongsTo → `order_nodes`
|
|
|
|
|
- **order()**: belongsTo → `orders`
|
|
|
|
|
- **children()**: hasMany → `order_nodes`
|
|
|
|
|
- **items()**: hasMany → `order_items`
|
|
|
|
|
|
2025-10-14 22:26:15 +09:00
|
|
|
### order_versions
|
|
|
|
|
**모델**: `App\Models\Orders\OrderVersion`
|
|
|
|
|
|
|
|
|
|
- **order()**: belongsTo → `orders`
|
|
|
|
|
|
|
|
|
|
### permissions
|
|
|
|
|
**모델**: `App\Models\Permissions\Permission`
|
|
|
|
|
|
|
|
|
|
- **tenant()**: belongsTo → `tenants`
|
|
|
|
|
|
|
|
|
|
### permission_overrides
|
|
|
|
|
**모델**: `App\Models\Permissions\PermissionOverride`
|
|
|
|
|
|
|
|
|
|
- **permission()**: belongsTo → `permissions`
|
|
|
|
|
|
|
|
|
|
### roles
|
|
|
|
|
**모델**: `App\Models\Permissions\Role`
|
|
|
|
|
|
|
|
|
|
- **tenant()**: belongsTo → `tenants`
|
|
|
|
|
- **menuPermissions()**: hasMany → `role_menu_permissions`
|
|
|
|
|
- **userRoles()**: hasMany → `user_roles`
|
2026-01-02 21:06:06 +09:00
|
|
|
- **users()**: belongsToMany → `users`
|
|
|
|
|
- **permissions()**: belongsToMany → `permissions`
|
2025-10-14 22:26:15 +09:00
|
|
|
|
|
|
|
|
### role_menu_permissions
|
|
|
|
|
**모델**: `App\Models\Permissions\RoleMenuPermission`
|
|
|
|
|
|
|
|
|
|
- **role()**: belongsTo → `roles`
|
|
|
|
|
- **menu()**: belongsTo → `menus`
|
|
|
|
|
|
2025-12-19 16:14:04 +09:00
|
|
|
### popups
|
|
|
|
|
**모델**: `App\Models\Popups\Popup`
|
|
|
|
|
|
|
|
|
|
- **department()**: belongsTo → `departments`
|
|
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
- **updater()**: belongsTo → `users`
|
|
|
|
|
|
2025-12-29 19:31:51 +09:00
|
|
|
### process
|
|
|
|
|
**모델**: `App\Models\Process`
|
|
|
|
|
|
|
|
|
|
- **classificationRules()**: hasMany → `process_classification_rules`
|
2026-01-13 19:49:49 +09:00
|
|
|
- **processItems()**: hasMany → `process_items`
|
2026-02-04 23:07:08 +09:00
|
|
|
- **steps()**: hasMany → `process_steps`
|
2025-12-29 19:31:51 +09:00
|
|
|
|
|
|
|
|
### process_classification_rules
|
|
|
|
|
**모델**: `App\Models\ProcessClassificationRule`
|
|
|
|
|
|
|
|
|
|
- **process()**: belongsTo → `processes`
|
|
|
|
|
|
2026-01-13 19:49:49 +09:00
|
|
|
### process_items
|
|
|
|
|
**모델**: `App\Models\ProcessItem`
|
|
|
|
|
|
|
|
|
|
- **process()**: belongsTo → `processes`
|
|
|
|
|
- **item()**: belongsTo → `items`
|
|
|
|
|
|
2026-02-04 23:07:08 +09:00
|
|
|
### process_steps
|
|
|
|
|
**모델**: `App\Models\ProcessStep`
|
|
|
|
|
|
|
|
|
|
- **process()**: belongsTo → `processes`
|
|
|
|
|
|
2025-12-26 15:48:37 +09:00
|
|
|
### work_orders
|
|
|
|
|
**모델**: `App\Models\Production\WorkOrder`
|
|
|
|
|
|
|
|
|
|
- **salesOrder()**: belongsTo → `orders`
|
2026-01-21 10:39:17 +09:00
|
|
|
- **process()**: belongsTo → `processes`
|
2025-12-26 15:48:37 +09:00
|
|
|
- **assignee()**: belongsTo → `users`
|
|
|
|
|
- **team()**: belongsTo → `departments`
|
|
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
- **updater()**: belongsTo → `users`
|
2026-01-13 19:49:49 +09:00
|
|
|
- **assignees()**: hasMany → `work_order_assignees`
|
|
|
|
|
- **primaryAssignee()**: hasMany → `work_order_assignees`
|
2025-12-26 15:48:37 +09:00
|
|
|
- **items()**: hasMany → `work_order_items`
|
|
|
|
|
- **issues()**: hasMany → `work_order_issues`
|
2026-02-09 21:31:25 +09:00
|
|
|
- **stepProgress()**: hasMany → `work_order_step_progress`
|
2026-01-21 10:39:17 +09:00
|
|
|
- **shipments()**: hasMany → `shipments`
|
2025-12-26 15:48:37 +09:00
|
|
|
- **bendingDetail()**: hasOne → `work_order_bending_details`
|
|
|
|
|
|
2026-01-13 19:49:49 +09:00
|
|
|
### work_order_assignees
|
|
|
|
|
**모델**: `App\Models\Production\WorkOrderAssignee`
|
|
|
|
|
|
|
|
|
|
- **workOrder()**: belongsTo → `work_orders`
|
|
|
|
|
- **user()**: belongsTo → `users`
|
|
|
|
|
|
2025-12-26 15:48:37 +09:00
|
|
|
### work_order_bending_details
|
|
|
|
|
**모델**: `App\Models\Production\WorkOrderBendingDetail`
|
|
|
|
|
|
|
|
|
|
- **workOrder()**: belongsTo → `work_orders`
|
|
|
|
|
|
|
|
|
|
### work_order_issues
|
|
|
|
|
**모델**: `App\Models\Production\WorkOrderIssue`
|
|
|
|
|
|
|
|
|
|
- **workOrder()**: belongsTo → `work_orders`
|
|
|
|
|
- **reporter()**: belongsTo → `users`
|
|
|
|
|
- **resolver()**: belongsTo → `users`
|
|
|
|
|
|
|
|
|
|
### work_order_items
|
|
|
|
|
**모델**: `App\Models\Production\WorkOrderItem`
|
|
|
|
|
|
|
|
|
|
- **workOrder()**: belongsTo → `work_orders`
|
|
|
|
|
- **item()**: belongsTo → `items`
|
2026-02-10 08:35:57 +09:00
|
|
|
- **sourceOrderItem()**: belongsTo → `order_items`
|
2025-12-26 15:48:37 +09:00
|
|
|
|
2026-02-09 21:31:25 +09:00
|
|
|
### work_order_step_progress
|
|
|
|
|
**모델**: `App\Models\Production\WorkOrderStepProgress`
|
|
|
|
|
|
|
|
|
|
- **workOrder()**: belongsTo → `work_orders`
|
|
|
|
|
- **processStep()**: belongsTo → `process_steps`
|
|
|
|
|
- **workOrderItem()**: belongsTo → `work_order_items`
|
|
|
|
|
- **completedByUser()**: belongsTo → `users`
|
|
|
|
|
|
2025-12-26 15:48:37 +09:00
|
|
|
### work_results
|
|
|
|
|
**모델**: `App\Models\Production\WorkResult`
|
|
|
|
|
|
|
|
|
|
- **workOrder()**: belongsTo → `work_orders`
|
|
|
|
|
- **workOrderItem()**: belongsTo → `work_order_items`
|
|
|
|
|
- **worker()**: belongsTo → `users`
|
|
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
- **updater()**: belongsTo → `users`
|
|
|
|
|
|
2026-01-20 20:51:42 +09:00
|
|
|
### common_codes
|
|
|
|
|
**모델**: `App\Models\Products\CommonCode`
|
|
|
|
|
|
|
|
|
|
- **parent()**: belongsTo → `common_codes`
|
|
|
|
|
- **children()**: hasMany → `common_codes`
|
|
|
|
|
|
|
|
|
|
### parts
|
|
|
|
|
**모델**: `App\Models\Products\Part`
|
|
|
|
|
|
|
|
|
|
- **category()**: belongsTo → `common_codes`
|
|
|
|
|
- **partType()**: belongsTo → `common_codes`
|
|
|
|
|
|
feat: [approval] 전자결재 모듈 API 구현
- 마이그레이션 4개 (approval_forms, approval_lines, approvals, approval_steps)
- 모델 4개 (ApprovalForm, ApprovalLine, Approval, ApprovalStep)
- ApprovalService 비즈니스 로직 (양식/결재선 CRUD, 기안함/결재함/참조함, 결재 액션)
- 컨트롤러 3개 (ApprovalFormController, ApprovalLineController, ApprovalController)
- FormRequest 13개 (양식/결재선/문서 검증)
- Swagger 문서 3개 (26개 엔드포인트)
- i18n 메시지/에러 키 추가
- 라우트 26개 등록
2025-12-17 23:23:20 +09:00
|
|
|
### prices
|
|
|
|
|
**모델**: `App\Models\Products\Price`
|
|
|
|
|
|
|
|
|
|
- **clientGroup()**: belongsTo → `client_groups`
|
|
|
|
|
- **revisions()**: hasMany → `price_revisions`
|
|
|
|
|
|
|
|
|
|
### price_revisions
|
|
|
|
|
**모델**: `App\Models\Products\PriceRevision`
|
|
|
|
|
|
|
|
|
|
- **price()**: belongsTo → `prices`
|
|
|
|
|
|
2026-01-20 20:51:42 +09:00
|
|
|
### products
|
|
|
|
|
**모델**: `App\Models\Products\Product`
|
|
|
|
|
|
|
|
|
|
- **category()**: belongsTo → `categories`
|
|
|
|
|
- **componentLines()**: hasMany → `product_components`
|
|
|
|
|
- **parentLines()**: hasMany → `product_components`
|
|
|
|
|
- **children()**: belongsToMany → `products`
|
|
|
|
|
- **parents()**: belongsToMany → `products`
|
|
|
|
|
- **files()**: morphMany → `files`
|
|
|
|
|
|
|
|
|
|
### product_components
|
|
|
|
|
**모델**: `App\Models\Products\ProductComponent`
|
|
|
|
|
|
|
|
|
|
- **parentProduct()**: belongsTo → `products`
|
|
|
|
|
- **product()**: belongsTo → `products`
|
|
|
|
|
- **material()**: belongsTo → `materials`
|
|
|
|
|
|
2025-12-18 11:40:49 +09:00
|
|
|
### push_device_tokens
|
|
|
|
|
**모델**: `App\Models\PushDeviceToken`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### push_notification_settings
|
|
|
|
|
**모델**: `App\Models\PushNotificationSetting`
|
|
|
|
|
|
|
|
|
|
|
2025-12-29 19:31:51 +09:00
|
|
|
### inspections
|
|
|
|
|
**모델**: `App\Models\Qualitys\Inspection`
|
|
|
|
|
|
|
|
|
|
- **item()**: belongsTo → `items`
|
2026-01-21 10:39:17 +09:00
|
|
|
- **inspector()**: belongsTo → `users`
|
|
|
|
|
- **creator()**: belongsTo → `users`
|
2025-12-29 19:31:51 +09:00
|
|
|
|
2025-10-14 22:26:15 +09:00
|
|
|
### lots
|
|
|
|
|
**모델**: `App\Models\Qualitys\Lot`
|
|
|
|
|
|
2025-12-15 13:56:12 +09:00
|
|
|
- **item()**: belongsTo → `items`
|
2025-10-14 22:26:15 +09:00
|
|
|
- **sales()**: hasMany → `lot_sales`
|
|
|
|
|
|
|
|
|
|
### lot_sales
|
|
|
|
|
**모델**: `App\Models\Qualitys\LotSale`
|
|
|
|
|
|
|
|
|
|
- **lot()**: belongsTo → `lots`
|
|
|
|
|
|
2025-12-04 22:22:46 +09:00
|
|
|
### quotes
|
|
|
|
|
**모델**: `App\Models\Quote\Quote`
|
|
|
|
|
|
|
|
|
|
- **client()**: belongsTo → `clients`
|
2025-12-15 13:56:12 +09:00
|
|
|
- **item()**: belongsTo → `items`
|
2026-01-13 19:49:49 +09:00
|
|
|
- **order()**: belongsTo → `orders`
|
2026-01-21 10:39:17 +09:00
|
|
|
- **siteBriefing()**: belongsTo → `site_briefings`
|
2025-12-04 22:22:46 +09:00
|
|
|
- **finalizer()**: belongsTo → `users`
|
|
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
- **updater()**: belongsTo → `users`
|
|
|
|
|
- **items()**: hasMany → `quote_items`
|
|
|
|
|
- **revisions()**: hasMany → `quote_revisions`
|
2026-01-21 10:39:17 +09:00
|
|
|
- **orders()**: hasMany → `orders`
|
2025-12-04 22:22:46 +09:00
|
|
|
|
2025-12-19 16:53:49 +09:00
|
|
|
### quote_formulas
|
|
|
|
|
**모델**: `App\Models\Quote\QuoteFormula`
|
|
|
|
|
|
|
|
|
|
- **category()**: belongsTo → `quote_formula_categories`
|
|
|
|
|
- **ranges()**: hasMany → `quote_formula_ranges`
|
|
|
|
|
- **mappings()**: hasMany → `quote_formula_mappings`
|
|
|
|
|
- **items()**: hasMany → `quote_formula_items`
|
|
|
|
|
|
|
|
|
|
### quote_formula_categorys
|
|
|
|
|
**모델**: `App\Models\Quote\QuoteFormulaCategory`
|
|
|
|
|
|
|
|
|
|
- **formulas()**: hasMany → `quote_formulas`
|
|
|
|
|
|
|
|
|
|
### quote_formula_items
|
|
|
|
|
**모델**: `App\Models\Quote\QuoteFormulaItem`
|
|
|
|
|
|
|
|
|
|
- **formula()**: belongsTo → `quote_formulas`
|
|
|
|
|
|
|
|
|
|
### quote_formula_mappings
|
|
|
|
|
**모델**: `App\Models\Quote\QuoteFormulaMapping`
|
|
|
|
|
|
|
|
|
|
- **formula()**: belongsTo → `quote_formulas`
|
|
|
|
|
|
|
|
|
|
### quote_formula_ranges
|
|
|
|
|
**모델**: `App\Models\Quote\QuoteFormulaRange`
|
|
|
|
|
|
|
|
|
|
- **formula()**: belongsTo → `quote_formulas`
|
|
|
|
|
|
2025-12-04 22:22:46 +09:00
|
|
|
### quote_items
|
|
|
|
|
**모델**: `App\Models\Quote\QuoteItem`
|
|
|
|
|
|
|
|
|
|
- **quote()**: belongsTo → `quotes`
|
|
|
|
|
|
|
|
|
|
### quote_revisions
|
|
|
|
|
**모델**: `App\Models\Quote\QuoteRevision`
|
|
|
|
|
|
|
|
|
|
- **quote()**: belongsTo → `quotes`
|
|
|
|
|
- **reviser()**: belongsTo → `users`
|
|
|
|
|
|
2025-12-18 15:42:46 +09:00
|
|
|
### ai_reports
|
|
|
|
|
**모델**: `App\Models\Tenants\AiReport`
|
|
|
|
|
|
2025-12-21 16:08:01 +09:00
|
|
|
- **creator()**: belongsTo → `users`
|
2025-12-18 15:42:46 +09:00
|
|
|
|
2026-02-07 12:52:28 +09:00
|
|
|
### ai_token_usages
|
|
|
|
|
**모델**: `App\Models\Tenants\AiTokenUsage`
|
|
|
|
|
|
|
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
|
2026-02-10 08:35:57 +09:00
|
|
|
### ai_voice_recordings
|
|
|
|
|
**모델**: `App\Models\Tenants\AiVoiceRecording`
|
|
|
|
|
|
|
|
|
|
- **user()**: belongsTo → `users`
|
|
|
|
|
|
2025-12-18 11:40:49 +09:00
|
|
|
### approvals
|
|
|
|
|
**모델**: `App\Models\Tenants\Approval`
|
|
|
|
|
|
|
|
|
|
- **form()**: belongsTo → `approval_forms`
|
|
|
|
|
- **drafter()**: belongsTo → `users`
|
|
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
- **updater()**: belongsTo → `users`
|
|
|
|
|
- **steps()**: hasMany → `approval_steps`
|
|
|
|
|
- **approverSteps()**: hasMany → `approval_steps`
|
|
|
|
|
- **referenceSteps()**: hasMany → `approval_steps`
|
|
|
|
|
|
|
|
|
|
### approval_forms
|
|
|
|
|
**모델**: `App\Models\Tenants\ApprovalForm`
|
|
|
|
|
|
|
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
- **updater()**: belongsTo → `users`
|
|
|
|
|
- **approvals()**: hasMany → `approvals`
|
|
|
|
|
|
|
|
|
|
### approval_lines
|
|
|
|
|
**모델**: `App\Models\Tenants\ApprovalLine`
|
|
|
|
|
|
|
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
- **updater()**: belongsTo → `users`
|
|
|
|
|
|
|
|
|
|
### approval_steps
|
|
|
|
|
**모델**: `App\Models\Tenants\ApprovalStep`
|
|
|
|
|
|
|
|
|
|
- **approval()**: belongsTo → `approvals`
|
|
|
|
|
- **approver()**: belongsTo → `users`
|
|
|
|
|
|
2025-12-09 20:27:54 +09:00
|
|
|
### attendances
|
|
|
|
|
**모델**: `App\Models\Tenants\Attendance`
|
|
|
|
|
|
|
|
|
|
- **user()**: belongsTo → `users`
|
|
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
- **updater()**: belongsTo → `users`
|
|
|
|
|
|
feat: [approval] 전자결재 모듈 API 구현
- 마이그레이션 4개 (approval_forms, approval_lines, approvals, approval_steps)
- 모델 4개 (ApprovalForm, ApprovalLine, Approval, ApprovalStep)
- ApprovalService 비즈니스 로직 (양식/결재선 CRUD, 기안함/결재함/참조함, 결재 액션)
- 컨트롤러 3개 (ApprovalFormController, ApprovalLineController, ApprovalController)
- FormRequest 13개 (양식/결재선/문서 검증)
- Swagger 문서 3개 (26개 엔드포인트)
- i18n 메시지/에러 키 추가
- 라우트 26개 등록
2025-12-17 23:23:20 +09:00
|
|
|
### bank_accounts
|
|
|
|
|
**모델**: `App\Models\Tenants\BankAccount`
|
|
|
|
|
|
|
|
|
|
- **assignedUser()**: belongsTo → `users`
|
|
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
- **updater()**: belongsTo → `users`
|
|
|
|
|
|
2025-12-18 15:42:46 +09:00
|
|
|
### barobill_settings
|
|
|
|
|
**모델**: `App\Models\Tenants\BarobillSetting`
|
|
|
|
|
|
|
|
|
|
- **tenant()**: belongsTo → `tenants`
|
2025-12-21 16:08:01 +09:00
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
- **updater()**: belongsTo → `users`
|
2025-12-18 15:42:46 +09:00
|
|
|
|
2025-12-24 08:54:52 +09:00
|
|
|
### bills
|
|
|
|
|
**모델**: `App\Models\Tenants\Bill`
|
|
|
|
|
|
|
|
|
|
- **client()**: belongsTo → `clients`
|
|
|
|
|
- **bankAccount()**: belongsTo → `bank_accounts`
|
|
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
- **installments()**: hasMany → `bill_installments`
|
|
|
|
|
|
|
|
|
|
### bill_installments
|
|
|
|
|
**모델**: `App\Models\Tenants\BillInstallment`
|
|
|
|
|
|
|
|
|
|
- **bill()**: belongsTo → `bills`
|
|
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
|
feat: [approval] 전자결재 모듈 API 구현
- 마이그레이션 4개 (approval_forms, approval_lines, approvals, approval_steps)
- 모델 4개 (ApprovalForm, ApprovalLine, Approval, ApprovalStep)
- ApprovalService 비즈니스 로직 (양식/결재선 CRUD, 기안함/결재함/참조함, 결재 액션)
- 컨트롤러 3개 (ApprovalFormController, ApprovalLineController, ApprovalController)
- FormRequest 13개 (양식/결재선/문서 검증)
- Swagger 문서 3개 (26개 엔드포인트)
- i18n 메시지/에러 키 추가
- 라우트 26개 등록
2025-12-17 23:23:20 +09:00
|
|
|
### cards
|
|
|
|
|
**모델**: `App\Models\Tenants\Card`
|
|
|
|
|
|
|
|
|
|
- **assignedUser()**: belongsTo → `users`
|
|
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
- **updater()**: belongsTo → `users`
|
|
|
|
|
|
2025-12-19 16:53:49 +09:00
|
|
|
### data_exports
|
|
|
|
|
**모델**: `App\Models\Tenants\DataExport`
|
|
|
|
|
|
|
|
|
|
- **tenant()**: belongsTo → `tenants`
|
|
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
|
2025-10-14 22:26:15 +09:00
|
|
|
### departments
|
|
|
|
|
**모델**: `App\Models\Tenants\Department`
|
|
|
|
|
|
|
|
|
|
- **parent()**: belongsTo → `departments`
|
|
|
|
|
- **children()**: hasMany → `departments`
|
|
|
|
|
- **departmentUsers()**: hasMany → `department_user`
|
|
|
|
|
- **users()**: belongsToMany → `users`
|
|
|
|
|
- **permissionOverrides()**: morphMany → `permission_overrides`
|
|
|
|
|
|
feat: [approval] 전자결재 모듈 API 구현
- 마이그레이션 4개 (approval_forms, approval_lines, approvals, approval_steps)
- 모델 4개 (ApprovalForm, ApprovalLine, Approval, ApprovalStep)
- ApprovalService 비즈니스 로직 (양식/결재선 CRUD, 기안함/결재함/참조함, 결재 액션)
- 컨트롤러 3개 (ApprovalFormController, ApprovalLineController, ApprovalController)
- FormRequest 13개 (양식/결재선/문서 검증)
- Swagger 문서 3개 (26개 엔드포인트)
- i18n 메시지/에러 키 추가
- 라우트 26개 등록
2025-12-17 23:23:20 +09:00
|
|
|
### deposits
|
|
|
|
|
**모델**: `App\Models\Tenants\Deposit`
|
|
|
|
|
|
2025-12-21 16:08:01 +09:00
|
|
|
- **client()**: belongsTo → `clients`
|
feat: [approval] 전자결재 모듈 API 구현
- 마이그레이션 4개 (approval_forms, approval_lines, approvals, approval_steps)
- 모델 4개 (ApprovalForm, ApprovalLine, Approval, ApprovalStep)
- ApprovalService 비즈니스 로직 (양식/결재선 CRUD, 기안함/결재함/참조함, 결재 액션)
- 컨트롤러 3개 (ApprovalFormController, ApprovalLineController, ApprovalController)
- FormRequest 13개 (양식/결재선/문서 검증)
- Swagger 문서 3개 (26개 엔드포인트)
- i18n 메시지/에러 키 추가
- 라우트 26개 등록
2025-12-17 23:23:20 +09:00
|
|
|
- **bankAccount()**: belongsTo → `bank_accounts`
|
2025-12-21 16:08:01 +09:00
|
|
|
- **creator()**: belongsTo → `users`
|
feat: [approval] 전자결재 모듈 API 구현
- 마이그레이션 4개 (approval_forms, approval_lines, approvals, approval_steps)
- 모델 4개 (ApprovalForm, ApprovalLine, Approval, ApprovalStep)
- ApprovalService 비즈니스 로직 (양식/결재선 CRUD, 기안함/결재함/참조함, 결재 액션)
- 컨트롤러 3개 (ApprovalFormController, ApprovalLineController, ApprovalController)
- FormRequest 13개 (양식/결재선/문서 검증)
- Swagger 문서 3개 (26개 엔드포인트)
- i18n 메시지/에러 키 추가
- 라우트 26개 등록
2025-12-17 23:23:20 +09:00
|
|
|
|
2025-12-26 15:48:37 +09:00
|
|
|
### expected_expenses
|
|
|
|
|
**모델**: `App\Models\Tenants\ExpectedExpense`
|
|
|
|
|
|
|
|
|
|
- **client()**: belongsTo → `clients`
|
|
|
|
|
- **bankAccount()**: belongsTo → `bank_accounts`
|
|
|
|
|
- **creator()**: belongsTo → `users`
|
2026-01-23 15:38:32 +09:00
|
|
|
- **source()**: morphTo → `(Polymorphic)`
|
2025-12-26 15:48:37 +09:00
|
|
|
|
2026-01-22 09:47:29 +09:00
|
|
|
### expense_accounts
|
|
|
|
|
**모델**: `App\Models\Tenants\ExpenseAccount`
|
|
|
|
|
|
|
|
|
|
- **vendor()**: belongsTo → `clients`
|
|
|
|
|
|
feat: [approval] 전자결재 모듈 API 구현
- 마이그레이션 4개 (approval_forms, approval_lines, approvals, approval_steps)
- 모델 4개 (ApprovalForm, ApprovalLine, Approval, ApprovalStep)
- ApprovalService 비즈니스 로직 (양식/결재선 CRUD, 기안함/결재함/참조함, 결재 액션)
- 컨트롤러 3개 (ApprovalFormController, ApprovalLineController, ApprovalController)
- FormRequest 13개 (양식/결재선/문서 검증)
- Swagger 문서 3개 (26개 엔드포인트)
- i18n 메시지/에러 키 추가
- 라우트 26개 등록
2025-12-17 23:23:20 +09:00
|
|
|
### leaves
|
|
|
|
|
**모델**: `App\Models\Tenants\Leave`
|
|
|
|
|
|
|
|
|
|
- **user()**: belongsTo → `users`
|
|
|
|
|
- **approver()**: belongsTo → `users`
|
|
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
- **updater()**: belongsTo → `users`
|
2025-12-26 15:48:37 +09:00
|
|
|
- **userProfile()**: hasOne → `tenant_user_profiles`
|
feat: [approval] 전자결재 모듈 API 구현
- 마이그레이션 4개 (approval_forms, approval_lines, approvals, approval_steps)
- 모델 4개 (ApprovalForm, ApprovalLine, Approval, ApprovalStep)
- ApprovalService 비즈니스 로직 (양식/결재선 CRUD, 기안함/결재함/참조함, 결재 액션)
- 컨트롤러 3개 (ApprovalFormController, ApprovalLineController, ApprovalController)
- FormRequest 13개 (양식/결재선/문서 검증)
- Swagger 문서 3개 (26개 엔드포인트)
- i18n 메시지/에러 키 추가
- 라우트 26개 등록
2025-12-17 23:23:20 +09:00
|
|
|
|
|
|
|
|
### leave_balances
|
|
|
|
|
**모델**: `App\Models\Tenants\LeaveBalance`
|
|
|
|
|
|
|
|
|
|
- **user()**: belongsTo → `users`
|
|
|
|
|
|
2025-12-25 03:48:32 +09:00
|
|
|
### leave_grants
|
|
|
|
|
**모델**: `App\Models\Tenants\LeaveGrant`
|
|
|
|
|
|
|
|
|
|
- **user()**: belongsTo → `users`
|
|
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
|
2025-12-26 15:48:37 +09:00
|
|
|
### leave_policys
|
|
|
|
|
**모델**: `App\Models\Tenants\LeavePolicy`
|
|
|
|
|
|
|
|
|
|
- **tenant()**: belongsTo → `tenants`
|
|
|
|
|
|
2025-12-18 15:42:46 +09:00
|
|
|
### loans
|
|
|
|
|
**모델**: `App\Models\Tenants\Loan`
|
|
|
|
|
|
|
|
|
|
- **withdrawal()**: belongsTo → `withdrawals`
|
|
|
|
|
|
2025-10-14 22:26:15 +09:00
|
|
|
### payments
|
|
|
|
|
**모델**: `App\Models\Tenants\Payment`
|
|
|
|
|
|
|
|
|
|
- **subscription()**: belongsTo → `subscriptions`
|
|
|
|
|
|
2025-12-18 11:40:49 +09:00
|
|
|
### payrolls
|
|
|
|
|
**모델**: `App\Models\Tenants\Payroll`
|
|
|
|
|
|
|
|
|
|
- **user()**: belongsTo → `users`
|
|
|
|
|
- **confirmer()**: belongsTo → `users`
|
|
|
|
|
- **withdrawal()**: belongsTo → `withdrawals`
|
|
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
- **updater()**: belongsTo → `users`
|
|
|
|
|
|
|
|
|
|
### payroll_settings
|
|
|
|
|
**모델**: `App\Models\Tenants\PayrollSetting`
|
|
|
|
|
|
|
|
|
|
- **tenant()**: belongsTo → `tenants`
|
|
|
|
|
|
2025-10-14 22:26:15 +09:00
|
|
|
### department_users
|
|
|
|
|
**모델**: `App\Models\Tenants\Pivots\DepartmentUser`
|
|
|
|
|
|
|
|
|
|
- **department()**: belongsTo → `departments`
|
|
|
|
|
- **user()**: belongsTo → `users`
|
|
|
|
|
|
|
|
|
|
### plans
|
|
|
|
|
**모델**: `App\Models\Tenants\Plan`
|
|
|
|
|
|
|
|
|
|
- **subscriptions()**: hasMany → `subscriptions`
|
|
|
|
|
|
feat: [approval] 전자결재 모듈 API 구현
- 마이그레이션 4개 (approval_forms, approval_lines, approvals, approval_steps)
- 모델 4개 (ApprovalForm, ApprovalLine, Approval, ApprovalStep)
- ApprovalService 비즈니스 로직 (양식/결재선 CRUD, 기안함/결재함/참조함, 결재 액션)
- 컨트롤러 3개 (ApprovalFormController, ApprovalLineController, ApprovalController)
- FormRequest 13개 (양식/결재선/문서 검증)
- Swagger 문서 3개 (26개 엔드포인트)
- i18n 메시지/에러 키 추가
- 라우트 26개 등록
2025-12-17 23:23:20 +09:00
|
|
|
### purchases
|
|
|
|
|
**모델**: `App\Models\Tenants\Purchase`
|
|
|
|
|
|
2025-12-21 16:08:01 +09:00
|
|
|
- **client()**: belongsTo → `clients`
|
feat: [approval] 전자결재 모듈 API 구현
- 마이그레이션 4개 (approval_forms, approval_lines, approvals, approval_steps)
- 모델 4개 (ApprovalForm, ApprovalLine, Approval, ApprovalStep)
- ApprovalService 비즈니스 로직 (양식/결재선 CRUD, 기안함/결재함/참조함, 결재 액션)
- 컨트롤러 3개 (ApprovalFormController, ApprovalLineController, ApprovalController)
- FormRequest 13개 (양식/결재선/문서 검증)
- Swagger 문서 3개 (26개 엔드포인트)
- i18n 메시지/에러 키 추가
- 라우트 26개 등록
2025-12-17 23:23:20 +09:00
|
|
|
- **withdrawal()**: belongsTo → `withdrawals`
|
2026-01-22 23:19:05 +09:00
|
|
|
- **approval()**: belongsTo → `approvals`
|
2025-12-21 16:08:01 +09:00
|
|
|
- **creator()**: belongsTo → `users`
|
feat: [approval] 전자결재 모듈 API 구현
- 마이그레이션 4개 (approval_forms, approval_lines, approvals, approval_steps)
- 모델 4개 (ApprovalForm, ApprovalLine, Approval, ApprovalStep)
- ApprovalService 비즈니스 로직 (양식/결재선 CRUD, 기안함/결재함/참조함, 결재 액션)
- 컨트롤러 3개 (ApprovalFormController, ApprovalLineController, ApprovalController)
- FormRequest 13개 (양식/결재선/문서 검증)
- Swagger 문서 3개 (26개 엔드포인트)
- i18n 메시지/에러 키 추가
- 라우트 26개 등록
2025-12-17 23:23:20 +09:00
|
|
|
|
2025-12-26 15:48:37 +09:00
|
|
|
### receivings
|
|
|
|
|
**모델**: `App\Models\Tenants\Receiving`
|
|
|
|
|
|
|
|
|
|
- **item()**: belongsTo → `items`
|
|
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
|
|
|
|
|
### salarys
|
|
|
|
|
**모델**: `App\Models\Tenants\Salary`
|
|
|
|
|
|
|
|
|
|
- **employee()**: belongsTo → `users`
|
|
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
- **updater()**: belongsTo → `users`
|
|
|
|
|
- **employeeProfile()**: hasOne → `tenant_user_profiles`
|
|
|
|
|
|
feat: [approval] 전자결재 모듈 API 구현
- 마이그레이션 4개 (approval_forms, approval_lines, approvals, approval_steps)
- 모델 4개 (ApprovalForm, ApprovalLine, Approval, ApprovalStep)
- ApprovalService 비즈니스 로직 (양식/결재선 CRUD, 기안함/결재함/참조함, 결재 액션)
- 컨트롤러 3개 (ApprovalFormController, ApprovalLineController, ApprovalController)
- FormRequest 13개 (양식/결재선/문서 검증)
- Swagger 문서 3개 (26개 엔드포인트)
- i18n 메시지/에러 키 추가
- 라우트 26개 등록
2025-12-17 23:23:20 +09:00
|
|
|
### sales
|
|
|
|
|
**모델**: `App\Models\Tenants\Sale`
|
|
|
|
|
|
2026-01-22 23:19:05 +09:00
|
|
|
- **order()**: belongsTo → `orders`
|
|
|
|
|
- **shipment()**: belongsTo → `shipments`
|
2025-12-21 16:08:01 +09:00
|
|
|
- **client()**: belongsTo → `clients`
|
feat: [approval] 전자결재 모듈 API 구현
- 마이그레이션 4개 (approval_forms, approval_lines, approvals, approval_steps)
- 모델 4개 (ApprovalForm, ApprovalLine, Approval, ApprovalStep)
- ApprovalService 비즈니스 로직 (양식/결재선 CRUD, 기안함/결재함/참조함, 결재 액션)
- 컨트롤러 3개 (ApprovalFormController, ApprovalLineController, ApprovalController)
- FormRequest 13개 (양식/결재선/문서 검증)
- Swagger 문서 3개 (26개 엔드포인트)
- i18n 메시지/에러 키 추가
- 라우트 26개 등록
2025-12-17 23:23:20 +09:00
|
|
|
- **deposit()**: belongsTo → `deposits`
|
2025-12-21 16:08:01 +09:00
|
|
|
- **creator()**: belongsTo → `users`
|
feat: [approval] 전자결재 모듈 API 구현
- 마이그레이션 4개 (approval_forms, approval_lines, approvals, approval_steps)
- 모델 4개 (ApprovalForm, ApprovalLine, Approval, ApprovalStep)
- ApprovalService 비즈니스 로직 (양식/결재선 CRUD, 기안함/결재함/참조함, 결재 액션)
- 컨트롤러 3개 (ApprovalFormController, ApprovalLineController, ApprovalController)
- FormRequest 13개 (양식/결재선/문서 검증)
- Swagger 문서 3개 (26개 엔드포인트)
- i18n 메시지/에러 키 추가
- 라우트 26개 등록
2025-12-17 23:23:20 +09:00
|
|
|
|
2026-01-22 09:47:29 +09:00
|
|
|
### schedules
|
|
|
|
|
**모델**: `App\Models\Tenants\Schedule`
|
|
|
|
|
|
|
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
- **updater()**: belongsTo → `users`
|
|
|
|
|
|
2025-10-14 22:26:15 +09:00
|
|
|
### setting_field_defs
|
|
|
|
|
**모델**: `App\Models\Tenants\SettingFieldDef`
|
|
|
|
|
|
|
|
|
|
- **tenantSettings()**: hasMany → `tenant_field_settings`
|
|
|
|
|
|
2025-12-26 19:15:35 +09:00
|
|
|
### shipments
|
|
|
|
|
**모델**: `App\Models\Tenants\Shipment`
|
|
|
|
|
|
2026-01-21 10:39:17 +09:00
|
|
|
- **order()**: belongsTo → `orders`
|
|
|
|
|
- **workOrder()**: belongsTo → `work_orders`
|
2025-12-26 19:15:35 +09:00
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
- **updater()**: belongsTo → `users`
|
|
|
|
|
- **items()**: hasMany → `shipment_items`
|
|
|
|
|
|
|
|
|
|
### shipment_items
|
|
|
|
|
**모델**: `App\Models\Tenants\ShipmentItem`
|
|
|
|
|
|
|
|
|
|
- **shipment()**: belongsTo → `shipments`
|
|
|
|
|
- **stockLot()**: belongsTo → `stock_lots`
|
|
|
|
|
|
feat: [approval] 전자결재 모듈 API 구현
- 마이그레이션 4개 (approval_forms, approval_lines, approvals, approval_steps)
- 모델 4개 (ApprovalForm, ApprovalLine, Approval, ApprovalStep)
- ApprovalService 비즈니스 로직 (양식/결재선 CRUD, 기안함/결재함/참조함, 결재 액션)
- 컨트롤러 3개 (ApprovalFormController, ApprovalLineController, ApprovalController)
- FormRequest 13개 (양식/결재선/문서 검증)
- Swagger 문서 3개 (26개 엔드포인트)
- i18n 메시지/에러 키 추가
- 라우트 26개 등록
2025-12-17 23:23:20 +09:00
|
|
|
### sites
|
|
|
|
|
**모델**: `App\Models\Tenants\Site`
|
|
|
|
|
|
|
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
- **updater()**: belongsTo → `users`
|
2026-01-13 19:49:49 +09:00
|
|
|
- **client()**: belongsTo → `clients`
|
|
|
|
|
|
2026-01-21 10:39:17 +09:00
|
|
|
### site_briefings
|
|
|
|
|
**모델**: `App\Models\Tenants\SiteBriefing`
|
|
|
|
|
|
|
|
|
|
- **partner()**: belongsTo → `clients`
|
|
|
|
|
- **site()**: belongsTo → `sites`
|
|
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
- **updater()**: belongsTo → `users`
|
|
|
|
|
- **quotes()**: hasMany → `quotes`
|
|
|
|
|
|
2025-12-26 15:48:37 +09:00
|
|
|
### stocks
|
|
|
|
|
**모델**: `App\Models\Tenants\Stock`
|
|
|
|
|
|
2025-12-29 19:31:51 +09:00
|
|
|
- **item()**: belongsTo → `items`
|
2025-12-26 15:48:37 +09:00
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
- **lots()**: hasMany → `stock_lots`
|
2026-01-30 11:23:35 +09:00
|
|
|
- **transactions()**: hasMany → `stock_transactions`
|
2025-12-26 15:48:37 +09:00
|
|
|
|
|
|
|
|
### stock_lots
|
|
|
|
|
**모델**: `App\Models\Tenants\StockLot`
|
|
|
|
|
|
|
|
|
|
- **stock()**: belongsTo → `stocks`
|
|
|
|
|
- **receiving()**: belongsTo → `receivings`
|
|
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
|
2026-01-30 11:23:35 +09:00
|
|
|
### stock_transactions
|
|
|
|
|
**모델**: `App\Models\Tenants\StockTransaction`
|
|
|
|
|
|
|
|
|
|
- **stock()**: belongsTo → `stocks`
|
|
|
|
|
- **stockLot()**: belongsTo → `stock_lots`
|
|
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
|
2025-10-14 22:26:15 +09:00
|
|
|
### subscriptions
|
|
|
|
|
**모델**: `App\Models\Tenants\Subscription`
|
|
|
|
|
|
|
|
|
|
- **tenant()**: belongsTo → `tenants`
|
|
|
|
|
- **plan()**: belongsTo → `plans`
|
|
|
|
|
- **payments()**: hasMany → `payments`
|
|
|
|
|
|
2025-12-18 15:42:46 +09:00
|
|
|
### tax_invoices
|
|
|
|
|
**모델**: `App\Models\Tenants\TaxInvoice`
|
|
|
|
|
|
2025-12-21 16:08:01 +09:00
|
|
|
- **creator()**: belongsTo → `users`
|
|
|
|
|
- **updater()**: belongsTo → `users`
|
2025-12-18 15:42:46 +09:00
|
|
|
- **reference()**: morphTo → `(Polymorphic)`
|
|
|
|
|
|
2025-10-14 22:26:15 +09:00
|
|
|
### tenants
|
|
|
|
|
**모델**: `App\Models\Tenants\Tenant`
|
|
|
|
|
|
|
|
|
|
- **plan()**: belongsTo → `plans`
|
|
|
|
|
- **subscription()**: belongsTo → `subscriptions`
|
|
|
|
|
- **userTenants()**: hasMany → `user_tenants`
|
|
|
|
|
- **roles()**: hasMany → `roles`
|
|
|
|
|
- **userRoles()**: hasMany → `user_roles`
|
|
|
|
|
- **users()**: belongsToMany → `users`
|
|
|
|
|
- **files()**: morphMany → `files`
|
|
|
|
|
|
|
|
|
|
### tenant_field_settings
|
|
|
|
|
**모델**: `App\Models\Tenants\TenantFieldSetting`
|
|
|
|
|
|
|
|
|
|
- **fieldDef()**: belongsTo → `setting_field_defs`
|
|
|
|
|
- **optionGroup()**: belongsTo → `tenant_option_groups`
|
|
|
|
|
|
|
|
|
|
### tenant_option_groups
|
|
|
|
|
**모델**: `App\Models\Tenants\TenantOptionGroup`
|
|
|
|
|
|
|
|
|
|
- **values()**: hasMany → `tenant_option_values`
|
|
|
|
|
|
|
|
|
|
### tenant_option_values
|
|
|
|
|
**모델**: `App\Models\Tenants\TenantOptionValue`
|
|
|
|
|
|
|
|
|
|
- **group()**: belongsTo → `tenant_option_groups`
|
|
|
|
|
|
feat: 품목 파일 업로드 API 구현 (절곡도, 시방서, 인정서)
- Products 테이블에 9개 파일 관련 필드 추가
- bending_diagram, bending_details (JSON)
- specification_file, specification_file_name
- certification_file, certification_file_name
- certification_number, certification_start_date, certification_end_date
- ItemsFileController 구현 (Code-based API)
- POST /items/{code}/files - 파일 업로드
- DELETE /items/{code}/files/{type} - 파일 삭제
- 파일 타입: bending_diagram, specification, certification
- ItemsFileUploadRequest 검증
- 파일 타입별 MIME 검증 (이미지/문서)
- 파일 크기 제한 (10MB/20MB)
- 인증 정보 및 절곡 상세 정보 검증
- Swagger 문서 작성 (ItemsFileApi.php)
- 업로드/삭제 API 스펙
- 스키마: ItemFileUploadResponse, ItemFileDeleteResponse
2025-11-17 13:40:07 +09:00
|
|
|
### tenant_stat_fields
|
|
|
|
|
**모델**: `App\Models\Tenants\TenantStatField`
|
|
|
|
|
|
|
|
|
|
- **tenant()**: belongsTo → `tenants`
|
|
|
|
|
|
2025-10-14 22:26:15 +09:00
|
|
|
### tenant_user_profiles
|
|
|
|
|
**모델**: `App\Models\Tenants\TenantUserProfile`
|
|
|
|
|
|
|
|
|
|
- **user()**: belongsTo → `users`
|
|
|
|
|
- **department()**: belongsTo → `departments`
|
2025-12-09 20:27:54 +09:00
|
|
|
- **manager()**: belongsTo → `users`
|
2025-12-30 17:25:29 +09:00
|
|
|
- **rankPosition()**: belongsTo → `positions`
|
|
|
|
|
- **titlePosition()**: belongsTo → `positions`
|
2025-09-24 22:30:28 +09:00
|
|
|
|
2026-01-22 09:47:29 +09:00
|
|
|
### today_issues
|
|
|
|
|
**모델**: `App\Models\Tenants\TodayIssue`
|
|
|
|
|
|
|
|
|
|
|
feat: [approval] 전자결재 모듈 API 구현
- 마이그레이션 4개 (approval_forms, approval_lines, approvals, approval_steps)
- 모델 4개 (ApprovalForm, ApprovalLine, Approval, ApprovalStep)
- ApprovalService 비즈니스 로직 (양식/결재선 CRUD, 기안함/결재함/참조함, 결재 액션)
- 컨트롤러 3개 (ApprovalFormController, ApprovalLineController, ApprovalController)
- FormRequest 13개 (양식/결재선/문서 검증)
- Swagger 문서 3개 (26개 엔드포인트)
- i18n 메시지/에러 키 추가
- 라우트 26개 등록
2025-12-17 23:23:20 +09:00
|
|
|
### withdrawals
|
|
|
|
|
**모델**: `App\Models\Tenants\Withdrawal`
|
|
|
|
|
|
2025-12-21 16:08:01 +09:00
|
|
|
- **client()**: belongsTo → `clients`
|
feat: [approval] 전자결재 모듈 API 구현
- 마이그레이션 4개 (approval_forms, approval_lines, approvals, approval_steps)
- 모델 4개 (ApprovalForm, ApprovalLine, Approval, ApprovalStep)
- ApprovalService 비즈니스 로직 (양식/결재선 CRUD, 기안함/결재함/참조함, 결재 액션)
- 컨트롤러 3개 (ApprovalFormController, ApprovalLineController, ApprovalController)
- FormRequest 13개 (양식/결재선/문서 검증)
- Swagger 문서 3개 (26개 엔드포인트)
- i18n 메시지/에러 키 추가
- 라우트 26개 등록
2025-12-17 23:23:20 +09:00
|
|
|
- **bankAccount()**: belongsTo → `bank_accounts`
|
2025-12-26 15:48:37 +09:00
|
|
|
- **card()**: belongsTo → `cards`
|
2025-12-21 16:08:01 +09:00
|
|
|
- **creator()**: belongsTo → `users`
|
feat: [approval] 전자결재 모듈 API 구현
- 마이그레이션 4개 (approval_forms, approval_lines, approvals, approval_steps)
- 모델 4개 (ApprovalForm, ApprovalLine, Approval, ApprovalStep)
- ApprovalService 비즈니스 로직 (양식/결재선 CRUD, 기안함/결재함/참조함, 결재 액션)
- 컨트롤러 3개 (ApprovalFormController, ApprovalLineController, ApprovalController)
- FormRequest 13개 (양식/결재선/문서 검증)
- Swagger 문서 3개 (26개 엔드포인트)
- i18n 메시지/에러 키 추가
- 라우트 26개 등록
2025-12-17 23:23:20 +09:00
|
|
|
|
feat: Phase 6.1 악성채권 추심관리 API 구현
- 테이블 3개: bad_debts, bad_debt_documents, bad_debt_memos
- 모델 3개: BadDebt, BadDebtDocument, BadDebtMemo
- BadDebtService: CRUD, 요약 통계, 서류/메모 관리
- API 엔드포인트 11개 (목록, 등록, 상세, 수정, 삭제, 토글, 서류/메모 CRUD)
- Swagger 문서 작성 완료
2025-12-19 15:57:04 +09:00
|
|
|
### user_invitations
|
|
|
|
|
**모델**: `App\Models\UserInvitation`
|
|
|
|
|
|
|
|
|
|
- **tenant()**: belongsTo → `tenants`
|
|
|
|
|
- **role()**: belongsTo → `roles`
|
|
|
|
|
- **inviter()**: belongsTo → `users`
|
|
|
|
|
|