23 lines
619 B
Go
23 lines
619 B
Go
package storage
|
|
|
|
import "time"
|
|
|
|
type Receipt struct {
|
|
ID int64 `json:"id"`
|
|
// Owner string `json:"username"`
|
|
OwnerID int64 `json:"user_id"`
|
|
ImageIDs []int64 `json:"image_ids"`
|
|
Data ReceiptData `json:"receipt_data"`
|
|
CreatedAt time.Time `json:"created_at`
|
|
UpdatedAt time.Time `json:"updated_at`
|
|
}
|
|
|
|
type ReceiptData struct {
|
|
Date time.Time `json:"date"`
|
|
Subtotal float64 `json:"subtotal"`
|
|
Total float64 `json:"total"`
|
|
Tax float64 `json:"tax"`
|
|
Items map[string]float64 `json:"items"`
|
|
// Currency string `json:"currency"`
|
|
}
|