organization

package
v0.0.0-...-1064994 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CountOrgMembersByOrgIDsRow

type CountOrgMembersByOrgIDsRow struct {
	OrgID       string `json:"org_id"`
	MemberCount int32  `json:"member_count"`
}

type CreateOrgMemberParams

type CreateOrgMemberParams struct {
	OrgID    string `json:"org_id"`
	PersonID string `json:"person_id"`
	RoleID   string `json:"role_id"`
}

type CreateOrganizationParams

type CreateOrganizationParams struct {
	Name          string         `json:"name"`
	OrgType       string         `json:"org_type"`
	OwnerPersonID string         `json:"owner_person_id"`
	Key           sql.NullString `json:"key"`
}

type CreateRoleAssignmentParams

type CreateRoleAssignmentParams struct {
	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"`
}

type CreateWorkspaceParams

type CreateWorkspaceParams struct {
	OrgID string         `json:"org_id"`
	Name  string         `json:"name"`
	Key   sql.NullString `json:"key"`
}

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type EnsureSystemOrgTypeParams

type EnsureSystemOrgTypeParams struct {
	OrgType     string `json:"org_type"`
	DisplayName string `json:"display_name"`
}

type EnsureSystemOrganizationParams

type EnsureSystemOrganizationParams struct {
	Name          string `json:"name"`
	OrgType       string `json:"org_type"`
	OwnerPersonID string `json:"owner_person_id"`
}

type EnsureSystemWorkspaceParams

type EnsureSystemWorkspaceParams struct {
	OrgID string `json:"org_id"`
	Name  string `json:"name"`
}

type ListActiveMembersByOrgIDRow

type ListActiveMembersByOrgIDRow struct {
	OrgMemberID  string    `json:"org_member_id"`
	PersonID     string    `json:"person_id"`
	RoleID       string    `json:"role_id"`
	JoinedAt     time.Time `json:"joined_at"`
	DisplayName  string    `json:"display_name"`
	PrimaryEmail string    `json:"primary_email"`
	RoleName     string    `json:"role_name"`
}

type ListActiveMembershipsByPersonIDRow

type ListActiveMembershipsByPersonIDRow struct {
	OrgMemberID string    `json:"org_member_id"`
	OrgID       string    `json:"org_id"`
	RoleID      string    `json:"role_id"`
	JoinedAt    time.Time `json:"joined_at"`
	OrgName     string    `json:"org_name"`
	RoleName    string    `json:"role_name"`
}

type ListOrganizationNamesByIDsRow

type ListOrganizationNamesByIDsRow struct {
	OrgID   string `json:"org_id"`
	Name    string `json:"name"`
	OrgType string `json:"org_type"`
}

type ListOrganizationsPageParams

type ListOrganizationsPageParams struct {
	Q          sql.NullString `json:"q"`
	OrgType    sql.NullString `json:"org_type"`
	PageOffset int32          `json:"page_offset"`
	PageLimit  int32          `json:"page_limit"`
}

type ListOrganizationsPageRow

type ListOrganizationsPageRow struct {
	OrgID            string         `json:"org_id"`
	Name             string         `json:"name"`
	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"`
	OwnerDisplayName sql.NullString `json:"owner_display_name"`
	TotalCount       int64          `json:"total_count"`
}

type OrgMember

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

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

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 Querier

