初始化仓库
This commit is contained in:
68
common/modelsgii/UserPatient.php
Normal file
68
common/modelsgii/UserPatient.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
namespace common\modelsgii;
|
||||
|
||||
use Yii;
|
||||
|
||||
/**
|
||||
* This is the model class for table "{{%user_patient}}".
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $user_id 关联用户
|
||||
* @property int $avatar 头像
|
||||
* @property string $name 真实姓名
|
||||
* @property string $id_card 身份证
|
||||
* @property int $age 年龄
|
||||
* @property int $sex 0默认1男2女
|
||||
* @property int $relation 关系,0本人1丈夫2妻子3爸爸4妈妈5儿子6女儿7其他
|
||||
* @property string $mobile 手机号
|
||||
* @property int $is_default 是否默认就诊人
|
||||
* @property int $is_delete 是否删除
|
||||
* @property int|null $created_at
|
||||
* @property int|null $updated_at
|
||||
*/
|
||||
class UserPatient extends \common\core\BaseActiveRecord
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function tableName()
|
||||
{
|
||||
return '{{%user_patient}}';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
[['user_id', 'name', 'id_card', 'mobile'], 'required'],
|
||||
[['user_id', 'sex', 'age','relation', 'is_default', 'is_delete', 'created_at', 'updated_at'], 'integer'],
|
||||
[['name', 'id_card'], 'string', 'max' => 50],
|
||||
[['mobile'], 'string', 'max' => 20],
|
||||
['avatar', 'string']
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function attributeLabels()
|
||||
{
|
||||
return [
|
||||
'id' => 'ID',
|
||||
'user_id' => '关联用户',
|
||||
'avatar' => '头像',
|
||||
'name' => '真实姓名',
|
||||
'id_card' => '身份证',
|
||||
'sex' => '0默认1男2女',
|
||||
'relation' => '关系,0本人1丈夫2妻子3爸爸4妈妈5儿子6女儿7其他',
|
||||
'mobile' => '手机号',
|
||||
'is_default' => '是否默认就诊人',
|
||||
'is_delete' => '是否删除',
|
||||
'created_at' => 'Created At',
|
||||
'updated_at' => 'Updated At',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user