user.go

 1package models
 2
 3import (
 4	"database/sql"
 5	"time"
 6)
 7
 8// User represents a user.
 9type User struct {
10	ID        int64          `db:"id"`
11	Name      sql.NullString `db:"name"`
12	Admin     bool           `db:"admin"`
13	Password  sql.NullString `db:"password"`
14	HandleID  int64          `db:"handle_id"`
15	CreatedAt time.Time      `db:"created_at"`
16	UpdatedAt time.Time      `db:"updated_at"`
17}
18
19// UserEmail represents a user's email address.
20type UserEmail struct {
21	ID        int64     `db:"id"`
22	UserID    int64     `db:"user_id"`
23	Email     string    `db:"email"`
24	IsPrimary bool      `db:"is_primary"`
25	CreatedAt time.Time `db:"created_at"`
26	UpdatedAt time.Time `db:"updated_at"`
27}