type Querier interface {
	// Setup-checklist existence probe; reserved types never carry a default.
	AnyOrgTypeWithDefaultPlan(ctx context.Context) (bool, error)
	// The member count of each organization one page of the operator's
	// organizations list shows, in one read (#10): every org_members row with its
	// person and role, as the list has always counted, so a member of any status
	// counts. An organization with no member is absent from the result.
	CountOrgMembersByOrgIDs(ctx context.Context, orgIds []string) ([]CountOrgMembersByOrgIDsRow, error)
	// Operator overview headline. Personal orgs exist one-per-member by
	// structural convention (design/organization/architecture.md §2), so an
	// organizations count that includes them tracks the people count and reads
	// as an error. Negative-space predicate instead of org_type = 'team':
	// everything active that is neither the auto-created personal type nor a
	// reserved type counts, so team, enterprise, and deployment-defined types
	// need no code change here and the reserved system org never appears.
	CountTeamOrganizations(ctx context.Context) (int64, error)
	CountWorkspacesByOrgID(ctx context.Context, orgID string) (int64, error)
	CreateOrgMember(ctx context.Context, arg CreateOrgMemberParams) (OrgMember, error)
	// Identity is org_id, presentation is name, and organization names are
	// deliberately not unique. `key` is the optional declarative address
	// (entity-keys §1 to §4): a caller outside the database -- a seed, a
	// configuration loader, an API client -- supplies it to name this row
	// literally. UI-created organizations leave it NULL, and a personal
	// organization never gets one: a key is never derived from a person's login
	// or display name (§4).
	CreateOrganization(ctx context.Context, arg CreateOrganizationParams) (Organization, error)
	CreateRoleAssignment(ctx context.Context, arg CreateRoleAssignmentParams) (RoleAssignment, error)
	// The name is what people see and the only thing the create form asks for;
	// uq_workspaces_org_id_name_ci keeps it unambiguous within the organization
	// among live workspaces. `key` is the optional declarative address
	// (entity-keys §3), unique within the organization rather than globally
	// because a workspace is a child; UI-created workspaces leave it NULL, and a
	// singleton workspace is addressed through its organization.
	CreateWorkspace(ctx context.Context, arg CreateWorkspaceParams) (Workspace, error)
	// Idempotently insert the reserved 'system' org type. is_reserved=TRUE keeps it
	// out of the operator config UI; default_plan_ladder_id stays NULL, so
	// auto-provisioning issues no default grant for system orgs.
	EnsureSystemOrgType(ctx context.Context, arg EnsureSystemOrgTypeParams) error
	// Idempotently insert the singleton System organization. The partial unique
	// index uq_organizations_one_system enforces "exactly one System tenant", and
	// the conflict target repeats the index predicate so Postgres can infer it.
	// Read back with GetSystemOrganization.
	//
	// `system` is one of the two keys the system writes for itself (entity-keys
	// §4): a fixed constant for a row the console creates by design, not a value
	// derived from anybody's data. It is written here rather than by the Go
	// caller so the only path that creates the System tenant is also the only
	// path that names it.
	EnsureSystemOrganization(ctx context.Context, arg EnsureSystemOrganizationParams) error
	// Idempotently insert the System tenant's workspace, keyed on its name
	// within the organization (entity-keys). The conflict target
	// repeats the predicate of the partial index uq_workspaces_org_id_name_ci
	// so Postgres can infer it. Only called when the system org has no
	// workspace yet.
	EnsureSystemWorkspace(ctx context.Context, arg EnsureSystemWorkspaceParams) error
	GetOrgType(ctx context.Context, orgType string) (OrgType, error)
	GetOrganizationByID(ctx context.Context, orgID string) (Organization, error)
	// Root-scoped key resolver (entity-keys §5): the query that makes `key` a
	// whole feature rather than a seed-only column. uq_organizations_key
	// guarantees at most one row matches; a NULL key never matches because the
	// parameter is compared with `=`.
	GetOrganizationByKey(ctx context.Context, key sql.NullString) (Organization, error)
	GetOrganizationsByOwner(ctx context.Context, ownerPersonID string) ([]Organization, error)
	// Natural-key resolver: the workspace of the singleton organization whose
	// org_type is 'system'. Returns the oldest workspace so a pre-existing
	// workspace (e.g. an ad-hoc seed using a different name) is adopted rather
	// than duplicated.
	GetSystemOrgWorkspace(ctx context.Context) (Workspace, error)
	// The singleton System organization, resolved by its natural key. Paired
	// with EnsureSystemOrganization; uq_organizations_one_system guarantees at
	// most one row matches.
	GetSystemOrganization(ctx context.Context) (Organization, error)
	GetSystemRoleByName(ctx context.Context, roleName string) (Role, error)
	GetWorkspaceByID(ctx context.Context, workspaceID string) (Workspace, error)
	GetWorkspacesByOrgID(ctx context.Context, orgID string) ([]Workspace, error)
	// Operator composite's Members section. Active members only (status='active',
	// excluding removed/historical rows). Unbounded: the section searches and
	// pages the whole set Go-side, so a LIMIT here would make its stated total
	// the cap rather than the member count. Most recently joined first; the person
	// id (unique within an organization) breaks a tie, so the order is total and
	// each member lands on exactly one page.
	ListActiveMembersByOrgID(ctx context.Context, orgID string) ([]ListActiveMembersByOrgIDRow, error)
	// Person-detail "Org memberships" section. Returns each org the person
	// belongs to (active memberships only) with the org's display fields and
	// the person's role at that org. Sorted by joined_at DESC so the most
	// recent membership appears first — operators usually want "what's the
	// person doing now" rather than "where did they start."
	ListActiveMembershipsByPersonID(ctx context.Context, personID string) ([]ListActiveMembershipsByPersonIDRow, error)
	// Operator-facing list: excludes reserved (app-managed) org types like 'system'
	// so they don't render as editable cards on the Org Types management page.
	ListConfigurableOrgTypes(ctx context.Context) ([]OrgType, error)
	ListOrgTypes(ctx context.Context) ([]OrgType, error)
	// The names of the organizations one operator page names, in one read (#10),
	// with each one's type, which the floor name reads. An id with no row is
	// absent from the result.
	ListOrganizationNamesByIDs(ctx context.Context, orgIds []string) ([]ListOrganizationNamesByIDsRow, error)
	ListOrganizations(ctx context.Context) ([]Organization, error)
	ListOrganizationsByType(ctx context.Context, orgType string) ([]Organization, error)
	// Organizations list operator surface (operator-list-scale UX-4): the
	// paged, searched, org-type-filtered successor to ListOrganizationsWithOwner
	// -- each row still carries its owner's display name so no organization can
	// read as unowned (ux-honest-surfaces UX-16). owner_person_id is NOT NULL
	// (every organization has an owner person, the System tenant included --
	// 00001_init.sql), so the LEFT JOIN is defensive rather than expected to
	// ever drop the owner's name.
	//
	// sqlc.narg(q): NULL matches every row; set, a case-insensitive substring
	// match against the organization's name, or its owner's display
	// name or primary email (operator-list-scale: "carries a scoped
	// server-side search" -- "organizations: name and owner name or
	// email").
	// sqlc.narg(org_type): NULL matches every org type; set, an exact facet
	// match (operator-list-scale: "Status filters exist ... organizations: org
	// type").
	// count(*) OVER() carries the true total for the filtered set alongside
	// the page's rows (design D2), so the stated total never reflects only the
	// page.
	// Organization names are not unique, and organizations written in one
	// transaction share created_at, so ties on the name fall to the organization
	// id: it is time-ordered, which lists the later-written organization first,
	// so each lists on exactly one page.
	ListOrganizationsPage(ctx context.Context, arg ListOrganizationsPageParams) ([]ListOrganizationsPageRow, error)
	// Locks one org type's row against a concurrent edit of the type and the
	// demonstration seed, without blocking an organization insert's key-share
	// lock on it. The default change's commit reads the type under it.
	LockOrgType(ctx context.Context, orgType string) (OrgType, error)
	// Landing lookup's organization branch (entity-keys). Runs only
	// when no person matches the lookup term; a dedicated query rather than
	// ListOrganizationsPage because that query's owner-email term would blur
	// the person/organization split the lookup depends on. Active
	// organizations only, name substring match, bounded by LIMIT so a short
	// term cannot return the whole table.
	SearchOrganizationsByName(ctx context.Context, arg SearchOrganizationsByNameParams) ([]SearchOrganizationsByNameRow, error)
	UpdateOrgTypeDefaultPlanLadder(ctx context.Context, arg UpdateOrgTypeDefaultPlanLadderParams) (OrgType, error)
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) AnyOrgTypeWithDefaultPlan

