hmn/src/models/post.go

38 lines
770 B
Go
Raw Permalink Normal View History

package models
import (
"net"
"time"
)
type Post struct {
ID int `db:"id"`
AuthorID *int `db:"author_id"`
ThreadID int `db:"thread_id"`
2021-08-28 17:07:45 +00:00
CurrentID int `db:"current_id"` // The id of the current PostVersion
ProjectID int `db:"project_id"`
ReplyID *int `db:"reply_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"`
}