37 lines
889 B
PHP
37 lines
889 B
PHP
<?php
|
|
|
|
namespace app\common\model;
|
|
|
|
use app\BaseModel;
|
|
use support\Model;
|
|
|
|
/**
|
|
* wa_student 学生
|
|
* @property integer $id (主键)
|
|
* @property string $student_name 学生姓名
|
|
* @property string $account 账号
|
|
* @property string $password 密码
|
|
* @property string $salt 密码盐
|
|
* @property string $nickname 昵称
|
|
* @property string $avatar 头像
|
|
* @property string $mobile 手机号
|
|
* @property string $birthday 生日
|
|
* @property integer $parent_id 家长
|
|
* @property mixed $created_at 创建时间
|
|
* @property string $updated_at 更新时间
|
|
* @property string $deleted_at
|
|
*/
|
|
class Student extends BaseModel
|
|
{
|
|
public function parent()
|
|
{
|
|
return $this->hasOne(StudentParent::class, 'id', 'parent_id')->bind(['parent_name']);
|
|
}
|
|
|
|
public function parentArr()
|
|
{
|
|
return $this->hasOne(StudentParent::class, 'id', 'parent_id');
|
|
}
|
|
|
|
}
|