forked from masseelch/elk
/
request.go
100 lines (89 loc) · 3.2 KB
/
request.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
// Code generated by entc, DO NOT EDIT.
package http
import (
"time"
"github.com/google/uuid"
badge "github.com/chestarss/elk/internal/pets/ent/badge"
pet "github.com/chestarss/elk/internal/pets/ent/pet"
playgroup "github.com/chestarss/elk/internal/pets/ent/playgroup"
toy "github.com/chestarss/elk/internal/pets/ent/toy"
)
// Payload of a ent.Badge create request.
type BadgeCreateRequest struct {
Color *badge.Color `json:"color"`
Material *badge.Material `json:"material"`
Wearer *int `json:"wearer"`
}
// Payload of a ent.Badge update request.
type BadgeUpdateRequest struct {
Color *badge.Color `json:"color"`
Material *badge.Material `json:"material"`
Wearer *int `json:"wearer"`
}
// Payload of a ent.Pet create request.
type PetCreateRequest struct {
Height *int `json:"height"`
Weight *float64 `json:"weight"`
Castrated *bool `json:"castrated"`
Name *string `json:"name"`
Birthday *time.Time `json:"birthday"`
Nicknames *[]string `json:"nicknames"`
Sex *pet.Sex `json:"sex"`
Chip *uuid.UUID `json:"chip"`
Badge *uint32 `json:"badge"`
Protege *int `json:"protege"`
Mentor *int `json:"mentor"`
Spouse *int `json:"spouse"`
Toys []uuid.UUID `json:"toys"`
Parent *int `json:"parent"`
Children []int `json:"children"`
PlayGroups []int `json:"play_groups"`
Friends []int `json:"friends"`
}
// Payload of a ent.Pet update request.
type PetUpdateRequest struct {
Height *int `json:"height"`
Weight *float64 `json:"weight"`
Castrated *bool `json:"castrated"`
Name *string `json:"name"`
Birthday *time.Time `json:"birthday"`
Nicknames *[]string `json:"nicknames"`
Chip *uuid.UUID `json:"chip"`
Badge *uint32 `json:"badge"`
Protege *int `json:"protege"`
Mentor *int `json:"mentor"`
Spouse *int `json:"spouse"`
Toys []uuid.UUID `json:"toys"`
Parent *int `json:"parent"`
Children []int `json:"children"`
PlayGroups []int `json:"play_groups"`
Friends []int `json:"friends"`
}
// Payload of a ent.PlayGroup create request.
type PlayGroupCreateRequest struct {
Title *string `json:"title"`
Description *string `json:"description"`
Weekday *playgroup.Weekday `json:"weekday"`
Participants []int `json:"participants"`
}
// Payload of a ent.PlayGroup update request.
type PlayGroupUpdateRequest struct {
Title *string `json:"title"`
Description *string `json:"description"`
Weekday *playgroup.Weekday `json:"weekday"`
Participants []int `json:"participants"`
}
// Payload of a ent.Toy create request.
type ToyCreateRequest struct {
Color *toy.Color `json:"color"`
Material *toy.Material `json:"material"`
Title *string `json:"title"`
Owner *int `json:"owner"`
}
// Payload of a ent.Toy update request.
type ToyUpdateRequest struct {
Color *toy.Color `json:"color"`
Material *toy.Material `json:"material"`
Title *string `json:"title"`
Owner *int `json:"owner"`
}