28 lines
575 B
Go
28 lines
575 B
Go
package storage
|
|
|
|
type Post struct {
|
|
ID int `db:"id"`
|
|
Title string `db:"title"`
|
|
Content string `db:"content"`
|
|
CreatedAt string `db:"created_at"`
|
|
}
|
|
|
|
type PostReq struct {
|
|
ID int `json:"id"`
|
|
Title string `json:"title"`
|
|
Content string `json:"content"`
|
|
}
|
|
|
|
type PostCreate struct {
|
|
Title string `json:"title"`
|
|
Content string `json:"content"`
|
|
}
|
|
|
|
type User struct {
|
|
ID int `db:"id"`
|
|
Email string `db:"email"`
|
|
GithubID string `db:"github_id"`
|
|
GithubLogin string `db:"github_login"`
|
|
AvatarURL string `db:"avatar_url"`
|
|
}
|