making some progress

This commit is contained in:
2026-04-25 13:31:41 -06:00
parent 27088c2cd8
commit 09f4421f7f
11 changed files with 166 additions and 125 deletions

View File

@@ -8,6 +8,7 @@ import (
"database/sql/driver"
"fmt"
"github.com/google/uuid"
"github.com/jackc/pgx/v5/pgtype"
)
@@ -97,8 +98,8 @@ func (ns NullEntrantType) Value() (driver.Value, error) {
}
type AuthMethod struct {
ID pgtype.UUID `json:"id"`
UserID pgtype.UUID `json:"user_id"`
ID uuid.UUID `json:"id"`
UserID uuid.UUID `json:"user_id"`
Type AuthType `json:"type"`
Value string `json:"value"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
@@ -106,63 +107,63 @@ type AuthMethod struct {
}
type Bracket struct {
ID pgtype.UUID `json:"id"`
ID uuid.UUID `json:"id"`
Name string `json:"name"`
EventID pgtype.UUID `json:"event_id"`
EventID uuid.UUID `json:"event_id"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
}
type BracketEntrant struct {
ID pgtype.UUID `json:"id"`
ID uuid.UUID `json:"id"`
SeedOrder int32 `json:"seed_order"`
EntrantID pgtype.UUID `json:"entrant_id"`
EntrantID uuid.UUID `json:"entrant_id"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
}
type Entrant struct {
ID pgtype.UUID `json:"id"`
ID uuid.UUID `json:"id"`
Name string `json:"name"`
EventID pgtype.UUID `json:"event_id"`
EventID uuid.UUID `json:"event_id"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
}
type Event struct {
ID pgtype.UUID `json:"id"`
ID uuid.UUID `json:"id"`
Name string `json:"name"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
}
type Match struct {
ID pgtype.UUID `json:"id"`
Player1 pgtype.UUID `json:"player1"`
Player2 pgtype.UUID `json:"player2"`
Player1From pgtype.UUID `json:"player1_from"`
Player2From pgtype.UUID `json:"player2_from"`
ID uuid.UUID `json:"id"`
Player1 uuid.UUID `json:"player1"`
Player2 uuid.UUID `json:"player2"`
Player1From uuid.UUID `json:"player1_from"`
Player2From uuid.UUID `json:"player2_from"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
}
type Team struct {
ID pgtype.UUID `json:"id"`
ID uuid.UUID `json:"id"`
Name string `json:"name"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
}
type TeamEntrant struct {
ID pgtype.UUID `json:"id"`
TeamID pgtype.UUID `json:"team_id"`
EntrantID pgtype.UUID `json:"entrant_id"`
ID uuid.UUID `json:"id"`
TeamID uuid.UUID `json:"team_id"`
EntrantID uuid.UUID `json:"entrant_id"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
CreatedAt pgtype.Timestamptz `json:"created_at"`
}
type User struct {
ID pgtype.UUID `json:"id"`
ID uuid.UUID `json:"id"`
Name string `json:"name"`
Email string `json:"email"`
Bio string `json:"bio"`