63 lines
1.4 KiB
PHP
63 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace common\modelsgii;
|
|
|
|
use Yii;
|
|
|
|
/**
|
|
* This is the model class for table "{{%doctor_patient}}".
|
|
*
|
|
* @property $id ID
|
|
* @property $user_id 用户ID
|
|
* @property $su_id 医生ID
|
|
* @property $up_id 患者ID
|
|
* @property $name 真实姓名
|
|
* @property $avatar 头像
|
|
* @property $id_card 身份证
|
|
* @property $sex 0默认1男2女
|
|
* @property $mobile 手机号
|
|
* @property $created_at 创建时间
|
|
* @property $updated_at 更新时间
|
|
*/
|
|
class DoctorPatient extends \common\core\BaseActiveRecord
|
|
{
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
public static function tableName()
|
|
{
|
|
return '{{%doctor_patient}}';
|
|
}
|
|
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
public function rules()
|
|
{
|
|
return [
|
|
[['name', 'avatar', 'id_card'], 'string'],
|
|
[['user_id', 'su_id', 'up_id', 'sex', 'mobile', 'created_at', 'updated_at'], 'integer'],
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
public function attributeLabels()
|
|
{
|
|
return [
|
|
'id' => 'ID',
|
|
'user_id' => '用户ID',
|
|
'su_id' => '医生ID',
|
|
'up_id' => '患者ID',
|
|
'name' => '真实姓名',
|
|
'avatar' => '头像',
|
|
'id_card' => '身份证',
|
|
'sex' => '0默认1男2女',
|
|
'mobile' => '手机号',
|
|
'created_at' => '创建时间',
|
|
'updated_at' => '更新时间',
|
|
];
|
|
}
|
|
}
|