hasOne(\app\common\model\fence_house\FenceHouse::class, 'id', 'fence_house_id'); } /** * @notes 关联animalInfo * @return \think\model\relation\HasOne * @author likeadmin * @date 2024/01/15 10:11 */ public function animalInfo() { return $this->hasOne(\app\common\model\animal_info\AnimalInfo::class, 'id', 'animal_info_id'); } }