- 사용량 조회 API (GET /subscriptions/usage)
- 데이터 내보내기 API (POST/GET /subscriptions/export)
- 결제 명세서 API (GET /payments/{id}/statement)
- DataExport 모델 및 마이그레이션 추가
34 lines
829 B
PHP
34 lines
829 B
PHP
<?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'),
|
|
];
|
|
}
|
|
}
|