- Design BOM 템플릿 diff/clone 엔드포인트 추가 - 컨트롤러 검증 로직 FormRequest 분리(DiffRequest/CloneRequest/Upsert/ReplaceItems) - BomTemplateService에 diffTemplates/cloneTemplate/replaceItems/쇼우 로직 정리 - ModelVersionController createDraft FormRequest 적용 및 서비스 호출 정리 - 모델버전 release 전 유효성 검사(존재/활성/테넌트 일치, qty>0, 중복 금지) 추가 - DB enum 미사용 방침 준수(status 문자열 유지) - model_versions 인덱스 최적화(tenant_id, model_id, status / 기간 범위) - Swagger 문서(Design BOM) 및 i18n 메시지 키 추가
54 lines
1.8 KiB
PHP
54 lines
1.8 KiB
PHP
<?php
|
|
/**
|
|
* Success / Info / General messages (non-error)
|
|
* - For API normal response "message" field
|
|
* - Use common keys and resource-specific nested keys
|
|
* - Example: return ApiResponse::success($data, __('message.created'));
|
|
*/
|
|
return [
|
|
|
|
// Common (CRUD / convenience)
|
|
'fetched' => 'Fetched successfully.',
|
|
'created' => 'Created successfully.',
|
|
'updated' => 'Updated successfully.',
|
|
'deleted' => 'Deleted successfully.',
|
|
'restored' => 'Restored successfully.',
|
|
'toggled' => 'Status updated successfully.',
|
|
'bulk_upsert' => 'Bulk save completed successfully.',
|
|
'reordered' => 'Reorder completed successfully.',
|
|
'no_changes' => 'No changes detected.',
|
|
|
|
// Auth / Session
|
|
'login_success' => 'Login successful.',
|
|
'logout_success' => 'You have been logged out.',
|
|
'signup_success' => 'Sign-up completed successfully.',
|
|
|
|
// Tenant / Context
|
|
'tenant_switched' => 'Active tenant has been switched.',
|
|
|
|
// Resource-specific details
|
|
'product' => [
|
|
'created' => 'Product has been created.',
|
|
'updated' => 'Product has been updated.',
|
|
'deleted' => 'Product has been deleted.',
|
|
'toggled' => 'Product status has been updated.',
|
|
],
|
|
|
|
'bom' => [
|
|
'fetched' => 'BOM items have been fetched.',
|
|
'bulk_upsert' => 'BOM items have been saved.',
|
|
'reordered' => 'BOM order has been updated.',
|
|
],
|
|
|
|
'category' => [
|
|
'fields_saved' => 'Category fields have been saved.',
|
|
'template_saved' => 'Category template has been saved.',
|
|
'template_applied' => 'Category template has been applied.',
|
|
],
|
|
|
|
'design' => [
|
|
'template_cloned' => 'BOM template has been cloned.',
|
|
'template_diff' => 'BOM template differences have been computed.',
|
|
],
|
|
];
|