Files
bbq/db/models.go
T
ryan d005080aca Add attendee cap with required login for capped events
Hosts can optionally cap total attendance (RSVPs + plus-ones) when
creating an event. Capped events require guests to log in via the
existing email code flow; RSVPs are tied to accounts and deduped per
user. The event page shows spots left and replaces the form with a
full notice when the cap is reached; the server rejects over-cap
RSVPs and edits with 409 as a race backstop.

Also threads a safeNext-validated ?next= param through the login and
name-setup flow so guests land back on the event after signing in.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 19:36:57 -04:00

82 lines
1.2 KiB
Go

// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.31.1
package db
import (
"database/sql"
"time"
)
type Claim struct {
ID int64
SlotID int64
Name string
Note string
CreatedAt time.Time
}
type Event struct {
ID int64
Slug string
Title string
Date string
Time string
Location string
AdminToken string
Description string
AttendeeCap int64
UserID sql.NullInt64
CreatedAt time.Time
}
type Rsvp struct {
ID int64
EventID int64
Name string
Note string
PlusOne int64
UserID sql.NullInt64
CreatedAt time.Time
}
type Session struct {
Token string
UserID int64
ExpiresAt time.Time
}
type Slot struct {
ID int64
EventID int64
Name string
Emoji string
MaxClaims int64
SortOrder int64
}
type SmsConsent struct {
ID int64
Phone string
IpAddress string
UserAgent string
CreatedAt time.Time
}
type User struct {
ID int64
Phone sql.NullString
Email sql.NullString
Name string
CreatedAt time.Time
}
type VerificationCode struct {
ID int64
Identifier string
Code string
ExpiresAt time.Time
Used int64
}