Adds self-referencing post and post-vote tables, generated schema models, and an idempotent snapshot migration that preserves the legacy tables during the staged application cutover. Co-authored-by: codegirl-007 <s.raide@gmail.com>
73 lines
1.0 KiB
Go
73 lines
1.0 KiB
Go
// Code generated by sqlc. DO NOT EDIT.
|
|
// versions:
|
|
// sqlc v1.31.1
|
|
|
|
package sqlc
|
|
|
|
import (
|
|
"database/sql"
|
|
"time"
|
|
)
|
|
|
|
type Answer struct {
|
|
QuestionID string
|
|
AuthorID string
|
|
Body string
|
|
CreatedAt string
|
|
UpdatedAt string
|
|
}
|
|
|
|
type Post struct {
|
|
ID string
|
|
ParentID sql.NullString
|
|
AuthorID string
|
|
Title string
|
|
Body string
|
|
City string
|
|
PostDate string
|
|
Hidden int32
|
|
CreatedAt string
|
|
UpdatedAt string
|
|
}
|
|
|
|
type PostVote struct {
|
|
UserID string
|
|
PostID string
|
|
Value int32
|
|
}
|
|
|
|
type Question struct {
|
|
ID string
|
|
AuthorID string
|
|
Title string
|
|
Body string
|
|
City string
|
|
HuntDate string
|
|
Hidden int32
|
|
CreatedAt string
|
|
}
|
|
|
|
type Session struct {
|
|
Token string
|
|
Data []byte
|
|
Expiry time.Time
|
|
}
|
|
|
|
type User struct {
|
|
ID string
|
|
Username string
|
|
Name string
|
|
PasswordHash string
|
|
Role string
|
|
Email string
|
|
AvatarUrl string
|
|
State string
|
|
CreatedAt string
|
|
}
|
|
|
|
type Vote struct {
|
|
UserID string
|
|
QuestionID string
|
|
Value int32
|
|
}
|