42 lines
887 B
Go
42 lines
887 B
Go
package discount
|
|
|
|
import "github.com/uptrace/bun"
|
|
|
|
type DBDiscount struct {
|
|
bun.BaseModel `bun:"table:b_sale_discount"`
|
|
ID int64
|
|
Name string
|
|
Actions string
|
|
}
|
|
|
|
type DomainDiscounts struct {
|
|
ID int64
|
|
Name string
|
|
Actions *DomainActions
|
|
}
|
|
|
|
type DomainActions struct {
|
|
CLASSID string `json:"CLASS_ID"`
|
|
DATA struct {
|
|
All string `json:"All"`
|
|
} `json:"DATA"`
|
|
CHILDREN []struct {
|
|
CLASSID string `json:"CLASS_ID"`
|
|
DATA struct {
|
|
Type string `json:"Type"`
|
|
Value int `json:"Value"`
|
|
Unit string `json:"Unit"`
|
|
Max int `json:"Max"`
|
|
All string `json:"All"`
|
|
True string `json:"True"`
|
|
} `json:"DATA"`
|
|
CHILDREN map[string]struct {
|
|
CLASSID string `json:"CLASS_ID"`
|
|
DATA struct {
|
|
Logic string `json:"logic"`
|
|
Value string `json:"value"`
|
|
} `json:"DATA"`
|
|
} `json:"CHILDREN"`
|
|
} `json:"CHILDREN"`
|
|
}
|