feat: spu
This commit is contained in:
@@ -7,6 +7,7 @@ namespace App\Model;
|
||||
use App\Constants\Admin\UserCode;
|
||||
use Hyperf\Database\Model\Builder;
|
||||
use Hyperf\DbConnection\Model\Model;
|
||||
use Hyperf\Tappable\HigherOrderTapProxy;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
@@ -56,4 +57,13 @@ class Chef extends Model
|
||||
return $this->where('is_del',UserCode::IS_NO_DEL)->where('user_id', $userId)->first();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @return HigherOrderTapProxy|mixed|null
|
||||
*/
|
||||
public function getChineseNameById(int $id): mixed
|
||||
{
|
||||
return $this->leftJoin('admin_user', 'admin_user.id', '=', 'chef.user_id')->where('admin_user.id', $id)->value('admin.chinese_name');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user