func (q *Queries) AnyOrgTypeWithDefaultPlan(ctx context.Context) (bool, error)

Setup-checklist existence probe; reserved types never carry a default.

func (*Queries) CountOrgMembersByOrgIDs

func (q *Queries) CountOrgMembersByOrgIDs(ctx context.Context, orgIds []string) ([]CountOrgMembersByOrgIDsRow, error)

The member count of each organization one page of the operator's organizations list shows, in one read (#10): every org_members row with its person and role, as the list has always counted, so a member of any status counts. An organization with no member is absent from the result.

func (*Queries) CountTeamOrganizations

func (q *Queries) CountTeamOrganizations(ctx context.Context) (int64, error)

Operator overview headline. Personal orgs exist one-per-member by structural convention (design/organization/architecture.md §2), so an organizations count that includes them tracks the people count and reads as an error. Negative-space predicate instead of org_type = 'team': everything active that is neither the auto-created personal type nor a reserved type counts, so team, enterprise, and deployment-defined types need no code change here and the reserved system org never appears.

func (*Queries) CountWorkspacesByOrgID

func (q *Queries) CountWorkspacesByOrgID(ctx context.Context, orgID string) (int64, error)

func (*Queries) CreateOrgMember

func (q *Queries) CreateOrgMember(ctx context.Context, arg CreateOrgMemberParams) (OrgMember, error)

func (*Queries) CreateOrganization

func (q *Queries) CreateOrganization(ctx context.Context, arg CreateOrganizationParams) (Organization, error)

