feat: DB 연결 오버라이딩 및 대시보드 통계 위젯 추가
- DB 연결: 로컬/Docker 환경 오버라이딩 설정 (.env) - 테넌트 위젯: redirect 버그 수정 (TenantSelectorWidget) - 통계 위젯: 사용자/제품/자재/주문 카드 추가 (StatsOverviewWidget) - 리소스 한국어화: Product, Material 모델 레이블 추가 - 대시보드: 위젯 등록 및 캐시 최적화 🤖 Generated with [Claude Code](https://claude.ai/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
133
app/Http/Controllers/Api/V1/Schemas/BomConditionRuleSchemas.php
Normal file
133
app/Http/Controllers/Api/V1/Schemas/BomConditionRuleSchemas.php
Normal file
@@ -0,0 +1,133 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Api\V1\Schemas;
|
||||
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
/**
|
||||
* BOM Condition Rule related Swagger schemas
|
||||
*/
|
||||
|
||||
#[OA\Schema(
|
||||
schema: 'BomConditionRuleResource',
|
||||
description: 'BOM condition rule resource',
|
||||
properties: [
|
||||
new OA\Property(property: 'id', type: 'integer', example: 1),
|
||||
new OA\Property(property: 'bom_template_id', type: 'integer', example: 1),
|
||||
new OA\Property(property: 'name', type: 'string', example: '브라켓 선택 규칙'),
|
||||
new OA\Property(property: 'ref_type', type: 'string', enum: ['MATERIAL', 'PRODUCT'], example: 'MATERIAL'),
|
||||
new OA\Property(property: 'ref_id', type: 'integer', example: 101),
|
||||
new OA\Property(
|
||||
property: 'condition_expression',
|
||||
type: 'string',
|
||||
example: 'W1 >= 1000 && installation_type == "A"',
|
||||
description: 'Boolean expression to determine if this rule applies'
|
||||
),
|
||||
new OA\Property(
|
||||
property: 'quantity_expression',
|
||||
type: 'string',
|
||||
nullable: true,
|
||||
example: 'ceiling(W1 / 500)',
|
||||
description: 'Expression to calculate required quantity'
|
||||
),
|
||||
new OA\Property(
|
||||
property: 'waste_rate_expression',
|
||||
type: 'string',
|
||||
nullable: true,
|
||||
example: '0.05',
|
||||
description: 'Expression to calculate waste rate (0.0-1.0)'
|
||||
),
|
||||
new OA\Property(property: 'description', type: 'string', nullable: true, example: '가로 1000mm 이상, A타입 설치시 브라켓 적용'),
|
||||
new OA\Property(property: 'priority', type: 'integer', example: 1),
|
||||
new OA\Property(property: 'is_active', type: 'boolean', example: true),
|
||||
new OA\Property(property: 'created_at', type: 'string', format: 'date-time', example: '2024-01-01T00:00:00Z'),
|
||||
new OA\Property(property: 'updated_at', type: 'string', format: 'date-time', example: '2024-01-01T00:00:00Z'),
|
||||
new OA\Property(
|
||||
property: 'reference',
|
||||
type: 'object',
|
||||
description: 'Referenced material or product information',
|
||||
properties: [
|
||||
new OA\Property(property: 'id', type: 'integer', example: 101),
|
||||
new OA\Property(property: 'code', type: 'string', example: 'BR-001'),
|
||||
new OA\Property(property: 'name', type: 'string', example: '표준 브라켓'),
|
||||
new OA\Property(property: 'unit', type: 'string', example: 'EA')
|
||||
]
|
||||
)
|
||||
]
|
||||
)]
|
||||
class BomConditionRuleResource {}
|
||||
|
||||
#[OA\Schema(
|
||||
schema: 'CreateBomConditionRuleRequest',
|
||||
description: 'Request schema for creating BOM condition rule',
|
||||
required: ['name', 'ref_type', 'ref_id', 'condition_expression'],
|
||||
properties: [
|
||||
new OA\Property(property: 'name', type: 'string', maxLength: 100, example: '브라켓 선택 규칙'),
|
||||
new OA\Property(property: 'ref_type', type: 'string', enum: ['MATERIAL', 'PRODUCT'], example: 'MATERIAL'),
|
||||
new OA\Property(property: 'ref_id', type: 'integer', minimum: 1, example: 101),
|
||||
new OA\Property(
|
||||
property: 'condition_expression',
|
||||
type: 'string',
|
||||
maxLength: 1000,
|
||||
example: 'W1 >= 1000 && installation_type == "A"',
|
||||
description: 'Boolean expression to determine if this rule applies'
|
||||
),
|
||||
new OA\Property(
|
||||
property: 'quantity_expression',
|
||||
type: 'string',
|
||||
maxLength: 500,
|
||||
nullable: true,
|
||||
example: 'ceiling(W1 / 500)',
|
||||
description: 'Expression to calculate required quantity'
|
||||
),
|
||||
new OA\Property(
|
||||
property: 'waste_rate_expression',
|
||||
type: 'string',
|
||||
maxLength: 500,
|
||||
nullable: true,
|
||||
example: '0.05',
|
||||
description: 'Expression to calculate waste rate (0.0-1.0)'
|
||||
),
|
||||
new OA\Property(property: 'description', type: 'string', maxLength: 500, nullable: true, example: '가로 1000mm 이상, A타입 설치시 브라켓 적용'),
|
||||
new OA\Property(property: 'priority', type: 'integer', minimum: 0, example: 1),
|
||||
new OA\Property(property: 'is_active', type: 'boolean', example: true)
|
||||
]
|
||||
)]
|
||||
class CreateBomConditionRuleRequest {}
|
||||
|
||||
#[OA\Schema(
|
||||
schema: 'UpdateBomConditionRuleRequest',
|
||||
description: 'Request schema for updating BOM condition rule',
|
||||
properties: [
|
||||
new OA\Property(property: 'name', type: 'string', maxLength: 100, example: '브라켓 선택 규칙'),
|
||||
new OA\Property(property: 'ref_type', type: 'string', enum: ['MATERIAL', 'PRODUCT'], example: 'MATERIAL'),
|
||||
new OA\Property(property: 'ref_id', type: 'integer', minimum: 1, example: 101),
|
||||
new OA\Property(
|
||||
property: 'condition_expression',
|
||||
type: 'string',
|
||||
maxLength: 1000,
|
||||
example: 'W1 >= 1000 && installation_type == "A"',
|
||||
description: 'Boolean expression to determine if this rule applies'
|
||||
),
|
||||
new OA\Property(
|
||||
property: 'quantity_expression',
|
||||
type: 'string',
|
||||
maxLength: 500,
|
||||
nullable: true,
|
||||
example: 'ceiling(W1 / 500)',
|
||||
description: 'Expression to calculate required quantity'
|
||||
),
|
||||
new OA\Property(
|
||||
property: 'waste_rate_expression',
|
||||
type: 'string',
|
||||
maxLength: 500,
|
||||
nullable: true,
|
||||
example: '0.05',
|
||||
description: 'Expression to calculate waste rate (0.0-1.0)'
|
||||
),
|
||||
new OA\Property(property: 'description', type: 'string', maxLength: 500, nullable: true, example: '가로 1000mm 이상, A타입 설치시 브라켓 적용'),
|
||||
new OA\Property(property: 'priority', type: 'integer', minimum: 0, example: 1),
|
||||
new OA\Property(property: 'is_active', type: 'boolean', example: true)
|
||||
]
|
||||
)]
|
||||
class UpdateBomConditionRuleRequest {}
|
||||
Reference in New Issue
Block a user