Saltar al contenido

app.wholesale_statements

TablaSeguridad a nivel de fila activa

What the platform bills a partner for one month (Section 4.6.1): every client org at its plan's list price less the partner's wholesale discount. Written only by app.run_wholesale_billing; append-only. Totals cover priced lines; unpriced lines are counted, never treated as zero.

Clave primaria: id

Columnas de app.wholesale_statements
ColumnaTipoAdmite nulosDescripción
iduuidNoPrimary key, UUID v7.
org_iduuidNoOwning org. A row never moves to another org.Hace referencia a app.organizations.id
period_startdateNoFirst day of the month billed.
currency_codecharacter(3)NoCurrency of the partner agreement.Hace referencia a private.currencies.currency_code
wholesale_discount_bpsintegerNoDiscount in force when the statement ran.
client_countintegerNoClient orgs on the statement.
list_total_minorbigintNoSum of priced list prices in minor units.
wholesale_total_minorbigintNoSum of priced wholesale amounts in minor units: what the partner owes.
unpriced_countintegerNoLines whose plan has no price in the currency.
created_attimestamp with time zoneNoWhen the row was inserted. Set by the database.
created_byuuidSíPerson who inserted the row, or null for a platform process. Set by the database.Hace referencia a app.people.id
updated_attimestamp with time zoneNoWhen the row last changed. Set by the database.
updated_byuuidSíPerson who last changed the row, or null for a platform process. Set by the database.Hace referencia a app.people.id
deleted_attimestamp with time zoneSíSoft delete time. A row with deleted_at set is ignored by every access helper.