-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtodo.go
More file actions
28 lines (22 loc) · 776 Bytes
/
todo.go
File metadata and controls
28 lines (22 loc) · 776 Bytes
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
package todo
import "go.mongodb.org/mongo-driver/bson/primitive"
type Todo struct {
ID primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
Title string `json:"title" bson:"title" binding:"required"`
ActiveAt string `json:"activeAt" bson:"activeAt"`
Status string `json:"status" bson:"status"`
}
type TodoRes struct {
Title string `json:"title" bson:"title" binding:"required"`
ActiveAt string `json:"activeAt" bson:"activeAt"`
}
type TodoRequset struct {
Title string `json:"title" binding:"required"`
ActiveAt string `json:"activeAt" binding:"required"`
}
type TodoURI struct {
Id string `uri:"id" binding:"required"`
}
type TodoStatus struct {
Status string `uri:"status" binding:"required"`
}