-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproduct.go
25 lines (22 loc) · 1.02 KB
/
product.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
package sat
// ProductStatus is a product status type
type ProductStatus int
const (
// ProductStatusActive is for product active
ProductStatusActive ProductStatus = 1
// ProductStatusInactive is for product inactive for some reason, like business reason
ProductStatusInactive ProductStatus = 2
// ProductTempInactive is for product inactive caused by some problem on supplier
ProductTempInactive ProductStatus = 3
)
// Product is a schema for product will be used by partner to identify how many products they have and allowed
type Product struct {
Name string `jsonapi:"attr,product_name"`
Code string `jsonapi:"primary,product"`
OperatorName string `jsonapi:"attr,operator_name,omitempty"`
CategoryName string `jsonapi:"attr,category_name,omitempty"`
IsInquiry bool `jsonapi:"attr,is_inquiry"`
SalesPrice int64 `jsonapi:"attr,price"`
Status ProductStatus `jsonapi:"attr,status"`
ClientNumber string `jsonapi:"attr,client_number,omitempty"`
}