bbj2/server/cmd/db/db.go

32 lines
616 B
Go
Raw Normal View History

2022-06-01 03:27:55 +00:00
package db
2022-06-01 03:30:45 +00:00
import "time"
2022-06-01 03:27:55 +00:00
type User struct {
ID string
Username string
Hash string
}
2022-06-01 03:30:45 +00:00
type Thread struct {
ID string `json:"thread_id"`
Author string
Title string
LastMod time.Time `json:"last_mod"`
Created time.Time
ReplyCount int `json:"reply_count"`
Pinned int // TODO bool
LastAuthor string `json:"last_author"`
Messages []Message
}
type Message struct {
ThreadID string `json:"thread_id"`
PostID string `json:"post_id"`
Author string
Created time.Time
Edited int // TODO bool
Body string
SendRaw int `json:"send_raw"` // TODO bool
}