Identity is org_id, presentation is name, and organization names are deliberately not unique. `key` is the optional declarative address (entity-keys §1 to §4): a caller outside the database -- a seed, a configuration loader, an API client -- supplies it to name this row literally. UI-created organizations leave it NULL, and a personal organization never gets one: a key is never derived from a person's login or display name (§4).

func (*Queries) CreateRoleAssignment

func (q *Queries) CreateRoleAssignment(ctx context.Context, arg CreateRoleAssignmentParams) (RoleAssignment, error)

func (*Queries) CreateWorkspace

func (q *Queries) CreateWorkspace(ctx context.Context, arg CreateWorkspaceParams) (Workspace, error)

The name is what people see and the only thing the create form asks for; uq_workspaces_org_id_name_ci keeps it unambiguous within the organization among live workspaces. `key` is the optional declarative address (entity-keys §3), unique within the organization rather than globally because a workspace is a child; UI-created workspaces leave it NULL, and a singleton workspace is addressed through its organization.

func (*Queries) EnsureSystemOrgType

func (q *Queries) EnsureSystemOrgType(ctx context.Context, arg EnsureSystemOrgTypeParams) error

Idempotently insert the reserved 'system' org type. is_reserved=TRUE keeps it out of the operator config UI; default_plan_ladder_id stays NULL, so auto-provisioning issues no default grant for system orgs.

func (*Queries) EnsureSystemOrganization

func (q *Queries) EnsureSystemOrganization(ctx context.Context, arg EnsureSystemOrganizationParams) error

Idempotently insert the singleton System organization. The partial unique index uq_organizations_one_system enforces "exactly one System tenant", and the conflict target repeats the index predicate so Postgres can infer it. Read back with GetSystemOrganization.

`system` is one of the two keys the system writes for itself (entity-keys §4): a fixed constant for a row the console creates by design, not a value derived from anybody's data. It is written here rather than by the Go caller so the only path that creates the System tenant is also the only path that names it.

func (*Queries) EnsureSystemWorkspace

func (q *Queries) EnsureSystemWorkspace(ctx context.Context, arg EnsureSystemWorkspaceParams) error

Idempotently insert the System tenant's workspace, keyed on its name within the organization (entity-keys). The conflict target repeats the predicate of the partial index uq_workspaces_org_id_name_ci so Postgres can infer it. Only called when the system org has no workspace yet.

func (*Queries) GetOrgType

func (q *Queries) GetOrgType(ctx context.Context, orgType string) (OrgType, error)

func (*Queries) GetOrganizationByID

func (q *Queries) GetOrganizationByID(ctx context.Context, orgID string) (Organization, error)

func (*Queries) GetOrganizationByKey

func (q *Queries) GetOrganizationByKey(ctx context.Context, key sql.NullString) (Organization, error)

Root-scoped key resolver (entity-keys §5): the query that makes `key` a whole feature rather than a seed-only column. uq_organizations_key guarantees at most one row matches; a NULL key never matches because the parameter is compared with `=`.

func (*Queries) GetOrganizationsByOwner

func (q *Queries) GetOrganizationsByOwner(ctx context.Context, ownerPersonID string) ([]Organization, error)

func (*Queries) GetSystemOrgWorkspace

func (q *Queries) GetSystemOrgWorkspace(ctx context.Context) (Workspace, error)

Natural-key resolver: the workspace of the singleton organization whose org_type is 'system'. Returns the oldest workspace so a pre-existing workspace (e.g. an ad-hoc seed using a different name) is adopted rather than duplicated.

func (*Queries) GetSystemOrganization

func (q *Queries) GetSystemOrganization(ctx context.Context) (Organization, error)

The singleton System organization, resolved by its natural key. Paired with EnsureSystemOrganization; uq_organizations_one_system guarantees at most one row matches.

func (*Queries) GetSystemRoleByName

func (q *Queries) GetSystemRoleByName(ctx context.Context, roleName string) (Role, error)

func (*Queries) GetWorkspaceByID

func (q *Queries) GetWorkspaceByID(ctx context.Context, workspaceID string) (Workspace, error)

func (*Queries) GetWorkspacesByOrgID

func (q *Queries) GetWorkspacesByOrgID(ctx context.Context, orgID string) ([]Workspace, error)

func (*Queries) ListActiveMembersByOrgID

func (q *Queries) ListActiveMembersByOrgID(ctx context.Context, orgID string) ([]ListActiveMembersByOrgIDRow, error)

Operator composite's Members section. Active members only (status='active', excluding removed/historical rows). Unbounded: the section searches and pages the whole set Go-side, so a LIMIT here would make its stated total the cap rather than the member count. Most recently joined first; the person id (unique within an organization) breaks a tie, so the order is total and each member lands on exactly one page.

