Skip to content

Commit

Permalink
Add playground env
Browse files Browse the repository at this point in the history
  • Loading branch information
antonmedv committed Feb 15, 2023
1 parent 38ec8e7 commit 258758e
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions test/playground/env.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
package playground

import "time"

type Env struct {
Products []Product `expr:"products"`
Customers []Customer `expr:"customers"`
Discounts []Discount `expr:"discounts"`
Orders []Order `expr:"orders"`
}

type Product struct {
Name string
Description string
Price float64
Stock int
AddOn *AddOn
Metadata map[string]interface{}
Tags []string
Rating float64
Reviews []Review
}

type Feature struct {
Id string
Description string
}

type Discount struct {
Name string
Percent int
}

type Customer struct {
FirstName string
LastName string
Age int
Addresses []Address
}

type Address struct {
Country string
City string
Street string
PostalCode string
}

type Order struct {
Number int
Customer Customer
Items []*OrderItem
Discounts []*Discount
CreatedAt time.Time
}

type OrderItem struct {
Product Product
Quantity int
}

type Review struct {
Product *Product
Customer *Customer
Comment string
Rating float64
}

type AddOn struct {
Name string
Price float64
}

0 comments on commit 258758e

Please sign in to comment.