31 lines
993 B
PHP
31 lines
993 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Payments;
|
|
|
|
use App\Http\Requests\ApiFormRequest;
|
|
|
|
class PaymentTransactionCreateRequest extends ApiFormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'transaction_id' => ['required', 'string', 'max:100'],
|
|
'payment_id' => ['required', 'integer', 'min:1'],
|
|
'transaction_date' => ['nullable', 'date'],
|
|
'amount' => ['required', 'numeric', 'min:0.01'],
|
|
'payment_method' => ['required', 'string', 'max:50'],
|
|
'payment_status' => ['nullable', 'string', 'max:50'],
|
|
'transaction_fee' => ['nullable', 'numeric', 'min:0'],
|
|
'payment_reference' => ['nullable', 'string', 'max:100'],
|
|
'is_full_payment' => ['nullable', 'boolean'],
|
|
'school_year' => ['nullable', 'string', 'max:50'],
|
|
'semester' => ['nullable', 'string', 'max:50'],
|
|
];
|
|
}
|
|
}
|