106 lines
3.7 KiB
PHP
106 lines
3.7 KiB
PHP
<?php
|
||
|
||
namespace common\modelsgii;
|
||
|
||
use Yii;
|
||
|
||
/**
|
||
* This is the model class for table "yii_prescription".
|
||
*
|
||
* @property int $id
|
||
* @property string $prescription_no 处方编号
|
||
* @property int $su_id su_id
|
||
* @property int $user_id 用户id
|
||
* @property int $up_id 就诊人id
|
||
* @property int $status 状态 0待审核,1已通过,2未通过,3待使用,4已使用,5未使用,6已失效,7已初审
|
||
* @property int $category 类别 1自费2医保
|
||
* @property string $doctor_order 医嘱
|
||
* @property string|null $clinical_diagnose 临床诊断
|
||
* @property int $first_view 初审药师id
|
||
* @property int $first_time 初审时间
|
||
* @property int $again_view 复审药师id
|
||
* @property int $again_time 复审时间
|
||
* @property string $type 类型 1普通方2常用方
|
||
* @property string $cr_ids 中药药方ids
|
||
* @property string $wr_ids 中药药方ids
|
||
* @property int $order_type 订单类型1处方2医技
|
||
* @property float $total_pay_price
|
||
* @property int $is_pay 是否支付0否1是
|
||
* @property int $pay_time 支付时间
|
||
* @property int $pay_type 支付类型 1微信2支付宝3银行卡4其他
|
||
* @property int $cancel_status 取消状态0否1是
|
||
* @property int $cancel_time 取消时间
|
||
* @property string $cancel_remark 取消备注(未支付超时取消,主动取消,拒绝取消)
|
||
* @property int $refund_status 退款状态
|
||
* @property int $refund_time
|
||
* @property int $created_at
|
||
* @property int $updated_at
|
||
*/
|
||
class Prescription extends \common\core\BaseActiveRecord
|
||
{
|
||
/**
|
||
* {@inheritdoc}
|
||
*/
|
||
public static function tableName()
|
||
{
|
||
return 'yii_prescription';
|
||
}
|
||
|
||
/**
|
||
* {@inheritdoc}
|
||
*/
|
||
public function rules()
|
||
{
|
||
return [
|
||
[['prescription_no','store_id','content', 'prescription_type'], 'required'],
|
||
[['su_id', 'user_id', 'up_id', 'status', 'category', 'first_view', 'first_time', 'again_view', 'again_time', 'order_type', 'is_pay', 'pay_time', 'pay_type', 'cancel_status', 'cancel_time', 'refund_status', 'refund_time', 'created_at', 'updated_at'], 'integer'],
|
||
[['clinical_diagnose'], 'string'],
|
||
[['total_pay_price'], 'number'],
|
||
[['prescription_no', 'cancel_remark'], 'string', 'max' => 255],
|
||
[['doctor_order'], 'string', 'max' => 200],
|
||
[['cr_ids', 'wr_ids', 'gr_ids'], 'string', 'max' => 100],
|
||
];
|
||
}
|
||
|
||
/**
|
||
* {@inheritdoc}
|
||
*/
|
||
public function attributeLabels()
|
||
{
|
||
return [
|
||
'id' => 'ID',
|
||
'prescription_no' => 'Prescription No',
|
||
'content' => '处方快照',
|
||
'su_id' => 'Su ID',
|
||
'prescription_type' => '处方类型',
|
||
'store_id' => '门店ID',
|
||
'user_id' => 'User ID',
|
||
'up_id' => 'Up ID',
|
||
'status' => 'Status',
|
||
'category' => 'Category',
|
||
'doctor_order' => 'Doctor Order',
|
||
'clinical_diagnose' => 'Clinical Diagnose',
|
||
'first_view' => 'First View',
|
||
'first_time' => 'First Time',
|
||
'again_view' => 'Again View',
|
||
'again_time' => 'Again Time',
|
||
'type' => 'Type',
|
||
'cr_ids' => 'Cr Ids',
|
||
'wr_ids' => 'Wr Ids',
|
||
'gr_ids' => 'Gr Ids',
|
||
'order_type' => 'Order Type',
|
||
'total_pay_price' => 'Total Pay Price',
|
||
'is_pay' => 'Is Pay',
|
||
'pay_time' => 'Pay Time',
|
||
'pay_type' => 'Pay Type',
|
||
'cancel_status' => 'Cancel Status',
|
||
'cancel_time' => 'Cancel Time',
|
||
'cancel_remark' => 'Cancel Remark',
|
||
'refund_status' => 'Refund Status',
|
||
'refund_time' => 'Refund Time',
|
||
'created_at' => 'Created At',
|
||
'updated_at' => 'Updated At',
|
||
];
|
||
}
|
||
}
|