feat: 新品上市

This commit is contained in:
2025-04-27 15:18:21 +08:00
parent b7c567b406
commit 2f848b7522
6 changed files with 695 additions and 2 deletions

View File

@@ -46,4 +46,10 @@ class ProductModel extends ProductBaseModel
{
$query->where('is_hot', '=', (int)$stat);
}
// 新品状态范围查询
public function scopeIsNew($query, bool $stat = true)
{
$query->where('is_new', '=', (int)$stat);
}
}