feat : refund and catering
This commit is contained in:
51
app/Model/OrderMealCateringLog.php
Normal file
51
app/Model/OrderMealCateringLog.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?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();
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
@@ -25,6 +25,7 @@ use Hyperf\DbConnection\Model\Model;
|
||||
* @property string $notify_json
|
||||
* @property string $remark
|
||||
* @property string $reason
|
||||
* @property int $admin_id
|
||||
* @property string $create_time
|
||||
* @property string $update_time
|
||||
*/
|
||||
@@ -45,7 +46,7 @@ class RefundOrder extends Model
|
||||
/**
|
||||
* The attributes that should be cast to native types.
|
||||
*/
|
||||
protected array $casts = ['id' => 'integer', 'user_id' => 'integer', 'order_type' => 'integer', 'order_id' => 'integer', 'pay_id' => 'integer', 'refund_status' => 'integer', 'refund_type' => 'integer'];
|
||||
protected array $casts = ['id' => 'integer', 'user_id' => 'integer', 'order_type' => 'integer', 'order_id' => 'integer', 'pay_id' => 'integer', 'refund_status' => 'integer', 'refund_type' => 'integer', 'admin_id' => 'integer'];
|
||||
|
||||
const string CREATED_AT = 'create_time';
|
||||
const string UPDATED_AT = 'update_time';
|
||||
|
||||
Reference in New Issue
Block a user