Added transaction feature, fixed some mistakes
This commit is contained in:
@@ -3,6 +3,8 @@ package domain
|
||||
import "time"
|
||||
|
||||
type Position struct {
|
||||
ID int64 `json:"id"`
|
||||
ReceiptID int64 `json:"receipt_id"`
|
||||
SectionNumber string `json:"section_number"`
|
||||
GTINCode string `json:"gtin_code"`
|
||||
Tag string `json:"tag"`
|
||||
@@ -25,6 +27,7 @@ type Position struct {
|
||||
|
||||
type Receipt struct {
|
||||
ID int `json:"id"`
|
||||
TransactionID *int64 `json:"transaction_id"`
|
||||
Status int `json:"STATUS"`
|
||||
AnotherAmount float64 `json:"another_amount"`
|
||||
CashAmount float64 `json:"cash_amount"`
|
||||
@@ -64,12 +67,18 @@ type Receipt struct {
|
||||
}
|
||||
|
||||
type AddReceiptRequest struct {
|
||||
Number string `json:"number" binding:"required,min=24,max=24"`
|
||||
Date string `json:"date" binding:"required"`
|
||||
Number string `json:"number" binding:"required,min=24,max=24"`
|
||||
Date string `json:"date" binding:"required"`
|
||||
FamilyID *int64 `json:"family_id"`
|
||||
CreatedBy *int64 `json:"created_by"`
|
||||
Type *string `json:"type"`
|
||||
Category *string `json:"category"`
|
||||
Description *string `json:"description"`
|
||||
}
|
||||
|
||||
type AddReceiptResponse struct {
|
||||
ID int32 `json:"id"`
|
||||
Number string `json:"number"`
|
||||
Date time.Time `json:"date"`
|
||||
ID int32 `json:"id"`
|
||||
Number string `json:"number"`
|
||||
Date time.Time `json:"date"`
|
||||
TransactionID *int64 `json:"transaction_id,omitempty"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user