-
Notifications
You must be signed in to change notification settings - Fork 2
/
model.go
34 lines (29 loc) 路 795 Bytes
/
model.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
package model
const (
// DateLayout is a layout used for dates
DateLayout = "2006-01-02"
// AuthHeaderKey is a header key used for authorization
AuthHeaderKey = "Authorization"
)
// Item is a model of entity from mysql database
type Item struct {
ID int
Name string
LastUsageDate string
IntervalDays int
}
// UpdateItem is used for updating item in mysql database
type UpdateItem struct {
ID int
LastUsageDate string
}
// ContentResponse is a response provided by the /content GET endpoint
type ContentResponse struct {
ID int `json:"id"`
Name string `json:"name"`
Status int `json:"status"`
}
// ContentRequest is a request expected in the /content PUT endpoint
type ContentRequest struct {
ID int `json:"id" binding:"required"`
}