Skip to content

app.wholesale_statement_lines

TableRow level security on

One client org on a wholesale statement: its plan, list price, wholesale amount and the price the partner charges it. Append-only.

Primary key: id

Columns of app.wholesale_statement_lines
ColumnTypeNullableDescription
iduuidNoPrimary key, UUID v7.
org_iduuidNoOwning org, derived from app.wholesale_statements on insert; never accepted from the caller and never changed.References app.organizations.id
wholesale_statement_iduuidNoStatement.References app.wholesale_statements.id
client_org_iduuidNoClient org billed.References app.organizations.id
plan_codetextNoClient's plan when the statement ran.References app.plans.code
list_minorbigintYesMonthly list price in minor units; null when the plan is unpriced in the currency.
wholesale_minorbigintYesList price less the discount, rounded down to the minor unit; null when unpriced.
client_price_minorbigintYesWhat the partner charges the client, when it set a price in the same currency.
created_attimestamp with time zoneNoWhen the row was inserted. Set by the database.
created_byuuidYesPerson who inserted the row, or null for a platform process. Set by the database.References app.people.id
updated_attimestamp with time zoneNoWhen the row last changed. Set by the database.
updated_byuuidYesPerson who last changed the row, or null for a platform process. Set by the database.References app.people.id
deleted_attimestamp with time zoneYesSoft delete time. A row with deleted_at set is ignored by every access helper.