Files
member-console/internal/organization/models.go
T
cgalo5758 dd3962990b Adopt entity keys and add invoice numbers
Replace the entity slugs on organizations, workspaces, resource pools,
and
plan ladders with nullable `key` columns and add keys to products,
prices,
and entitlement sets. Rename `providers.slug` to `provider` and add
partial
unique indexes for system and org role names.

Assign invoice numbers per billing account from a gapless transactional
counter; Stripe's number moves to the invoice mapping as an external
reference.

Seeds, fixtures, and the operator lookup address rows by key, and the
returning-login resync no longer blanks a display name when the IdP
sends
no `name` claim.
2026-08-29 20:12:04 -05:00

81 lines
2.6 KiB
Go

// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.29.0
package organization
import (
"database/sql"
"time"
"github.com/google/uuid"
)
type OrgMember struct {
OrgMemberID string `json:"org_member_id"`
OrgID string `json:"org_id"`
PersonID string `json:"person_id"`
RoleID string `json:"role_id"`
Status string `json:"status"`
JoinedAt time.Time `json:"joined_at"`
RemovedAt sql.NullTime `json:"removed_at"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type OrgType struct {
OrgType string `json:"org_type"`
DisplayName string `json:"display_name"`
Description sql.NullString `json:"description"`
IsActive bool `json:"is_active"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
IsReserved bool `json:"is_reserved"`
DefaultPlanLadderID uuid.NullUUID `json:"default_plan_ladder_id"`
}
type Organization struct {
OrgID string `json:"org_id"`
Name string `json:"name"`
Key sql.NullString `json:"key"`
OrgType string `json:"org_type"`
OwnerPersonID string `json:"owner_person_id"`
Status string `json:"status"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type Role struct {
RoleID string `json:"role_id"`
OrgID uuid.NullUUID `json:"org_id"`
RoleName string `json:"role_name"`
DisplayName string `json:"display_name"`
Description sql.NullString `json:"description"`
IsSystem bool `json:"is_system"`
Permissions []string `json:"permissions"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type RoleAssignment struct {
AssignmentID string `json:"assignment_id"`
RoleID string `json:"role_id"`
PersonID string `json:"person_id"`
OrgID string `json:"org_id"`
ScopeType string `json:"scope_type"`
ScopeID string `json:"scope_id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type Workspace struct {
WorkspaceID string `json:"workspace_id"`
OrgID string `json:"org_id"`
Name string `json:"name"`
Key sql.NullString `json:"key"`
Description sql.NullString `json:"description"`
Status string `json:"status"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}