hmn/src/models/post.go

38 lines
734 B
Go
Raw Normal View History

package models
import (
"net"
"time"
)
type Post struct {
ID int `db:"id"`
// TODO: Document each of these
AuthorID *int `db:"author_id"`
ThreadID int `db:"thread_id"`
CurrentID int `db:"current_id"`
ProjectID int `db:"project_id"`
ThreadType ThreadType `db:"thread_type"`
2021-07-04 21:24:48 +00:00
PostDate time.Time `db:"postdate"`
Deleted bool `db:"deleted"`
Preview string `db:"preview"`
ReadOnly bool `db:"readonly"`
}
2021-04-23 04:07:44 +00:00
type PostVersion struct {
ID int `db:"id"`
PostID int `db:"post_id"`
TextRaw string `db:"text_raw"`
TextParsed string `db:"text_parsed"`
2021-07-04 21:24:48 +00:00
IP *net.IPNet `db:"ip"`
Date time.Time `db:"date"`
2021-04-23 04:07:44 +00:00
EditReason string `db:"edit_reason"`
EditorID *int `db:"editor_id"`
}