Feat: Add hierarchical category support for menu organization
Added parent-child relationship to categories, allowing organization
of categories into submenus (e.g., Apparel > Adults, Kids, Babies).
Changes:
- Add parentId field to Category model
- Create foreign key relationship for category hierarchy
- Update homepage to query only top-level categories (parentId = null)
- Include children categories for future use in category menus
Database migration:
- Adds parentId column to Category table
- Sets up CASCADE delete to remove children when parent is deleted
This enables menu structure like:
Apparel
- Adults
- Kids
- Babies
Drinkware
Phone Cases
etc.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Haiku 4.5
parent
86df5a6cf0
commit
23631b1bce
@@ -135,7 +135,14 @@
|
||||
"Bash(GIT_TRACE=1 git push origin main --force)",
|
||||
"Bash(pkill -f \"node.exe\")",
|
||||
"PowerShell(Stop-Process -Name node -Force -ErrorAction SilentlyContinue)",
|
||||
"Bash(find \"D:\\\\Craft2Prints\\\\src\\\\app\" -path \"*/\\\\[slug\\\\]/*\" -name \"page.tsx\" | head -10)"
|
||||
"Bash(find \"D:\\\\Craft2Prints\\\\src\\\\app\" -path \"*/\\\\[slug\\\\]/*\" -name \"page.tsx\" | head -10)",
|
||||
"Read(//c/Users/Lyons/OneDrive/Desktop/Products/AWD T Shirts/**)",
|
||||
"Read(//c/Users/Lyons/OneDrive/Desktop/Products/**)",
|
||||
"Bash(mv AT001B_* \"Polo T Shirts/\")",
|
||||
"Bash(mv AT001M_* \"Polo T Shirts/\")",
|
||||
"Bash(mv AT002B_* \"Striped collar/\")",
|
||||
"Bash(mv AT002M_* \"Striped collar/\")",
|
||||
"Bash(cd \"/c/Users/Lyons/OneDrive/Desktop/Products/AWD T Shirts\" *)"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user