mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
27 lines
846 B
PHP
27 lines
846 B
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Segments\Services;
|
|
|
|
use App\Classes\General\Eloquent\AbstractUpdateRecord;
|
|
use App\Classes\Modules\Segments\DataTransferObjects\SeasonalSegmentObject;
|
|
use App\Models\SeasonalSegment;
|
|
use App\Models\Company;
|
|
|
|
class CreatesSeasonalSegment extends AbstractUpdateRecord
|
|
{
|
|
/**
|
|
* @param SeasonalSegmentObject $object
|
|
* @return \Illuminate\Database\Eloquent\Model
|
|
* @throws \App\Classes\Exceptions\MalformedRequestException
|
|
*/
|
|
public function execute(SeasonalSegmentObject $object) {
|
|
$model = new SeasonalSegment();
|
|
$model->company_id = $object->getCompanyId();
|
|
$model->segment_id = $object->getSegmentId();
|
|
$model->starting_on = $object->getStartingOn();
|
|
$model->ending_on = $object->getEndingOn();
|
|
|
|
return $this->handler($model);
|
|
|
|
}
|
|
} |