You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
793 B
32 lines
793 B
<?php
|
|
|
|
|
|
namespace App\Service\v3\Implementations;
|
|
use App\Model\v3\Store;
|
|
use \App\Service\v3\Interfaces\BusinessHoursServiceInterface;
|
|
|
|
class BusinessHoursService implements BusinessHoursServiceInterface
|
|
{
|
|
|
|
public function do($storeId,$isRest,$time1,$time2,$time3 = '',$time4 = '')
|
|
{
|
|
$store = Store::query()->find($storeId);
|
|
$store->is_rest = $isRest;
|
|
$store->time1 = $time1;
|
|
$store->time2 = $time2;
|
|
$store->time3 = $time3;
|
|
$store->time4 = $time4;
|
|
return $store->save();
|
|
}
|
|
|
|
public function check($storeId)
|
|
{
|
|
$res = Store::query()->select('is_rest','time1','time2','time3','time4')->find($storeId);
|
|
return $res;
|
|
}
|
|
|
|
public function undo()
|
|
{
|
|
// TODO: Implement undo() method.
|
|
}
|
|
}
|