修改我的医生

This commit is contained in:
2023-04-13 14:39:36 +08:00
parent a5fb1d46e7
commit 81a47d72e0
10 changed files with 291 additions and 121 deletions
+2 -1
View File
@@ -30,6 +30,7 @@ use Hyperf\Snowflake\Concern\Snowflake;
* @property string $logistics_fee 运费金额
* @property string $logistics_no 物流编号
* @property string $logistics_company_code 快递公司编码
* @property int $sub_logistics_status 快递推送订阅状态(0:未订阅/无需订阅 1:已订阅 2:订阅失败)
* @property string $delivery_time 发货时间
* @property string $pay_time 支付时间
* @property string $remarks 订单备注
@@ -70,7 +71,7 @@ class OrderProduct extends Model
/**
* The attributes that are mass assignable.
*/
protected array $fillable = ['order_product_id', 'order_inquiry_id', 'order_prescription_id', 'doctor_id', 'patient_id', 'family_id', 'order_product_no', 'escrow_trade_no', 'order_product_status', 'pay_channel', 'pay_status', 'is_delete', 'cancel_reason', 'amount_total', 'payment_amount_total', 'logistics_fee', 'logistics_no', 'logistics_company_code', 'delivery_time', 'pay_time', 'remarks', 'refund_status', 'cancel_time', 'cancel_remarks', 'report_pre_status', 'report_pre_time', 'report_pre_fail_reason', 'province_id', 'province', 'city_id', 'city', 'county_id', 'county', 'address', 'address_mask', 'consignee_name', 'consignee_name_mask', 'consignee_tel', 'consignee_tel_mask', 'created_at', 'updated_at'];
protected array $fillable = ['order_product_id', 'order_inquiry_id', 'order_prescription_id', 'doctor_id', 'patient_id', 'family_id', 'order_product_no', 'escrow_trade_no', 'order_product_status', 'pay_channel', 'pay_status', 'is_delete', 'cancel_reason', 'amount_total', 'payment_amount_total', 'logistics_fee', 'logistics_no', 'logistics_company_code', 'sub_logistics_status', 'delivery_time', 'pay_time', 'remarks', 'refund_status', 'cancel_time', 'cancel_remarks', 'report_pre_status', 'report_pre_time', 'report_pre_fail_reason', 'province_id', 'province', 'city_id', 'city', 'county_id', 'county', 'address', 'address_mask', 'consignee_name', 'consignee_name_mask', 'consignee_tel', 'consignee_tel_mask', 'created_at', 'updated_at'];
protected string $primaryKey = "order_product_id";
+70
View File
@@ -0,0 +1,70 @@
<?php
declare(strict_types=1);
namespace App\Model;
use Hyperf\Database\Model\Collection;
use Hyperf\Snowflake\Concern\Snowflake;
/**
* @property int $logistics_id 主键id
* @property int $order_product_id 药品订单id
* @property int $logistics_status 运单签收状态(0在途 1揽收 2疑难 3签收 4退签 5派件 8清关 14拒签)
* @property string $logistics_no 物流编号
* @property string $company_name 快递公司名称
* @property string $company_code 快递公司编码
* @property string $logistics_content 内容
* @property \Carbon\Carbon $created_at 创建时间
* @property \Carbon\Carbon $updated_at 修改时间
*/
class OrderProductLogistic extends Model
{
use Snowflake;
/**
* The table associated with the model.
*/
protected ?string $table = 'order_product_logistics';
/**
* The attributes that are mass assignable.
*/
protected array $fillable = ['logistics_id', 'order_product_id', 'logistics_status', 'logistics_no', 'company_name', 'company_code', 'logistics_content', 'created_at', 'updated_at'];
protected string $primaryKey = "logistics_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 Collection|array
*/
public static function getList(array $params = [], array $fields = ['*']): Collection|array
{
return self::where($params)->get($fields);
}
/**
* 获取是否存在
* @param array $params
* @return bool
*/
public static function getExists(array $params): bool
{
return self::where($params)->exists();
}
}