feat:depotPurchase

This commit is contained in:
LAPTOP-7SGDREK0\shiweijun
2025-01-23 17:55:14 +08:00
parent 4e11fbaec8
commit d58b773dc8
4 changed files with 182 additions and 1 deletions

View File

@@ -4,6 +4,8 @@ declare(strict_types=1);
namespace App\Model;
use App\Constants\Common\DishCode;
use Hyperf\Database\Model\Builder;
use Hyperf\DbConnection\Model\Model;
/**
@@ -43,4 +45,13 @@ class Dish extends Model
const string CREATED_AT = 'create_time';
const string UPDATED_AT = 'update_time';
/**
* @param int $id
* @return \Hyperf\Database\Model\Model|Builder|null
*/
public function getInfoById(int $id): \Hyperf\Database\Model\Model|Builder|null
{
return $this->where('id',$id)->where('is_del',DishCode::IS_NO_DEL)->first();
}
}