-
Notifications
You must be signed in to change notification settings - Fork 2
/
model.go
38 lines (33 loc) · 903 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
35
36
37
38
package news
import "time"
type NewsDTO struct {
Title string `json:"title"`
Image string `json:"image"`
Content string `json:"content"`
Hashtags []string `json:"hashtags"`
}
type News struct {
ID string `json:"id"`
Title string `json:"title"`
Image string `json:"image"`
Hashtags []string `json:"hashtags"`
Content string `json:"content"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
type GetNewsQuery struct {
Hashtags []string `query:"hashtags"`
}
type NewsPageableResponse struct {
News []News `json:"news"`
Page Page `json:"page"`
}
type NewSearchCredentialsDTO struct {
ID string `json:"id"`
}
type Page struct {
Number int `json:"number"`
Size int `json:"size",omitempty`
TotalElements int `json:"totalElements",omitempty"`
TotalPages int `json:"totalPages",omitempty"`
}