-
Notifications
You must be signed in to change notification settings - Fork 0
/
domain.go
51 lines (45 loc) · 1.4 KB
/
domain.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
package domain
import (
"time"
)
type Article struct {
ArticleID string `json:"article_id"`
Title string `json:"title"`
Subtitle string `json:"subtitle"`
Introduction string `json:"introduction"`
Body string `json:"body"`
Tags []string `json:"tags"`
PublishDate time.Time `json:"publish_date"`
Author AuthorInfo `json:"author_info"`
}
type AuthorInfo struct {
ID string `json:"id"`
Name string `json:"name"`
Bio string `json:"bio"`
ProfilePicture string `json:"profile_picture"`
SocialLinks []string `json:"social_links"`
Following int `json:"following"`
Followers int `json:"followers"`
}
type User struct {
UserId string `json:"user_id"`
Firstname string `json:"firstname"`
Lastname string `json:"lastname"`
Handle string `json:"handle"`
About string `json:"about"`
ProfileImage string `json:"profile_image"`
Following int `json:"following"`
Followers int `json:"followers"`
Contents []Content `json:"contents"`
}
type Content struct {
ContentId string `json:"content_id"`
CreatorId string `json:"creator_id"`
Title string `json:"title"`
Body string `json:"body"`
PublicationDate time.Time `json:"publication_date"`
}
type ContentResponse struct {
Content
User
}