9d845c8899
- backend moved to backend directory - added and initialized frontend with vue - moved infrastructure files to infra directory
76 lines
2.2 KiB
Go
76 lines
2.2 KiB
Go
package domain
|
|
|
|
import "time"
|
|
|
|
type Position struct {
|
|
SectionNumber string `json:"section_number"`
|
|
GTINCode string `json:"gtin_code"`
|
|
Tag string `json:"tag"`
|
|
MarkingCode string `json:"marking_code"`
|
|
UKZCode string `json:"ukz_code"`
|
|
ProductName string `json:"product_name"`
|
|
|
|
ProductCountRaw string `json:"product_count"`
|
|
ProductCount float64 `json:"-"`
|
|
|
|
AmountRaw string `json:"amount"`
|
|
Amount float64 `json:"-"`
|
|
|
|
DiscountRaw string `json:"discount"`
|
|
Discount float64 `json:"-"`
|
|
|
|
SurchargeRaw string `json:"surcharge"`
|
|
Surcharge float64 `json:"-"`
|
|
}
|
|
|
|
type Receipt struct {
|
|
ID int `json:"id"`
|
|
Status int `json:"STATUS"`
|
|
AnotherAmount float64 `json:"another_amount"`
|
|
CashAmount float64 `json:"cash_amount"`
|
|
CashboxNumber int64 `json:"cashbox_number"`
|
|
Cashier string `json:"cashier"`
|
|
ClearingAmount float64 `json:"clearing_amount"`
|
|
Currency string `json:"currency"`
|
|
DocNum string `json:"doc_num"`
|
|
HouseTo string `json:"house_to"`
|
|
KodSoato string `json:"kod_soato"`
|
|
Margin float64 `json:"margin"`
|
|
NameNP string `json:"name_np"`
|
|
NameSPD string `json:"name_spd"`
|
|
NameTO string `json:"name_to"`
|
|
|
|
OblastSoato *string `json:"oblast_soato"`
|
|
RayonSoato *string `json:"rayon_soato"`
|
|
SelsovetSoato *string `json:"selsovet_soato"`
|
|
|
|
PaymentAmount float64 `json:"payment_amount"`
|
|
PaymentType int `json:"payment_type"`
|
|
|
|
ReceiptNumber string `json:"receipt_number"`
|
|
SknoNumber string `json:"skno_number"`
|
|
StreetTo string `json:"street_to"`
|
|
Success string `json:"success"`
|
|
TotalAmount float64 `json:"total_amount"`
|
|
TypeNP string `json:"type_np"`
|
|
UI string `json:"ui"`
|
|
UNP string `json:"unp"`
|
|
|
|
IssuedAtRaw string `json:"issued_at"`
|
|
IssuedAt time.Time `json:"-"`
|
|
|
|
PositionsRaw string `json:"positions"`
|
|
Positions []Position `json:"-"`
|
|
}
|
|
|
|
type AddReceiptRequest struct {
|
|
Number string `json:"number" binding:"required,min=24,max=24"`
|
|
Date string `json:"date" binding:"required"`
|
|
}
|
|
|
|
type AddReceiptResponse struct {
|
|
ID int32 `json:"id"`
|
|
Number string `json:"number"`
|
|
Date time.Time `json:"date"`
|
|
}
|