aboutsummaryrefslogtreecommitdiff
path: root/models/post.go
blob: 5bbd21f650816032ade43f1d0d231a84e95db3bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package models

import (
	"database/sql"
	"github.com/lib/pq"
	"time"
	"html/template"
)

type Post struct {
	Id int `db:"id"`
	Board string `db:"board"`
	Picture template.URL `db:"picture"`
	Thread sql.NullInt32 `db:"thread"`
	ReplyTo sql.NullInt32 `db:"reply_to"`
	IpAddress sql.NullString `db:"ip_address"`
	Special sql.NullString `db:"special"`
	CreatedAt time.Time `db:"created_at"`
	UpdatedAt pq.NullTime `db:"updated_at"`
}

type Thread struct {
	Id int `db:"id"`
	Board string `db:"board"`
	Picture template.URL `db:"picture"`
	Thread sql.NullInt32 `db:"thread"`
	ReplyTo sql.NullInt32 `db:"reply_to"`
	IpAddress sql.NullString `db:"ip_address"`
	Special sql.NullString `db:"special"`
	CreatedAt time.Time `db:"created_at"`
	UpdatedAt pq.NullTime `db:"updated_at"`
	Replies int `db:"replies"`
}