feat: [demo] 데모 테넌트 관리 API 및 만료 알림 (Phase 3)
- DemoTenantController: 목록/상세/생성/리셋/연장/전환/통계 API - DemoTenantStoreRequest: 고객 체험 테넌트 생성 검증 - DemoTenantService: API용 메서드 추가 (index/show/reset/extend/convert/stats) - CheckDemoExpiredCommand: 만료 임박(7일) 알림 + 만료 테넌트 비활성 처리 - 라우트 등록 (api/v1/demo-tenants, 7개 엔드포인트) - 스케줄러 등록 (04:20 demo:check-expired) - i18n 메시지 추가 (message.demo_tenant.*, error.demo_tenant.*)
This commit is contained in:
35
app/Http/Requests/Demo/DemoTenantStoreRequest.php
Normal file
35
app/Http/Requests/Demo/DemoTenantStoreRequest.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Demo;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class DemoTenantStoreRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'company_name' => 'required|string|max:100',
|
||||
'email' => 'required|email|max:255',
|
||||
'duration_days' => 'sometimes|integer|min:7|max:60',
|
||||
'preset' => 'sometimes|string|in:manufacturing',
|
||||
];
|
||||
}
|
||||
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
'company_name.required' => '회사명은 필수입니다.',
|
||||
'email.required' => '이메일은 필수입니다.',
|
||||
'email.email' => '올바른 이메일 형식이 아닙니다.',
|
||||
'duration_days.min' => '체험 기간은 최소 7일입니다.',
|
||||
'duration_days.max' => '체험 기간은 최대 60일입니다.',
|
||||
'preset.in' => '유효하지 않은 프리셋입니다.',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user