Add product dimensions and downloadable design specification sheet

- Add printAreaWidthMm and printAreaHeightMm fields to Product model
- Create API endpoint to generate design specs with CM measurements
- Add download button to order detail page
- Specs include design elements with positions/sizes in centimeters
This commit is contained in:
Andymick
2026-07-18 10:29:37 +01:00
parent ac61d95ac8
commit 4d9cfa4023
4 changed files with 269 additions and 0 deletions
+2
View File
@@ -37,6 +37,8 @@ model Product {
mockup String // which SVG mockup component to render, e.g. "tshirt" | "hoodie" | "mug" | "phonecase"
printArea String // JSON: {"xPct":..,"yPct":..,"wPct":..,"hPct":..}
printAreaBack String? // same shape, for the back print area — only used when imageUrlBack is set
printAreaWidthMm Int @default(200) // width of the printable area in millimeters
printAreaHeightMm Int @default(280) // height of the printable area in millimeters
imageUrl String? // optional real product photo — shown instead of the illustration when set
imageUrlBack String? // optional back-view photo, toggled alongside the front photo
photoRecolorable Boolean @default(false) // if true, the photo is treated as a grayscale