hasOne(\app\common\model\dept\Orgs::class, 'id', 'org_id'); } /** * @notes 关联dept * @return \think\model\relation\HasOne * @author likeadmin * @date 2023/12/19 15:18 */ public function dept() { return $this->hasOne(\app\common\model\dept\Dept::class, 'id', 'dept_id'); } public function contact() { return $this->hasMany(\app\common\model\supplier\SupplierContacts::class, 'supplier_id', 'id'); } }