forked from hyperledger-labs/cckit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dto.go
60 lines (49 loc) · 1.7 KB
/
dto.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package insurance
import (
"time"
"github.com/hyperledger-labs/cckit/examples/insurance/app"
)
// ContractTypesDTO type used in in "Init" func (arg) in main.go and in "listContractTypes" (return) in "invoke_insurance.go"
type ContractTypesDTO []ContractTypeDTO
type ContractTypeDTO struct {
UUID string `json:"uuid"`
*app.ContractType
}
type ContractTypeActiveDTO struct {
UUID string `json:"uuid"`
Active bool `json:"active"`
}
type ShopTypeDTO struct {
ShopType string `json:"shop_type"`
}
// CreateContractDTO type used in in "createContract" func (arg) in invoke_shop.go
type CreateContractDTO struct {
UUID string `json:"uuid"`
ContractTypeUUID string `json:"contract_type_uuid"`
Username string `json:"username"`
Password string `json:"password"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Item app.Item `json:"item"`
StartDate time.Time `json:"start_date"`
EndDate time.Time `json:"end_date"`
}
// ContractCreateResponse type used in in "createContract" func in invoke_shop.go
type ContractCreateResponse struct {
Username string `json:"username"`
Password string `json:"password"`
}
// LsContractTypeDTO type used in "listContractTypes" in invoke_insurance.go
type LsContractTypeDTO struct {
ShopType string `json:"shop_type"`
}
// type used in in "getUser" func in invoke_insurance.go
type GetUserDTO struct {
Username string `json:"username"`
}
// named type, from anonymous type used in in "getUser" func in invoke_insurance.go
type ResponseUserDTO struct {
Username string `json:"username"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
}