Added Model Orders and Picture Upload
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
// OrderImage is one uploaded image belonging to an order.
|
||||
type OrderImage struct {
|
||||
ID string `json:"id"`
|
||||
OriginalName string `json:"original_name,omitempty"`
|
||||
ContentType string `json:"content_type,omitempty"`
|
||||
Filename string `json:"filename"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
|
||||
// Order groups an arbitrary number of customer images for printing.
|
||||
type Order struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Images []OrderImage `json:"images"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
Reference in New Issue
Block a user