feat : refund and catering
This commit is contained in:
46
app/Model/OrderOptionCateringLog.php
Normal file
46
app/Model/OrderOptionCateringLog.php
Normal 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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user