mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-31 10:24:00 +00:00
dec78bf8d7
Update Currency Selling Logic Class Delete Currency Selling Logic Class Create Currency Log Service Class
46 lines
1.0 KiB
PHP
46 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Currencies\Standards\Validators;
|
|
|
|
use App\Classes\General\Abstracts\AbstractValidation;
|
|
use App\Classes\Modules\Currencies\DataTransferObjects\CurrencyObject;
|
|
|
|
class CurrencyValidation extends AbstractValidation
|
|
{
|
|
/**
|
|
* @param CurrencyObject $object
|
|
* @return array
|
|
*/
|
|
protected function data($object): array
|
|
{
|
|
return [
|
|
'country_id' => $object->getCountryId(),
|
|
'name' => $object->getName(),
|
|
'short_code' => $object->getShortCode(),
|
|
'symbol' => $object->getSymbol(),
|
|
'selling' => $object->getSelling()
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
protected function rules(): array
|
|
{
|
|
return [
|
|
'country_id' => 'required',
|
|
'name' => 'required',
|
|
'short_code' => 'required',
|
|
'short_code' => 'required',
|
|
'selling' => 'required',
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
protected function messages(): array
|
|
{
|
|
return [];
|
|
}
|
|
} |