feat: Phase 8 SaaS 확장 - 구독관리/결제내역 API 추가
- 사용량 조회 API (GET /subscriptions/usage)
- 데이터 내보내기 API (POST/GET /subscriptions/export)
- 결제 명세서 API (GET /payments/{id}/statement)
- DataExport 모델 및 마이그레이션 추가
This commit is contained in:
33
app/Http/Requests/V1/Subscription/ExportStoreRequest.php
Normal file
33
app/Http/Requests/V1/Subscription/ExportStoreRequest.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\V1\Subscription;
|
||||
|
||||
use App\Models\Tenants\DataExport;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class ExportStoreRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'export_type' => ['required', 'string', Rule::in(DataExport::TYPES)],
|
||||
'options' => ['nullable', 'array'],
|
||||
'options.format' => ['nullable', 'string', Rule::in(['xlsx', 'csv', 'json'])],
|
||||
'options.include_deleted' => ['nullable', 'boolean'],
|
||||
];
|
||||
}
|
||||
|
||||
public function attributes(): array
|
||||
{
|
||||
return [
|
||||
'export_type' => __('field.export_type'),
|
||||
'options' => __('field.options'),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user