-
Notifications
You must be signed in to change notification settings - Fork 0
/
receipt.go
31 lines (26 loc) · 1.06 KB
/
receipt.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package entities
type Brand struct {
Description string `json:"description"`
Id int64 `json:"id" gorm:"primaryKey;autoIncrement:false"`
Image *string `json:"image"`
Name string `json:"name"`
}
type Receipt struct {
UserPhone string `json:"-" gorm:"index"`
User User `json:"-" gorm:"constraint:OnDelete:CASCADE"`
BrandId *int64 `json:"brandId" gorm:"index"`
Brand *Brand `json:"-" gorm:"constraint:OnDelete:CASCADE"`
Buyer string `json:"buyer"`
BuyerType string `json:"buyerType"`
CreatedDate DateTime `json:"createdDate" gorm:"index"`
FiscalDocumentNumber string `json:"fiscalDocumentNumber"`
FiscalDriveNumber string `json:"fiscalDriveNumber"`
Key string `json:"key" gorm:"primaryKey"`
KktOwner string `json:"kktOwner"`
KktOwnerInn string `json:"kktOwnerInn"`
ReceiveDate DateTime `json:"receiveDate" gorm:"index"`
TotalSum string `json:"totalSum"`
}
func (r Receipt) TableName() string {
return "receipts"
}