Files
exchange-2.0/app/Classes/Modules/SegmentCompanies/Standards/Validators/SegmentCompanyValidation.php
T
CheeSiong 1fbdc795ff - Segment Company Relationship Service Class
- Update Standard Segment Constant Logic Class
- List Standard Segment Constant Logic Class
- List Standard Segment Logic Class
2020-11-13 14:15:34 +08:00

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 [];
}
}