Files
hyperf_service/app/Model/OrderOptionCateringLog.php
2025-03-11 10:16:18 +08:00

49 lines
1.4 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Model;
use Hyperf\Database\Model\Builder;
use Hyperf\DbConnection\Model\Model;
/**
* @property int $id
* @property int $cycle_id
* @property int $kitchen_id
* @property int $site_id
* @property int $quantity
* @property int $add_staple_food_num
* @property int $status
* @property string $create_time
* @property string $update_time
*/
class OrderOptionCateringLog extends Model
{
/**
* The table associated with the model.
*/
protected ?string $table = 'order_option_catering_log';
/**
* The attributes that are mass assignable.
*/
protected array $fillable = [];
/**
* The attributes that should be cast to native types.
*/
protected array $casts = ['id' => 'integer', 'cycle_id' => 'integer', 'kitchen_id' => 'integer', 'site_id' => 'integer', 'quantity' => 'integer', 'add_staple_food_num' => 'integer', 'status' => 'integer'];
/**
* @param int $siteId
* @param int $cycleId
* @param int $kitchenId
* @return Builder|\Hyperf\Database\Model\Model|null
*/
public function getInfoBySiteIdAndCycleIdAndSiteId(int $siteId, int $cycleId, int $kitchenId): \Hyperf\Database\Model\Model|Builder|null
{
return $this->where('site_id', $siteId)->where('cycle_id', $cycleId)->where('kitchen_id',$kitchenId)->first();
}
}