智慧教务系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

32 lines
579 B

<?php
namespace app\model\rel;
use app\model\personnel\Personnel;
use app\model\student\Student;
use core\base\BaseModel;
class ClassPersonnelRel extends BaseModel
{
/**
* 数据表主键
* @var string
*/
protected $pk = 'id';
/**
* 模型名称
* @var string
*/
protected $name = 'class_personnel_rel';
public function personnel()
{
return $this->hasOne(Personnel::class, 'id', 'personnel_id');
}
public function student()
{
return $this->hasOne(Student::class, 'id', 'source_id');
}
}