mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-09-01 02:43:58 +00:00
User Registration Step 2 Logic Class
Update Company Service Class Create Documents Service Class Create File Service Class Base64 File Convert Service Class File Upload Storage Service Class
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\Documents\Standards\Validators;
|
||||
|
||||
use App\Classes\General\Abstracts\AbstractValidation;
|
||||
use App\Classes\Modules\Documents\DataTransferObjects\DocumentObject;
|
||||
|
||||
class DocumentValidation extends AbstractValidation
|
||||
{
|
||||
/**
|
||||
* @param DocumentObject $object
|
||||
* @return array
|
||||
*/
|
||||
protected function data($object): array
|
||||
{
|
||||
return [
|
||||
'owner_id' => $object->getOwnerId(),
|
||||
'owner_type' => $object->getOwnerType(),
|
||||
'document_type' => $object->getDocumentType(),
|
||||
'reference' => $object->getReference(),
|
||||
'status' => $object->getStatus(),
|
||||
'approved_by' => $object->getApprovedBy(),
|
||||
'issued_date' => $object->getIssuedDate(),
|
||||
'expired_date' => $object->getExpiredDate(),
|
||||
'approved_date' => $object->getApprovedDate()
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
protected function rules(): array
|
||||
{
|
||||
return [
|
||||
'owner_id' => 'required',
|
||||
'owner_type' => 'required',
|
||||
'document_type' => 'required',
|
||||
'reference' => 'required',
|
||||
'status' => '',
|
||||
'issued_date' => '',
|
||||
'expired_date' => '',
|
||||
'approved_date' => '',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
protected function messages(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user