micrach/repositories/structs.go

32 lines
712 B
Go
Raw Normal View History

package repositories
import "time"
type Post struct {
ID int `json:"id"`
2021-08-31 19:48:02 +03:00
IsParent bool `json:"-"`
ParentID int `json:"parentId"`
IsDeleted bool `json:"-"`
Title string `json:"title"`
Text string `json:"text"`
IsSage bool `json:"isSage"`
Files []File `json:"files"`
CreatedAt time.Time `json:"createdAt"`
2021-08-31 19:48:02 +03:00
UpdatedAt time.Time `json:"-"`
}
type File struct {
ID int `json:"-"`
PostID int `json:"-"`
CreatedAt time.Time `json:"-"`
Name string `json:"name"`
Ext string `json:"-"`
Size int `json:"size"`
}
2021-09-10 02:17:45 +03:00
type IndexPageData struct {
Threads []Post
PagesCount int
Page int
}