feat: spu
This commit is contained in:
@@ -7,6 +7,7 @@ namespace App\Model;
|
||||
use App\Constants\Common\SiteCode;
|
||||
use Hyperf\Database\Model\Builder;
|
||||
use Hyperf\DbConnection\Model\Model;
|
||||
use Hyperf\Tappable\HigherOrderTapProxy;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
@@ -52,6 +53,15 @@ class Kitchen extends Model
|
||||
return $this->where('name', $name)->where('is_del',SiteCode::KITCHEN_NO_DEL)->first();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @return HigherOrderTapProxy|mixed|null
|
||||
*/
|
||||
public function getNameById(int $id)
|
||||
{
|
||||
return $this->where('id', $id)->value('name');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @return \Hyperf\Database\Model\Model|Builder|null
|
||||
|
||||
Reference in New Issue
Block a user