feat: spu

This commit is contained in:
2025-01-21 10:28:40 +08:00
parent 8e454659e1
commit df78fc705d
5 changed files with 63 additions and 1 deletions

View File

@@ -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