File tree Expand file tree Collapse file tree 1 file changed +71
-0
lines changed Expand file tree Collapse file tree 1 file changed +71
-0
lines changed Original file line number Diff line number Diff line change 1+ package playground
2+
3+ import "time"
4+
5+ type Env struct {
6+ Products []Product `expr:"products"`
7+ Customers []Customer `expr:"customers"`
8+ Discounts []Discount `expr:"discounts"`
9+ Orders []Order `expr:"orders"`
10+ }
11+
12+ type Product struct {
13+ Name string
14+ Description string
15+ Price float64
16+ Stock int
17+ AddOn * AddOn
18+ Metadata map [string ]interface {}
19+ Tags []string
20+ Rating float64
21+ Reviews []Review
22+ }
23+
24+ type Feature struct {
25+ Id string
26+ Description string
27+ }
28+
29+ type Discount struct {
30+ Name string
31+ Percent int
32+ }
33+
34+ type Customer struct {
35+ FirstName string
36+ LastName string
37+ Age int
38+ Addresses []Address
39+ }
40+
41+ type Address struct {
42+ Country string
43+ City string
44+ Street string
45+ PostalCode string
46+ }
47+
48+ type Order struct {
49+ Number int
50+ Customer Customer
51+ Items []* OrderItem
52+ Discounts []* Discount
53+ CreatedAt time.Time
54+ }
55+
56+ type OrderItem struct {
57+ Product Product
58+ Quantity int
59+ }
60+
61+ type Review struct {
62+ Product * Product
63+ Customer * Customer
64+ Comment string
65+ Rating float64
66+ }
67+
68+ type AddOn struct {
69+ Name string
70+ Price float64
71+ }
You can’t perform that action at this time.
0 commit comments