Files
member-console/internal/identity/models.go
Christian Galo f23a84999c sqlc: standardize generated type names across all modules
Drop redundant schema prefixes from all sqlc-generated Go types. Since
each module generates into its own package, the package already provides
the namespace — billing.Account is unambiguous without
billing.BillingAccount.

Changes:
- Add rename: blocks to all 6 sqlc.yaml files mapping schema-prefixed
  names to clean idiomatic names (e.g. BillingBillingAccount → Account,
  IdentityPerson → Person, OrganizationOrganization → Organization)
- Rename billing.billing_accounts → billing.accounts (table name
  repeated
  the schema; the schema already provides that context)
- Rename integration.integration_outbox → integration.outbox (same
  reason)
- Regenerate all sqlc output across billing, identity, organization,
  entitlements, stripe, and fedwiki modules
- Update all calling code (server, workflows, provisioning, tests) to
  use
  the new names
- Add internal/db/sqlc_schemas.sql — sqlc-only schema declarations so
  every module can resolve schema-qualified names without including the
  full db migrations
- Update docs/database-management.md with the naming convention and
  standard sqlc.yaml template

Convention going forward: table names must not repeat the schema name;
generated types carry no schema prefix; the Go package provides the
namespace (like http.Request, not http.HttpRequest).
2026-04-05 02:35:36 -05:00

32 lines
933 B
Go

// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.29.0
package identity
import (
"database/sql"
"time"
)
type Person struct {
PersonID string `json:"person_id"`
UserID string `json:"user_id"`
DisplayName string `json:"display_name"`
PrimaryEmail string `json:"primary_email"`
PrimaryEmailVerified bool `json:"primary_email_verified"`
Status string `json:"status"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type User struct {
UserID string `json:"user_id"`
OidcSubject string `json:"oidc_subject"`
Status string `json:"status"`
LastLoginAt sql.NullTime `json:"last_login_at"`
LastLoginIp sql.NullString `json:"last_login_ip"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}