26 lines
711 B
Go
26 lines
711 B
Go
package model
|
|
|
|
import "time"
|
|
|
|
// ItemSpec holds mask parameters (from template CLI).
|
|
type ItemSpec struct {
|
|
SizeMM float64 `json:"size_mm"`
|
|
BleedMM float64 `json:"bleed_mm"`
|
|
MarginMM float64 `json:"margin_mm"`
|
|
PaddingMM float64 `json:"padding_mm"`
|
|
}
|
|
|
|
// Item is a printable product type (SVG mask) placed on a plate.
|
|
type Item struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name,omitempty"`
|
|
Spec ItemSpec `json:"spec"`
|
|
SVGTemplate string `json:"svg_template"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
}
|
|
|
|
// MetaFilename returns the sidecar metadata path for an SVG basename.
|
|
func MetaFilename(svgBasename string) string {
|
|
return svgBasename + ".meta.json"
|
|
}
|