feat: item_fields에 field_key, is_locked 컬럼 추가

- field_key: {ID}_{key} 형식으로 고유키 생성
- is_locked, locked_by, locked_at 잠금 컬럼 추가
- ItemFieldService: store/update/clone 로직 수정
- FormRequest: field_key 검증 규칙 추가
- Swagger 스키마 업데이트
This commit is contained in:
2025-11-28 17:39:14 +09:00
parent d3fb00ae26
commit aa2962314f
7 changed files with 144 additions and 8 deletions

View File

@@ -16,6 +16,7 @@ public function rules(): array
return [
'group_id' => 'nullable|integer|min:1', // 계층번호
'field_name' => 'required|string|max:255',
'field_key' => 'nullable|string|max:80|regex:/^[a-zA-Z][a-zA-Z0-9_]*$/',
'field_type' => 'required|in:textbox,number,dropdown,checkbox,date,textarea',
'is_required' => 'nullable|boolean',
'default_value' => 'nullable|string',
@@ -24,6 +25,14 @@ public function rules(): array
'validation_rules' => 'nullable|array',
'options' => 'nullable|array',
'properties' => 'nullable|array',
'is_locked' => 'nullable|boolean',
];
}
public function messages(): array
{
return [
'field_key.regex' => __('validation.field_key_format'),
];
}
}