新增发起提现接口
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Model;
|
||||
|
||||
|
||||
|
||||
use Hyperf\Snowflake\Concern\Snowflake;
|
||||
|
||||
/**
|
||||
* @property int $withdrawal_order_id 主键id
|
||||
* @property int $withdrawal_id 提现表id
|
||||
* @property int $doctor_id 医生id
|
||||
* @property int $order_inquiry_id 订单-问诊id
|
||||
* @property \Carbon\Carbon $created_at 创建时间
|
||||
* @property \Carbon\Carbon $updated_at 修改时间
|
||||
*/
|
||||
class DoctorWithdrawalOrder extends Model
|
||||
{
|
||||
use Snowflake;
|
||||
|
||||
/**
|
||||
* The table associated with the model.
|
||||
*/
|
||||
protected ?string $table = 'doctor_withdrawal_order';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected array $fillable = ['withdrawal_order_id', 'withdrawal_id', 'doctor_id', 'order_inquiry_id', 'created_at', 'updated_at'];
|
||||
|
||||
protected string $primaryKey = "withdrawal_order_id";
|
||||
|
||||
|
||||
/**
|
||||
* 获取信息-单条
|
||||
* @param array $params
|
||||
* @param array $fields
|
||||
* @return object|null
|
||||
*/
|
||||
public static function getOne(array $params, array $fields = ['*']): object|null
|
||||
{
|
||||
return self::where($params)->first($fields);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取信息-多条
|
||||
* @param array $params
|
||||
* @param array $fields
|
||||
* @return object|null
|
||||
*/
|
||||
public static function getList(array $params, array $fields = ['*']): object|null
|
||||
{
|
||||
return self::where($params)->get($fields);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param array $data
|
||||
* @return DoctorWithdrawalOrder|\Hyperf\Database\Model\Model
|
||||
*/
|
||||
public static function addDoctorWithdrawalOrder(array $data): \Hyperf\Database\Model\Model|DoctorWithdrawalOrder
|
||||
{
|
||||
return self::create($data);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user