suyuan/app/common/model/land/LandPlant.php

57 lines
1.5 KiB
PHP
Raw Permalink Normal View History

2023-11-23 14:15:41 +08:00
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\common\model\land;
use app\common\model\BaseModel;
/**
* LandPlant模型
* Class LandPlant
* @package app\common\model\land
*/
class LandPlant extends BaseModel
{
protected $name = 'land_plant';
/**
* @notes 关联land
* @return \think\model\relation\HasOne
* @author likeadmin
* @date 2023/11/23 11:32
*/
public function land()
{
return $this->hasOne(\app\common\model\land\Land::class, 'id', 'land_id');
2023-11-24 16:09:15 +08:00
}
2023-11-23 14:15:41 +08:00
2023-11-25 18:13:50 +08:00
/**
* @notes 关联user
* @return \think\model\relation\HasOne
* @author likeadmin
* @date 2023/11/25 16:16
*/
public function userinfo()
{
return $this->hasOne(\app\common\model\user\User::class, 'id', 'user_id');
}
2023-11-23 14:15:41 +08:00
}