refactor(api): split catalog module into product, category, brand
Rearranges the Rust backend by domain: `modules/catalog` bundled four distinct concepts (Product, SKU, Category, Brand) behind one router and one 392-line service file, unlike every other module in the codebase which owns exactly one bounded aggregate. Splits into `modules/product` (Product/SKU, publish lifecycle, shop-scoped CRUD), `modules/category` (category tree, subtree query), and `modules/brand` (brand list, admin replace-all). `Category`/`Brand` move out of the shared `models.rs` into their owning modules; `Product`/`Sku` stay since `favorite`/`flash_sale`/`group_buying` reference them across modules. Purely internal restructuring — no route, schema, or behavior changes. Implements openspec change split-catalog-into-product-category-brand. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
0b594c0147
commit
8446650baf
@@ -1,8 +1,9 @@
|
||||
pub mod account;
|
||||
pub mod address;
|
||||
pub mod billing;
|
||||
pub mod brand;
|
||||
pub mod cart;
|
||||
pub mod catalog;
|
||||
pub mod category;
|
||||
pub mod content;
|
||||
pub mod coupon;
|
||||
pub mod currency;
|
||||
@@ -14,6 +15,7 @@ pub mod health;
|
||||
pub mod identity;
|
||||
pub mod order;
|
||||
pub mod points;
|
||||
pub mod product;
|
||||
pub mod shop;
|
||||
|
||||
use axum::Router;
|
||||
@@ -27,7 +29,9 @@ pub fn api_router() -> Router<AppState> {
|
||||
.merge(address::router())
|
||||
.merge(identity::router())
|
||||
.merge(currency::router())
|
||||
.merge(catalog::router())
|
||||
.merge(product::router())
|
||||
.merge(category::router())
|
||||
.merge(brand::router())
|
||||
.merge(content::router())
|
||||
.merge(cart::router())
|
||||
.merge(coupon::router())
|
||||
|
||||
Reference in New Issue
Block a user