app.org_legal_entities
TablaSeguridad a nivel de fila activa
Legal entities an org trades as, with their tax identifier, fiscal year start and base currency (Section 4.5.6 item 3, Section 7.3). One live entity per org is primary and is printed on generated documents. The tax identifier is Restricted and encrypted: read it through app.org_legal_entities_masked.
Clave primaria: id
| Columna | Tipo | Admite nulos | Descripción |
|---|---|---|---|
| id | uuid | No | Primary key, UUID v7. |
| org_id | uuid | No | Owning org. A row never moves to another org.Hace referencia a app.organizations.id |
| legal_name | text | No | Registered legal name, for example Northwind Live LLC. Unique per org among live entities. |
| country_code | character(2) | No | ISO 3166-1 alpha-2 country of registration. |
| tax_identifier | bytea | Sí | Tax identifier (EIN, VAT or GST number) encrypted with pgp_sym_encrypt under the Vault key xos_org_tax_identifier_key. Restricted (data.restricted.read.tax): never selectable or writable by signed-in callers; written through app.set_org_legal_entity_tax_identifier and read through app.org_legal_entities_masked. |
| tax_identifier_last4 | text | Sí | Last four characters of the tax identifier, shown to every reader; NULL when none is recorded. |
| fiscal_year_start_month | smallint | No | Month the entity's fiscal year starts, 1 for January through 12 for December. |
| base_currency | character(3) | No | ISO 4217 currency the entity keeps its books in.Hace referencia a private.currencies.currency_code |
| is_primary | boolean | No | True for the org's primary entity, printed on generated documents. Exactly one live entity per org is primary once any exists. |
| deleted_at | timestamp with time zone | Sí | Soft delete time. A row with deleted_at set is ignored by every access helper. |
| created_at | timestamp with time zone | No | When the row was inserted. Set by the database. |
| created_by | uuid | Sí | Person who inserted the row, or null for a platform process. Set by the database.Hace referencia a app.people.id |
| updated_at | timestamp with time zone | No | When the row last changed. Set by the database. |
| updated_by | uuid | Sí | Person who last changed the row, or null for a platform process. Set by the database.Hace referencia a app.people.id |