feat : refund and catering

This commit is contained in:
2025-03-07 16:20:57 +08:00
parent d41b758d55
commit 4358491905
9 changed files with 351 additions and 7 deletions

View File

@@ -0,0 +1,46 @@
<?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 $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', 'site_id' => 'integer', 'quantity' => 'integer', 'add_staple_food_num' => 'integer', 'status' => 'integer'];
/**
* @param int $siteId
* @param int $cycleId
* @return Builder|\Hyperf\Database\Model\Model|null
*/
public function getInfoBySiteIdAndCycleId(int $siteId, int $cycleId): \Hyperf\Database\Model\Model|Builder|null
{
return $this->where('site_id', $siteId)->where('cycle_id', $cycleId)->first();
}
}