func (*Queries) ListActiveMembershipsByPersonID

func (q *Queries) ListActiveMembershipsByPersonID(ctx context.Context, personID string) ([]ListActiveMembershipsByPersonIDRow, error)

Person-detail "Org memberships" section. Returns each org the person belongs to (active memberships only) with the org's display fields and the person's role at that org. Sorted by joined_at DESC so the most recent membership appears first — operators usually want "what's the person doing now" rather than "where did they start."

func (*Queries) ListConfigurableOrgTypes

func (q *Queries) ListConfigurableOrgTypes(ctx context.Context) ([]OrgType, error)

Operator-facing list: excludes reserved (app-managed) org types like 'system' so they don't render as editable cards on the Org Types management page.

func (*Queries) ListOrgTypes

func (q *Queries) ListOrgTypes(ctx context.Context) ([]OrgType, error)

func (*Queries) ListOrganizationNamesByIDs

func (q *Queries) ListOrganizationNamesByIDs(ctx context.Context, orgIds []string) ([]ListOrganizationNamesByIDsRow, error)

The names of the organizations one operator page names, in one read (#10), with each one's type, which the floor name reads. An id with no row is absent from the result.

func (*Queries) ListOrganizations

func (q *Queries) ListOrganizations(ctx context.Context) ([]Organization, error)

func (*Queries) ListOrganizationsByType

func (q *Queries) ListOrganizationsByType(ctx context.Context, orgType string) ([]Organization, error)

func (*Queries) ListOrganizationsPage

func (q *Queries) ListOrganizationsPage(ctx context.Context, arg ListOrganizationsPageParams) ([]ListOrganizationsPageRow, error)

Organizations list operator surface (operator-list-scale UX-4): the paged, searched, org-type-filtered successor to ListOrganizationsWithOwner -- each row still carries its owner's display name so no organization can read as unowned (ux-honest-surfaces UX-16). owner_person_id is NOT NULL (every organization has an owner person, the System tenant included -- 00001_init.sql), so the LEFT JOIN is defensive rather than expected to ever drop the owner's name.

sqlc.narg(q): NULL matches every row; set, a case-insensitive substring match against the organization's name, or its owner's display name or primary email (operator-list-scale: "carries a scoped server-side search" -- "organizations: name and owner name or email"). sqlc.narg(org_type): NULL matches every org type; set, an exact facet match (operator-list-scale: "Status filters exist ... organizations: org type"). count(*) OVER() carries the true total for the filtered set alongside the page's rows (design D2), so the stated total never reflects only the page. Organization names are not unique, and organizations written in one transaction share created_at, so ties on the name fall to the organization id: it is time-ordered, which lists the later-written organization first, so each lists on exactly one page.

func (*Queries) LockOrgType

func (q *Queries) LockOrgType(ctx context.Context, orgType string) (OrgType, error)

Locks one org type's row against a concurrent edit of the type and the demonstration seed, without blocking an organization insert's key-share lock on it. The default change's commit reads the type under it.

func (*Queries) SearchOrganizationsByName

func (q *Queries) SearchOrganizationsByName(ctx context.Context, arg SearchOrganizationsByNameParams) ([]SearchOrganizationsByNameRow, error)

Landing lookup's organization branch (entity-keys). Runs only when no person matches the lookup term; a dedicated query rather than ListOrganizationsPage because that query's owner-email term would blur the person/organization split the lookup depends on. Active organizations only, name substring match, bounded by LIMIT so a short term cannot return the whole table.

func (*Queries) UpdateOrgTypeDefaultPlanLadder

func (q *Queries) UpdateOrgTypeDefaultPlanLadder(ctx context.Context, arg UpdateOrgTypeDefaultPlanLadderParams) (OrgType, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

type Role

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

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 SearchOrganizationsByNameParams

type SearchOrganizationsByNameParams struct {
	Name     string `json:"name"`
	RowLimit int32  `json:"row_limit"`
}

type SearchOrganizationsByNameRow

type SearchOrganizationsByNameRow struct {
	OrgID            string         `json:"org_id"`
	Name             string         `json:"name"`
	OrgType          string         `json:"org_type"`
	OwnerDisplayName sql.NullString `json:"owner_display_name"`
}

type UpdateOrgTypeDefaultPlanLadderParams

type UpdateOrgTypeDefaultPlanLadderParams struct {
	OrgType             string        `json:"org_type"`
	DefaultPlanLadderID uuid.NullUUID `json:"default_plan_ladder_id"`
}

type Workspace

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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址