class StudentSenior extends Model
{
//关联基础表模型
public function students(){
return $this->belongsTo('Student', 'student_id', 'id');
}
//关联离校学习表模型
public function study(){
return $this->belongsTo('LeaveStudy', 'student_id', 'student_id');
}
//关联离校工作表模型
public function work(){
return $this->belongsTo('LeaveWork', 'student_id', 'student_id');
}
//关联小学表模型
public function primary(){
return $this->belongsTo('StudentPrimary', 'student_id', 'student_id');
}
//关联初中表模型
public function junior(){
return $this->belongsTo('StudentJunior', 'student_id', 'student_id');
}
}