mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
1fbdc795ff
- Update Standard Segment Constant Logic Class - List Standard Segment Constant Logic Class - List Standard Segment Logic Class
40 lines
857 B
PHP
40 lines
857 B
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\SegmentCompanies\Standards\Validators;
|
|
|
|
use App\Classes\General\Abstracts\AbstractValidation;
|
|
use App\Classes\Modules\SegmentCompanies\DataTransferObjects\CompanyEmployeeObject;
|
|
|
|
class SegmentCompanyValidation extends AbstractValidation
|
|
{
|
|
/**
|
|
* @param CompanyEmployeeObject $object
|
|
* @return array
|
|
*/
|
|
protected function data($object): array
|
|
{
|
|
return [
|
|
'segment_id' => $object->getSegmentId(),
|
|
'company_id' => $object->getCompanyId(),
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
protected function rules(): array
|
|
{
|
|
return [
|
|
'segment_id' => 'required',
|
|
'company_id' => 'required',
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
protected function messages(): array
|
|
{
|
|
return [];
|
|
}
|
|
} |