34 lines
871 B
PHP
34 lines
871 B
PHP
<?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();
|
|
}
|
|
} |