mirror of
https://github.com/yanislav-igonin/micrach
synced 2024-12-23 06:42:33 +03:00
30 lines
684 B
Go
30 lines
684 B
Go
|
package repositories
|
||
|
|
||
|
import "time"
|
||
|
|
||
|
type Thread struct {
|
||
|
ID int `json:"id"`
|
||
|
CreatedAt time.Time `json:"-"`
|
||
|
UpdatedAt time.Time `json:"-"`
|
||
|
Posts []Post `json:"posts"`
|
||
|
}
|
||
|
|
||
|
type Post struct {
|
||
|
ID int `json:"id"`
|
||
|
ThreadID int `json:"-"`
|
||
|
Title string `json:"title"`
|
||
|
Text string `json:"text"`
|
||
|
IsSage bool `json:"isSage"`
|
||
|
Files []File `json:"files"`
|
||
|
CreatedAt time.Time `json:"createdAt"`
|
||
|
}
|
||
|
|
||
|
type File struct {
|
||
|
ID int `json:"-"`
|
||
|
PostID int `json:"-"`
|
||
|
CreatedAt time.Time `json:"-"`
|
||
|
Name string `json:"name"`
|
||
|
Ext string `json:"-"`
|
||
|
Size int `json:"size"`
|
||
|
}
|