提交其他文件
This commit is contained in:
34
app/common/model/teamaster/Teamaster.php
Normal file
34
app/common/model/teamaster/Teamaster.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\teamaster;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\facade\{Db, Config};
|
||||
/**
|
||||
* 茶艺师列表模型
|
||||
* Class TeaUser
|
||||
* @package app\common\model\teamaster
|
||||
*/
|
||||
class Teamaster extends BaseModel
|
||||
{
|
||||
public function teamasterLevel()
|
||||
{
|
||||
return $this->hasMany('teamaster_level', 'id', 'level_id')
|
||||
->field("id,level_name")
|
||||
->where('status', 1);
|
||||
}
|
||||
public static function teamasterReal($real_id)
|
||||
{
|
||||
return TeamasterReal::where('id', $real_id)
|
||||
->field("nickname,interests,gender,age,height,weight")
|
||||
->find();
|
||||
}
|
||||
|
||||
public static function teamasterCollect($teamaster_id,$user_id)
|
||||
{
|
||||
return TeamasterCollect::where('teamaster_id', $teamaster_id)
|
||||
->where("user_id",$user_id)
|
||||
->where("status",1)
|
||||
->find();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user