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:
107
app/Http/Controllers/Api/V1/Schemas/ModelParameterSchemas.php
Normal file
107
app/Http/Controllers/Api/V1/Schemas/ModelParameterSchemas.php
Normal file
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Api\V1\Schemas;
|
||||
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
/**
|
||||
* Model Parameter related Swagger schemas
|
||||
*/
|
||||
|
||||
#[OA\Schema(
|
||||
schema: 'ModelParameterResource',
|
||||
description: 'Model parameter resource',
|
||||
properties: [
|
||||
new OA\Property(property: 'id', type: 'integer', example: 1),
|
||||
new OA\Property(property: 'model_id', type: 'integer', example: 1),
|
||||
new OA\Property(property: 'name', type: 'string', example: 'W0'),
|
||||
new OA\Property(property: 'label', type: 'string', example: '가로 크기'),
|
||||
new OA\Property(property: 'type', type: 'string', enum: ['INPUT', 'OUTPUT'], example: 'INPUT'),
|
||||
new OA\Property(property: 'data_type', type: 'string', enum: ['INTEGER', 'DECIMAL', 'STRING', 'BOOLEAN'], example: 'DECIMAL'),
|
||||
new OA\Property(property: 'unit', type: 'string', nullable: true, example: 'mm'),
|
||||
new OA\Property(property: 'default_value', type: 'string', nullable: true, example: '1000'),
|
||||
new OA\Property(property: 'min_value', type: 'number', nullable: true, example: 500),
|
||||
new OA\Property(property: 'max_value', type: 'number', nullable: true, example: 2000),
|
||||
new OA\Property(
|
||||
property: 'enum_values',
|
||||
type: 'array',
|
||||
items: new OA\Items(type: 'string'),
|
||||
nullable: true,
|
||||
example: ['A', 'B', 'C']
|
||||
),
|
||||
new OA\Property(property: 'validation_rules', type: 'string', nullable: true, example: 'required|numeric|min:500'),
|
||||
new OA\Property(property: 'description', type: 'string', nullable: true, example: '제품의 가로 크기를 입력하세요'),
|
||||
new OA\Property(property: 'is_required', type: 'boolean', example: true),
|
||||
new OA\Property(property: 'display_order', type: 'integer', example: 1),
|
||||
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')
|
||||
]
|
||||
)]
|
||||
class ModelParameterResource {}
|
||||
|
||||
#[OA\Schema(
|
||||
schema: 'CreateModelParameterRequest',
|
||||
description: 'Request schema for creating model parameter',
|
||||
required: ['name', 'label', 'type', 'data_type'],
|
||||
properties: [
|
||||
new OA\Property(
|
||||
property: 'name',
|
||||
type: 'string',
|
||||
maxLength: 50,
|
||||
example: 'W0',
|
||||
description: 'Parameter name (alphanumeric with underscore, must start with letter)'
|
||||
),
|
||||
new OA\Property(property: 'label', type: 'string', maxLength: 100, example: '가로 크기'),
|
||||
new OA\Property(property: 'type', type: 'string', enum: ['INPUT', 'OUTPUT'], example: 'INPUT'),
|
||||
new OA\Property(property: 'data_type', type: 'string', enum: ['INTEGER', 'DECIMAL', 'STRING', 'BOOLEAN'], example: 'DECIMAL'),
|
||||
new OA\Property(property: 'unit', type: 'string', maxLength: 20, nullable: true, example: 'mm'),
|
||||
new OA\Property(property: 'default_value', type: 'string', maxLength: 255, nullable: true, example: '1000'),
|
||||
new OA\Property(property: 'min_value', type: 'number', nullable: true, example: 500),
|
||||
new OA\Property(property: 'max_value', type: 'number', nullable: true, example: 2000),
|
||||
new OA\Property(
|
||||
property: 'enum_values',
|
||||
type: 'array',
|
||||
items: new OA\Items(type: 'string'),
|
||||
nullable: true,
|
||||
example: ['A', 'B', 'C']
|
||||
),
|
||||
new OA\Property(property: 'validation_rules', type: 'string', maxLength: 500, nullable: true, example: 'required|numeric|min:500'),
|
||||
new OA\Property(property: 'description', type: 'string', maxLength: 500, nullable: true, example: '제품의 가로 크기를 입력하세요'),
|
||||
new OA\Property(property: 'is_required', type: 'boolean', example: true),
|
||||
new OA\Property(property: 'display_order', type: 'integer', minimum: 0, example: 1)
|
||||
]
|
||||
)]
|
||||
class CreateModelParameterRequest {}
|
||||
|
||||
#[OA\Schema(
|
||||
schema: 'UpdateModelParameterRequest',
|
||||
description: 'Request schema for updating model parameter',
|
||||
properties: [
|
||||
new OA\Property(
|
||||
property: 'name',
|
||||
type: 'string',
|
||||
maxLength: 50,
|
||||
example: 'W0',
|
||||
description: 'Parameter name (alphanumeric with underscore, must start with letter)'
|
||||
),
|
||||
new OA\Property(property: 'label', type: 'string', maxLength: 100, example: '가로 크기'),
|
||||
new OA\Property(property: 'type', type: 'string', enum: ['INPUT', 'OUTPUT'], example: 'INPUT'),
|
||||
new OA\Property(property: 'data_type', type: 'string', enum: ['INTEGER', 'DECIMAL', 'STRING', 'BOOLEAN'], example: 'DECIMAL'),
|
||||
new OA\Property(property: 'unit', type: 'string', maxLength: 20, nullable: true, example: 'mm'),
|
||||
new OA\Property(property: 'default_value', type: 'string', maxLength: 255, nullable: true, example: '1000'),
|
||||
new OA\Property(property: 'min_value', type: 'number', nullable: true, example: 500),
|
||||
new OA\Property(property: 'max_value', type: 'number', nullable: true, example: 2000),
|
||||
new OA\Property(
|
||||
property: 'enum_values',
|
||||
type: 'array',
|
||||
items: new OA\Items(type: 'string'),
|
||||
nullable: true,
|
||||
example: ['A', 'B', 'C']
|
||||
),
|
||||
new OA\Property(property: 'validation_rules', type: 'string', maxLength: 500, nullable: true, example: 'required|numeric|min:500'),
|
||||
new OA\Property(property: 'description', type: 'string', maxLength: 500, nullable: true, example: '제품의 가로 크기를 입력하세요'),
|
||||
new OA\Property(property: 'is_required', type: 'boolean', example: true),
|
||||
new OA\Property(property: 'display_order', type: 'integer', minimum: 0, example: 1)
|
||||
]
|
||||
)]
|
||||
class UpdateModelParameterRequest {}
|
||||
Reference in New Issue
Block a user