Added Printjobs

This commit is contained in:
2026-05-26 18:27:37 +02:00
parent 929969d03a
commit 2432a34198
17 changed files with 1255 additions and 8 deletions
+36
View File
@@ -0,0 +1,36 @@
package model
import "time"
// PrintJob groups a configuration with one or more orders for plate printing.
type PrintJob struct {
ID string `json:"id"`
Name string `json:"name,omitempty"`
ConfigurationID string `json:"configuration_id"`
OrderIDs []string `json:"order_ids"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
// PrintJobImageRef identifies one order image assigned to a layout slot.
type PrintJobImageRef struct {
OrderID string `json:"order_id"`
ImageID string `json:"image_id"`
}
// PrintJobSlotAssignment maps one plate item position to a customer image.
type PrintJobSlotAssignment struct {
Slot int `json:"slot"`
Image PrintJobImageRef `json:"image"`
Position LayoutPosition `json:"position"`
}
// PrintJobSummary describes image distribution and validation for a print job.
type PrintJobSummary struct {
ImageCount int `json:"image_count"`
SlotCount int `json:"slot_count"`
ImageOverflow bool `json:"image_overflow"`
Warning string `json:"warning,omitempty"`
Assignments []PrintJobSlotAssignment `json:"assignments"`
Preview LayoutPreview `json:"preview"`
}