Files
hyperf_service/app/Model/OrderMealCateringLog.php
2025-03-07 16:20:57 +08:00

52 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 $site_id
* @property int $sku_id
* @property int $quantity
* @property int $status
* @property string $create_time
* @property string $update_time
*/
class OrderMealCateringLog extends Model
{
/**
* The table associated with the model.
*/
protected ?string $table = 'order_meal_catering_log';
/**
* The attributes that are mass assignable.
*/
protected array $fillable = [];
protected array $guarded = [];
/**
* The attributes that should be cast to native types.
*/
protected array $casts = ['id' => 'integer', 'cycle_id' => 'integer', 'site_id' => 'integer', 'sku_id' => 'integer', 'quantity' => 'integer', 'status' => 'integer'];
const string CREATED_AT = 'create_time';
const string UPDATED_AT = 'update_time';
/**
* @param int $siteId
* @param int $cycleId
* @param int $skuId
* @return Builder|\Hyperf\Database\Model\Model|null
*/
public function getInfoBySiteIdAndCycleIdAndSkuId(int $siteId, int $cycleId,int $skuId): \Hyperf\Database\Model\Model|Builder|null
{
return $this->where('site_id', $siteId)->where('cycle_id', $cycleId)->where('sku_id',$skuId)->first();
}
}