Core / Kernel — Data model
63 tables · auto-generated from migrations-v2/*.sql — do not edit by hand.
ER diagram
%%{init: {"theme":"base","themeVariables":{"darkMode":true,"background":"#1e1e1e","primaryColor":"#2d2d30","primaryBorderColor":"#569cd6","primaryTextColor":"#d4d4d4","lineColor":"#6796c6","secondaryColor":"#3a3d41","secondaryBorderColor":"#dcdcaa","secondaryTextColor":"#d4d4d4","tertiaryColor":"#252526","tertiaryBorderColor":"#569cd6","noteBkgColor":"#3a3d41","noteTextColor":"#dcdcaa","clusterBkg":"#252526","clusterBorder":"#569cd6","titleColor":"#569cd6","attributeBackgroundColorOdd":"#252526","attributeBackgroundColorEven":"#2d2d30"},"er":{"useMaxWidth":false}}}%%
erDiagram
ACCOUNT {
integer id PK
text company_id FK
integer parent_id FK
text code
text name
text kind
integer postable
text currency_constraint
}
ADDRESS {
integer id PK
text company_id FK
integer party_id FK
text owner_company_id FK
text owner_type
text kind
text label
text house_no
}
ATTACHMENT {
integer id PK
text company_id FK
integer uploaded_by FK
text entity_type
text entity_id
text file_name
text content_type
integer byte_size
}
AUDIT_EVENT {
integer id PK
text company_id FK
text actor
integer ts
text action
text entity_type
text entity_id
text delta
}
BACKGROUND_JOB {
integer id PK
text company_id FK
text kind
text payload
text status
integer progress_done
integer progress_total
text checkpoint
}
BUSINESS_PROFILE {
integer id PK
text company_id
text code
text name
integer is_system
text doctype_enablement_set
text policy_value_set
text onboarding_wizard_descriptor
}
CAPABILITY {
integer id PK
text company_id
text code
text risk_class
text description
integer created_at
}
COMPANY {
text company_id PK
text tenant_code
text code
text legal_name
text display_name
text status
text default_locale
text functional_currency_code
}
CURRENCY {
integer id PK
text company_id
text code
text name
integer decimals
text symbol
integer is_active
integer created_at
}
CUSTOM_FIELD_SCHEMA {
integer id PK
text company_id FK
text entity_type
text field_code
text value_type
text validation_rule
text ui_hints
integer is_active
}
DEFAULT_DIMENSION {
integer id PK
text company_id FK
integer dimension_id FK
integer dimension_value_id FK
text master_entity_type
text master_entity_id
text enforcement
integer created_at
}
DIMENSION {
integer id PK
text company_id FK
text code
text name
text value_source
text entity_ref_type
integer is_active
integer created_at
}
DIMENSION_VALUE {
integer id PK
text company_id FK
integer dimension_id FK
text code
text name
text entity_ref_id
integer active
integer created_at
}
DOCUMENT {
integer id PK
text company_id FK
integer amended_from FK
integer created_by FK
integer submitted_by FK
integer cancelled_by FK
text doctype
text doc_no
}
DOCUMENT_TYPE {
integer id PK
text company_id FK
text code
text owning_module
text states_supported
integer amendable
text number_series_binding
text posting_behavior
}
ECOMMERCE_CHANNEL_ACCOUNT {
integer id PK
text company_id FK
integer connector_id FK
integer default_location_id FK
text channel_code
text external_shop_id
text display_name
text environment
}
ECOMMERCE_CHANNEL_CONNECTOR {
integer id PK
text company_id FK
text code
text display_name
text platform_kind
text capability_flags
text contract_version
text config_schema
}
ECOMMERCE_CHANNEL_LISTING {
integer id PK
text company_id FK
integer channel_account_id FK
integer channel_product_id FK
integer item_variant_id FK
text external_sku
text external_variation_id
integer active
}
ECOMMERCE_CHANNEL_PRODUCT {
integer id PK
text company_id FK
integer channel_account_id FK
integer item_id FK
text title
text publish_status
text external_product_id
text content_hash
}
ECOMMERCE_FIELD_MAPPING_PROFILE {
integer id PK
text company_id FK
integer connector_id FK
text contract_version
text profile_code
text mapping_json
text unknown_field_policy
integer created_at
}
ECOMMERCE_FULFILLMENT {
integer id PK
text company_id FK
integer sale_id FK
integer channel_account_id FK
integer kernel_doc_id FK
text external_id
text status
text operation_group
}
ECOMMERCE_FULFILLMENT_LINE {
integer id PK
text company_id FK
integer fulfillment_id FK
integer sale_line_id FK
integer item_variant_id FK
integer location_id FK
numeric qty
text status
}
ECOMMERCE_INBOUND_MESSAGE {
integer id PK
text company_id FK
integer channel_account_id FK
text kind
text external_message_id
text external_order_id
text raw_payload
text processing_status
}
ECOMMERCE_ORDER_STATUS_MAP {
integer id PK
text company_id FK
integer channel_account_id FK
text external_status
text internal_state
text fulfillment_state
integer is_terminal
integer created_at
}
ECOMMERCE_RESERVATION_LEDGER {
integer id PK
text company_id FK
integer channel_account_id FK
integer sale_id FK
integer sale_line_id FK
integer item_variant_id FK
integer location_id FK
numeric qty_delta
}
ECOMMERCE_RETURN_REQUEST {
integer id PK
text company_id FK
integer channel_account_id FK
integer sale_id FK
integer kernel_doc_id FK
text external_return_id
text external_order_id
text status
}
ECOMMERCE_SALE {
integer id PK
text company_id FK
integer channel_account_id FK
text channel_code
text external_id
text status
text external_status
text customer_name
}
ECOMMERCE_SALE_LINE {
integer id PK
text company_id FK
integer sale_id FK
integer item_id FK
integer item_variant_id FK
integer location_id FK
integer line_no
text sku
}
ECOMMERCE_SETTLEMENT_BATCH {
integer id PK
text company_id FK
integer channel_account_id FK
text external_statement_id
text period_start
text period_end
numeric gross_amount
numeric total_fee_amount
}
ECOMMERCE_SETTLEMENT_LINE {
integer id PK
text company_id FK
integer settlement_batch_id FK
integer sale_id FK
text external_order_id
text component_json
numeric expected_fee_amount
numeric actual_fee_amount
}
ECOMMERCE_STOCK_PROJECTION {
text company_id FK
integer channel_account_id FK
integer item_variant_id FK
integer location_id FK
numeric on_hand_qty
numeric reserved_qty
numeric buffer_qty
numeric display_cap
}
ECOMMERCE_SYNC_JOB {
integer id PK
text company_id FK
integer channel_account_id FK
text kind
text trigger_kind
text status
text watermark_in
text watermark_out
}
ECOMMERCE_SYNC_LINE {
integer id PK
text company_id FK
integer sync_job_id FK
text subject_type
text subject_id
text attempted_payload_digest
text outcome
text platform_response_code
}
EXCHANGE_RATE {
integer id PK
text company_id
text from_currency_code
text to_currency_code
text rate_date
numeric rate
text source
integer created_at
}
GRANT {
integer id PK
text company_id FK
integer user_id FK
integer role_id FK
text grant_kind
text capability_code
text scope
text effect
}
IDENTITY_BUNDLE {
integer id PK
text company_id FK
integer item_variant_id FK
text purpose
text status
text source_ref
text custom_attributes
integer created_at
}
IDENTITY_BUNDLE_LINE {
integer id PK
text company_id FK
integer bundle_id FK
integer item_variant_id FK
text lot_code
text serial_code
numeric qty
text mfg_date
}
ITEM {
integer id PK
text company_id FK
integer category_id FK
integer base_uom_id FK
integer purchase_uom_id FK
integer sales_uom_id FK
integer tracking_policy_id FK
integer created_by FK
}
ITEM_ATTRIBUTE {
integer id PK
text company_id FK
text code
text name
integer sort_order
integer created_at
}
ITEM_ATTRIBUTE_VALUE {
integer id PK
text company_id FK
integer attribute_id FK
text code
text display_value
integer sort_order
integer is_active
integer created_at
}
ITEM_BARCODE {
integer id PK
text company_id FK
integer item_variant_id FK
integer uom_id FK
text code
text barcode_type
numeric qty_per_scan
integer is_primary
}
ITEM_CATEGORY {
integer id PK
text company_id FK
integer parent_id FK
text code
text name
integer default_posting_group_id
integer default_tracking_policy_id
text default_qc_policy_code
}
ITEM_TRACKING_POLICY {
integer id PK
text company_id FK
text code
text name
text tracking_mode
integer expiry_required
integer strict_expiration_posting
text warranty_duration_formula
}
ITEM_VARIANT {
integer id PK
text company_id FK
integer item_id FK
text variant_code
text name
text attribute_values
text attribute_signature
integer is_default
}
JOURNAL_ENTRY {
integer id PK
text company_id FK
integer reverses_id FK
text journal_code
text posting_date
text origin_doctype
text origin_doc_id
integer docstatus
}
JOURNAL_ENTRY_LINE {
integer id PK
text company_id FK
integer journal_entry_id FK
integer account_id FK
integer party_id FK
integer line_no
text account
numeric dr
}
LOCATION {
integer id PK
text company_id FK
integer parent_id FK
text code
text name
text type
integer require_receive
integer require_putaway
}
NUMBER_SERIES {
integer id PK
text company_id FK
integer parent_series_id FK
text doctype
text code
text format_mask
integer gap_free
text provisional_mask
}
NUMBER_SERIES_ALLOCATION {
integer id PK
text company_id FK
integer series_id FK
text number
integer drawn_at
text document_ref
text allocation_kind
}
PARTY {
integer id PK
text company_id FK
integer created_by FK
text code
text kind
text legal_name
text display_name
text thai_tax_id
}
PARTY_CONTACT {
integer id PK
text company_id FK
integer party_id FK
text contact_type
text promptpay_type
text value
text label
integer is_primary
}
PARTY_ROLE {
integer id PK
text company_id FK
integer party_id FK
integer parent_party_id FK
integer created_by FK
text role
text status
integer posting_group_id
}
POLICY_RULE {
integer id PK
text company_id FK
text domain
text scope_selector
integer scope_specificity
text value_type
text value
text effective_from
}
POSTING_GROUP {
integer id PK
text company_id FK
text kind
text code
text name
integer created_at
}
POSTING_LOCK {
integer id PK
text company_id FK
integer accounting_period_id FK
integer exception_user_id FK
integer created_by FK
text locked_from
text locked_to
text reason
}
POSTING_SETUP {
integer id PK
text company_id FK
integer item_posting_group_id FK
integer party_posting_group_id FK
integer tax_posting_group_id FK
integer wht_posting_group_id FK
integer location_id FK
integer target_account_id FK
}
ROLE {
integer id PK
text company_id FK
text code
text description
integer is_system
integer created_at
}
TAX_CODE {
integer id PK
text company_id FK
integer posting_group_id FK
text code
text kind
numeric rate
integer inclusive_default
text effective_from
}
TRANSITION_TRIGGER {
integer id PK
text company_id FK
text trigger_name
text doctype
text phase
text subscriber_module
text handler_ref
integer ordering
}
UOM {
integer id PK
text company_id FK
text code
text name
text quantity_kind
integer display_precision
integer is_system
integer is_active
}
UOM_CONVERSION {
integer id PK
text company_id FK
integer from_uom_id FK
integer to_uom_id FK
text scope
integer item_id
integer factor_numerator
integer factor_denominator
}
USER {
integer id PK
text company_id FK
text identity_handle
text display_name
text status
text locale
text role_grants
integer created_at
}
WHT_CODE {
integer id PK
text company_id FK
integer cert_series_id FK
text code
text income_type
numeric rate
text applies_to
text payee_kind
}
COMPANY ||--o{ ACCOUNT : company
ACCOUNT ||--o{ ACCOUNT : parent
COMPANY ||--o{ ADDRESS : company
PARTY ||--o{ ADDRESS : party
COMPANY ||--o{ ADDRESS : owner_company
COMPANY ||--o{ ATTACHMENT : company
USER ||--o{ ATTACHMENT : uploaded_by
COMPANY ||--o{ AUDIT_EVENT : company
COMPANY ||--o{ BACKGROUND_JOB : company
COMPANY ||--o{ CUSTOM_FIELD_SCHEMA : company
COMPANY ||--o{ DEFAULT_DIMENSION : company
DIMENSION ||--o{ DEFAULT_DIMENSION : dimension
DIMENSION_VALUE ||--o{ DEFAULT_DIMENSION : dimension_value
COMPANY ||--o{ DIMENSION : company
COMPANY ||--o{ DIMENSION_VALUE : company
DIMENSION ||--o{ DIMENSION_VALUE : dimension
COMPANY ||--o{ DOCUMENT : company
DOCUMENT ||--o{ DOCUMENT : amended_from
USER ||--o{ DOCUMENT : created_by
USER ||--o{ DOCUMENT : submitted_by
USER ||--o{ DOCUMENT : cancelled_by
COMPANY ||--o{ DOCUMENT_TYPE : company
COMPANY ||--o{ ECOMMERCE_CHANNEL_ACCOUNT : company
ECOMMERCE_CHANNEL_CONNECTOR ||--o{ ECOMMERCE_CHANNEL_ACCOUNT : connector
LOCATION ||--o{ ECOMMERCE_CHANNEL_ACCOUNT : default_location
COMPANY ||--o{ ECOMMERCE_CHANNEL_CONNECTOR : company
COMPANY ||--o{ ECOMMERCE_CHANNEL_LISTING : company
ECOMMERCE_CHANNEL_ACCOUNT ||--o{ ECOMMERCE_CHANNEL_LISTING : channel_account
ECOMMERCE_CHANNEL_PRODUCT ||--o{ ECOMMERCE_CHANNEL_LISTING : channel_product
ITEM_VARIANT ||--o{ ECOMMERCE_CHANNEL_LISTING : item_variant
COMPANY ||--o{ ECOMMERCE_CHANNEL_PRODUCT : company
ECOMMERCE_CHANNEL_ACCOUNT ||--o{ ECOMMERCE_CHANNEL_PRODUCT : channel_account
ITEM ||--o{ ECOMMERCE_CHANNEL_PRODUCT : item
COMPANY ||--o{ ECOMMERCE_FIELD_MAPPING_PROFILE : company
ECOMMERCE_CHANNEL_CONNECTOR ||--o{ ECOMMERCE_FIELD_MAPPING_PROFILE : connector
COMPANY ||--o{ ECOMMERCE_FULFILLMENT : company
ECOMMERCE_SALE ||--o{ ECOMMERCE_FULFILLMENT : sale
ECOMMERCE_CHANNEL_ACCOUNT ||--o{ ECOMMERCE_FULFILLMENT : channel_account
DOCUMENT ||--o{ ECOMMERCE_FULFILLMENT : kernel_doc
COMPANY ||--o{ ECOMMERCE_FULFILLMENT_LINE : company
ECOMMERCE_FULFILLMENT ||--o{ ECOMMERCE_FULFILLMENT_LINE : fulfillment
ECOMMERCE_SALE_LINE ||--o{ ECOMMERCE_FULFILLMENT_LINE : sale_line
ITEM_VARIANT ||--o{ ECOMMERCE_FULFILLMENT_LINE : item_variant
LOCATION ||--o{ ECOMMERCE_FULFILLMENT_LINE : location
COMPANY ||--o{ ECOMMERCE_INBOUND_MESSAGE : company
ECOMMERCE_CHANNEL_ACCOUNT ||--o{ ECOMMERCE_INBOUND_MESSAGE : channel_account
COMPANY ||--o{ ECOMMERCE_ORDER_STATUS_MAP : company
ECOMMERCE_CHANNEL_ACCOUNT ||--o{ ECOMMERCE_ORDER_STATUS_MAP : channel_account
COMPANY ||--o{ ECOMMERCE_RESERVATION_LEDGER : company
ECOMMERCE_CHANNEL_ACCOUNT ||--o{ ECOMMERCE_RESERVATION_LEDGER : channel_account
ECOMMERCE_SALE ||--o{ ECOMMERCE_RESERVATION_LEDGER : sale
ECOMMERCE_SALE_LINE ||--o{ ECOMMERCE_RESERVATION_LEDGER : sale_line
ITEM_VARIANT ||--o{ ECOMMERCE_RESERVATION_LEDGER : item_variant
LOCATION ||--o{ ECOMMERCE_RESERVATION_LEDGER : location
COMPANY ||--o{ ECOMMERCE_RETURN_REQUEST : company
ECOMMERCE_CHANNEL_ACCOUNT ||--o{ ECOMMERCE_RETURN_REQUEST : channel_account
ECOMMERCE_SALE ||--o{ ECOMMERCE_RETURN_REQUEST : sale
DOCUMENT ||--o{ ECOMMERCE_RETURN_REQUEST : kernel_doc
COMPANY ||--o{ ECOMMERCE_SALE : company
ECOMMERCE_CHANNEL_ACCOUNT ||--o{ ECOMMERCE_SALE : channel_account
COMPANY ||--o{ ECOMMERCE_SALE_LINE : company
ECOMMERCE_SALE ||--o{ ECOMMERCE_SALE_LINE : sale
ITEM ||--o{ ECOMMERCE_SALE_LINE : item
ITEM_VARIANT ||--o{ ECOMMERCE_SALE_LINE : item_variant
LOCATION ||--o{ ECOMMERCE_SALE_LINE : location
COMPANY ||--o{ ECOMMERCE_SETTLEMENT_BATCH : company
ECOMMERCE_CHANNEL_ACCOUNT ||--o{ ECOMMERCE_SETTLEMENT_BATCH : channel_account
COMPANY ||--o{ ECOMMERCE_SETTLEMENT_LINE : company
ECOMMERCE_SETTLEMENT_BATCH ||--o{ ECOMMERCE_SETTLEMENT_LINE : settlement_batch
ECOMMERCE_SALE ||--o{ ECOMMERCE_SETTLEMENT_LINE : sale
COMPANY ||--o{ ECOMMERCE_STOCK_PROJECTION : company
ECOMMERCE_CHANNEL_ACCOUNT ||--o{ ECOMMERCE_STOCK_PROJECTION : channel_account
ITEM_VARIANT ||--o{ ECOMMERCE_STOCK_PROJECTION : item_variant
LOCATION ||--o{ ECOMMERCE_STOCK_PROJECTION : location
COMPANY ||--o{ ECOMMERCE_SYNC_JOB : company
ECOMMERCE_CHANNEL_ACCOUNT ||--o{ ECOMMERCE_SYNC_JOB : channel_account
COMPANY ||--o{ ECOMMERCE_SYNC_LINE : company
ECOMMERCE_SYNC_JOB ||--o{ ECOMMERCE_SYNC_LINE : sync_job
COMPANY ||--o{ GRANT : company
USER ||--o{ GRANT : user
ROLE ||--o{ GRANT : role
COMPANY ||--o{ IDENTITY_BUNDLE : company
ITEM_VARIANT ||--o{ IDENTITY_BUNDLE : item_variant
COMPANY ||--o{ IDENTITY_BUNDLE_LINE : company
IDENTITY_BUNDLE ||--o{ IDENTITY_BUNDLE_LINE : bundle
ITEM_VARIANT ||--o{ IDENTITY_BUNDLE_LINE : item_variant
COMPANY ||--o{ ITEM : company
ITEM_CATEGORY ||--o{ ITEM : category
UOM ||--o{ ITEM : base_uom
UOM ||--o{ ITEM : purchase_uom
UOM ||--o{ ITEM : sales_uom
ITEM_TRACKING_POLICY ||--o{ ITEM : tracking_policy
USER ||--o{ ITEM : created_by
COMPANY ||--o{ ITEM_ATTRIBUTE : company
COMPANY ||--o{ ITEM_ATTRIBUTE_VALUE : company
ITEM_ATTRIBUTE ||--o{ ITEM_ATTRIBUTE_VALUE : attribute
COMPANY ||--o{ ITEM_BARCODE : company
ITEM_VARIANT ||--o{ ITEM_BARCODE : item_variant
UOM ||--o{ ITEM_BARCODE : uom
COMPANY ||--o{ ITEM_CATEGORY : company
ITEM_CATEGORY ||--o{ ITEM_CATEGORY : parent
COMPANY ||--o{ ITEM_TRACKING_POLICY : company
COMPANY ||--o{ ITEM_VARIANT : company
ITEM ||--o{ ITEM_VARIANT : item
COMPANY ||--o{ JOURNAL_ENTRY : company
JOURNAL_ENTRY ||--o{ JOURNAL_ENTRY : reverses
COMPANY ||--o{ JOURNAL_ENTRY_LINE : company
JOURNAL_ENTRY ||--o{ JOURNAL_ENTRY_LINE : journal_entry
ACCOUNT ||--o{ JOURNAL_ENTRY_LINE : account
PARTY ||--o{ JOURNAL_ENTRY_LINE : party
COMPANY ||--o{ LOCATION : company
LOCATION ||--o{ LOCATION : parent
COMPANY ||--o{ NUMBER_SERIES : company
NUMBER_SERIES ||--o{ NUMBER_SERIES : parent_series
COMPANY ||--o{ NUMBER_SERIES_ALLOCATION : company
NUMBER_SERIES ||--o{ NUMBER_SERIES_ALLOCATION : series
COMPANY ||--o{ PARTY : company
USER ||--o{ PARTY : created_by
COMPANY ||--o{ PARTY_CONTACT : company
PARTY ||--o{ PARTY_CONTACT : party
COMPANY ||--o{ PARTY_ROLE : company
PARTY ||--o{ PARTY_ROLE : party
PARTY ||--o{ PARTY_ROLE : parent_party
USER ||--o{ PARTY_ROLE : created_by
COMPANY ||--o{ POLICY_RULE : company
COMPANY ||--o{ POSTING_GROUP : company
COMPANY ||--o{ POSTING_LOCK : company
USER ||--o{ POSTING_LOCK : exception_user
USER ||--o{ POSTING_LOCK : created_by
COMPANY ||--o{ POSTING_SETUP : company
POSTING_GROUP ||--o{ POSTING_SETUP : item_posting_group
POSTING_GROUP ||--o{ POSTING_SETUP : party_posting_group
POSTING_GROUP ||--o{ POSTING_SETUP : tax_posting_group
POSTING_GROUP ||--o{ POSTING_SETUP : wht_posting_group
LOCATION ||--o{ POSTING_SETUP : location
ACCOUNT ||--o{ POSTING_SETUP : target_account
COMPANY ||--o{ ROLE : company
COMPANY ||--o{ TAX_CODE : company
POSTING_GROUP ||--o{ TAX_CODE : posting_group
COMPANY ||--o{ TRANSITION_TRIGGER : company
COMPANY ||--o{ UOM : company
COMPANY ||--o{ UOM_CONVERSION : company
UOM ||--o{ UOM_CONVERSION : from_uom
UOM ||--o{ UOM_CONVERSION : to_uom
COMPANY ||--o{ USER : company
COMPANY ||--o{ WHT_CODE : company
NUMBER_SERIES ||--o{ WHT_CODE : cert_series
Cross-module references
POSTING_LOCK.accounting_period_id → ACCOUNTING_PERIOD (accounting)
Data dictionary
erp_account · 11 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| code |
text |
|
|
| name |
text |
|
|
| kind |
text |
|
|
| parent_id |
integer |
FK |
erp_account |
| postable |
integer |
|
|
| currency_constraint |
text |
|
|
| status |
text |
|
|
| created_at |
integer |
|
|
| updated_at |
integer |
|
|
erp_address · 24 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| owner_type |
text |
|
|
| party_id |
integer |
FK |
erp_party |
| owner_company_id |
text |
FK |
erp_company |
| kind |
text |
|
|
| label |
text |
|
|
| house_no |
text |
|
|
| moo |
text |
|
|
| soi |
text |
|
|
| road |
text |
|
|
| sub_district |
text |
|
|
| district |
text |
|
|
| province |
text |
|
|
| postcode |
text |
|
|
| line1 |
text |
|
|
| line2 |
text |
|
|
| city |
text |
|
|
| state_region |
text |
|
|
| country_code |
text |
|
|
| geo_lat |
numeric |
|
|
| geo_lng |
numeric |
|
|
| vat_branch_no |
text |
|
|
| created_at |
integer |
|
|
erp_attachment · 12 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| entity_type |
text |
|
|
| entity_id |
text |
|
|
| file_name |
text |
|
|
| content_type |
text |
|
|
| byte_size |
integer |
|
|
| storage_key |
text |
|
|
| sha256 |
text |
|
|
| metadata |
text |
|
|
| uploaded_by |
integer |
FK |
erp_user |
| created_at |
integer |
|
|
erp_audit_event · 11 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| actor |
text |
|
|
| ts |
integer |
|
|
| action |
text |
|
|
| entity_type |
text |
|
|
| entity_id |
text |
|
|
| delta |
text |
|
|
| origin_channel |
text |
|
|
| correlation_id |
text |
|
|
| created_at |
integer |
|
|
erp_background_job · 17 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| kind |
text |
|
|
| payload |
text |
|
|
| status |
text |
|
|
| progress_done |
integer |
|
|
| progress_total |
integer |
|
|
| checkpoint |
text |
|
|
| error_class |
text |
|
|
| error_message |
text |
|
|
| retry_count |
integer |
|
|
| dedup_key |
text |
|
|
| priority |
integer |
|
|
| available_at |
integer |
|
|
| claimed_at |
integer |
|
|
| completed_at |
integer |
|
|
| created_at |
integer |
|
|
erp_business_profile · 9 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
|
|
| code |
text |
|
|
| name |
text |
|
|
| is_system |
integer |
|
|
| doctype_enablement_set |
text |
|
|
| policy_value_set |
text |
|
|
| onboarding_wizard_descriptor |
text |
|
|
| created_at |
integer |
|
|
erp_capability · 6 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
|
|
| code |
text |
|
|
| risk_class |
text |
|
|
| description |
text |
|
|
| created_at |
integer |
|
|
erp_company · 20 cols
| column |
type |
key |
references |
| company_id |
text |
PK |
|
| tenant_code |
text |
|
|
| code |
text |
|
|
| legal_name |
text |
|
|
| display_name |
text |
|
|
| status |
text |
|
|
| default_locale |
text |
|
|
| functional_currency_code |
text |
|
|
| tax_id |
text |
|
|
| vat_branch_no |
text |
|
|
| fiscal_year_start_month |
integer |
|
|
| fiscal_year_start_day |
integer |
|
|
| default_address_id |
integer |
|
|
| sso_employer_no |
text |
|
|
| e_tax_ready |
integer |
|
|
| e_tax_flags |
text |
|
|
| plan_flags |
text |
|
|
| data_residency_tag |
text |
|
|
| created_at |
integer |
|
|
| updated_at |
integer |
|
|
erp_currency · 8 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
|
|
| code |
text |
|
|
| name |
text |
|
|
| decimals |
integer |
|
|
| symbol |
text |
|
|
| is_active |
integer |
|
|
| created_at |
integer |
|
|
erp_custom_field_schema · 9 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| entity_type |
text |
|
|
| field_code |
text |
|
|
| value_type |
text |
|
|
| validation_rule |
text |
|
|
| ui_hints |
text |
|
|
| is_active |
integer |
|
|
| created_at |
integer |
|
|
erp_default_dimension · 8 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| master_entity_type |
text |
|
|
| master_entity_id |
text |
|
|
| dimension_id |
integer |
FK |
erp_dimension |
| dimension_value_id |
integer |
FK |
erp_dimension_value |
| enforcement |
text |
|
|
| created_at |
integer |
|
|
erp_dimension · 8 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| code |
text |
|
|
| name |
text |
|
|
| value_source |
text |
|
|
| entity_ref_type |
text |
|
|
| is_active |
integer |
|
|
| created_at |
integer |
|
|
erp_dimension_value · 8 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| dimension_id |
integer |
FK |
erp_dimension |
| code |
text |
|
|
| name |
text |
|
|
| entity_ref_id |
text |
|
|
| active |
integer |
|
|
| created_at |
integer |
|
|
erp_document · 16 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| doctype |
text |
|
|
| doc_no |
text |
|
|
| docstatus |
integer |
|
|
| amended_from |
integer |
FK |
erp_document |
| created_by |
integer |
FK |
erp_user |
| submitted_by |
integer |
FK |
erp_user |
| cancelled_by |
integer |
FK |
erp_user |
| created_at |
integer |
|
|
| updated_at |
integer |
|
|
| submitted_at |
integer |
|
|
| cancelled_at |
integer |
|
|
| origin_ref |
text |
|
|
| dimension_values |
text |
|
|
| custom_fields |
text |
|
|
erp_document_type · 12 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| code |
text |
|
|
| owning_module |
text |
|
|
| states_supported |
text |
|
|
| amendable |
integer |
|
|
| number_series_binding |
text |
|
|
| posting_behavior |
text |
|
|
| approval_policy_binding |
text |
|
|
| custom_field_schema_ref |
text |
|
|
| enabled |
integer |
|
|
| created_at |
integer |
|
|
erp_ecommerce_channel_account · 15 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| connector_id |
integer |
FK |
erp_ecommerce_channel_connector |
| channel_code |
text |
|
|
| external_shop_id |
text |
|
|
| display_name |
text |
|
|
| environment |
text |
|
|
| auth_status |
text |
|
|
| enabled_operation_mask |
text |
|
|
| default_location_id |
integer |
FK |
erp_location |
| stock_buffer_qty |
numeric |
|
|
| stock_display_cap |
numeric |
|
|
| status |
text |
|
|
| created_at |
integer |
|
|
| updated_at |
integer |
|
|
erp_ecommerce_channel_connector · 11 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| code |
text |
|
|
| display_name |
text |
|
|
| platform_kind |
text |
|
|
| capability_flags |
text |
|
|
| contract_version |
text |
|
|
| config_schema |
text |
|
|
| status |
text |
|
|
| created_at |
integer |
|
|
| updated_at |
integer |
|
|
erp_ecommerce_channel_listing · 14 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| channel_account_id |
integer |
FK |
erp_ecommerce_channel_account |
| channel_product_id |
integer |
FK |
erp_ecommerce_channel_product |
| item_variant_id |
integer |
FK |
erp_item_variant |
| external_sku |
text |
|
|
| external_variation_id |
text |
|
|
| active |
integer |
|
|
| last_pushed_qty |
numeric |
|
|
| last_pushed_price |
numeric |
|
|
| last_pushed_at |
integer |
|
|
| drift_flag |
integer |
|
|
| created_at |
integer |
|
|
| updated_at |
integer |
|
|
erp_ecommerce_channel_product · 11 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| channel_account_id |
integer |
FK |
erp_ecommerce_channel_account |
| item_id |
integer |
FK |
erp_item |
| title |
text |
|
|
| publish_status |
text |
|
|
| external_product_id |
text |
|
|
| content_hash |
text |
|
|
| lint_result_json |
text |
|
|
| created_at |
integer |
|
|
| updated_at |
integer |
|
|
erp_ecommerce_field_mapping_profile · 8 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| connector_id |
integer |
FK |
erp_ecommerce_channel_connector |
| contract_version |
text |
|
|
| profile_code |
text |
|
|
| mapping_json |
text |
|
|
| unknown_field_policy |
text |
|
|
| created_at |
integer |
|
|
erp_ecommerce_fulfillment · 12 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| sale_id |
integer |
FK |
erp_ecommerce_sale |
| channel_account_id |
integer |
FK |
erp_ecommerce_channel_account |
| external_id |
text |
|
|
| status |
text |
|
|
| kernel_doc_id |
integer |
FK |
erp_document |
| operation_group |
text |
|
|
| tracking_number |
text |
|
|
| submitted_at |
integer |
|
|
| created_at |
integer |
|
|
| updated_at |
integer |
|
|
erp_ecommerce_fulfillment_line · 9 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| fulfillment_id |
integer |
FK |
erp_ecommerce_fulfillment |
| sale_line_id |
integer |
FK |
erp_ecommerce_sale_line |
| item_variant_id |
integer |
FK |
erp_item_variant |
| location_id |
integer |
FK |
erp_location |
| qty |
numeric |
|
|
| status |
text |
|
|
| created_at |
integer |
|
|
erp_ecommerce_inbound_message · 11 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| channel_account_id |
integer |
FK |
erp_ecommerce_channel_account |
| kind |
text |
|
|
| external_message_id |
text |
|
|
| external_order_id |
text |
|
|
| raw_payload |
text |
|
|
| processing_status |
text |
|
|
| error_message |
text |
|
|
| produced_sale_id |
integer |
|
|
| created_at |
integer |
|
|
erp_ecommerce_order_status_map · 9 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| channel_account_id |
integer |
FK |
erp_ecommerce_channel_account |
| external_status |
text |
|
|
| internal_state |
text |
|
|
| fulfillment_state |
text |
|
|
| is_terminal |
integer |
|
|
| created_at |
integer |
|
|
| updated_at |
integer |
|
|
erp_ecommerce_reservation_ledger · 12 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| channel_account_id |
integer |
FK |
erp_ecommerce_channel_account |
| sale_id |
integer |
FK |
erp_ecommerce_sale |
| sale_line_id |
integer |
FK |
erp_ecommerce_sale_line |
| item_variant_id |
integer |
FK |
erp_item_variant |
| location_id |
integer |
FK |
erp_location |
| qty_delta |
numeric |
|
|
| reason |
text |
|
|
| operation_group |
text |
|
|
| origin_ref |
text |
|
|
| created_at |
integer |
|
|
erp_ecommerce_return_request · 14 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| channel_account_id |
integer |
FK |
erp_ecommerce_channel_account |
| sale_id |
integer |
FK |
erp_ecommerce_sale |
| kernel_doc_id |
integer |
FK |
erp_document |
| external_return_id |
text |
|
|
| external_order_id |
text |
|
|
| status |
text |
|
|
| reason |
text |
|
|
| refund_amount |
numeric |
|
|
| posted_at |
integer |
|
|
| raw_payload |
text |
|
|
| created_at |
integer |
|
|
| updated_at |
integer |
|
|
erp_ecommerce_sale · 15 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| channel_account_id |
integer |
FK |
erp_ecommerce_channel_account |
| channel_code |
text |
|
|
| external_id |
text |
|
|
| status |
text |
|
|
| external_status |
text |
|
|
| customer_name |
text |
|
|
| currency_code |
text |
|
|
| net_amount |
numeric |
|
|
| tax_amount |
numeric |
|
|
| gross_amount |
numeric |
|
|
| raw_payload |
text |
|
|
| created_at |
integer |
|
|
| updated_at |
integer |
|
|
erp_ecommerce_sale_line · 14 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| sale_id |
integer |
FK |
erp_ecommerce_sale |
| line_no |
integer |
|
|
| item_id |
integer |
FK |
erp_item |
| item_variant_id |
integer |
FK |
erp_item_variant |
| sku |
text |
|
|
| description |
text |
|
|
| qty |
numeric |
|
|
| unit_price |
numeric |
|
|
| net_amount |
numeric |
|
|
| tax_amount |
numeric |
|
|
| location_id |
integer |
FK |
erp_location |
| created_at |
integer |
|
|
erp_ecommerce_settlement_batch · 12 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| channel_account_id |
integer |
FK |
erp_ecommerce_channel_account |
| external_statement_id |
text |
|
|
| period_start |
text |
|
|
| period_end |
text |
|
|
| gross_amount |
numeric |
|
|
| total_fee_amount |
numeric |
|
|
| net_payout_amount |
numeric |
|
|
| status |
text |
|
|
| created_at |
integer |
|
|
| updated_at |
integer |
|
|
erp_ecommerce_settlement_line · 12 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| settlement_batch_id |
integer |
FK |
erp_ecommerce_settlement_batch |
| external_order_id |
text |
|
|
| sale_id |
integer |
FK |
erp_ecommerce_sale |
| component_json |
text |
|
|
| expected_fee_amount |
numeric |
|
|
| actual_fee_amount |
numeric |
|
|
| variance_amount |
numeric |
|
|
| variance_class |
text |
|
|
| resolution |
text |
|
|
| created_at |
integer |
|
|
erp_ecommerce_stock_projection · 10 cols
| column |
type |
key |
references |
| company_id |
text |
FK |
erp_company |
| channel_account_id |
integer |
FK |
erp_ecommerce_channel_account |
| item_variant_id |
integer |
FK |
erp_item_variant |
| location_id |
integer |
FK |
erp_location |
| on_hand_qty |
numeric |
|
|
| reserved_qty |
numeric |
|
|
| buffer_qty |
numeric |
|
|
| display_cap |
numeric |
|
|
| available_qty |
numeric |
|
|
| last_rebuilt_at |
integer |
|
|
erp_ecommerce_sync_job · 12 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| channel_account_id |
integer |
FK |
erp_ecommerce_channel_account |
| kind |
text |
|
|
| trigger_kind |
text |
|
|
| status |
text |
|
|
| watermark_in |
text |
|
|
| watermark_out |
text |
|
|
| dedup_key |
text |
|
|
| error_message |
text |
|
|
| created_at |
integer |
|
|
| updated_at |
integer |
|
|
erp_ecommerce_sync_line · 10 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| sync_job_id |
integer |
FK |
erp_ecommerce_sync_job |
| subject_type |
text |
|
|
| subject_id |
text |
|
|
| attempted_payload_digest |
text |
|
|
| outcome |
text |
|
|
| platform_response_code |
text |
|
|
| platform_response_message |
text |
|
|
| created_at |
integer |
|
|
erp_exchange_rate · 8 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
|
|
| from_currency_code |
text |
|
|
| to_currency_code |
text |
|
|
| rate_date |
text |
|
|
| rate |
numeric |
|
|
| source |
text |
|
|
| created_at |
integer |
|
|
erp_grant · 9 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| grant_kind |
text |
|
|
| user_id |
integer |
FK |
erp_user |
| role_id |
integer |
FK |
erp_role |
| capability_code |
text |
|
|
| scope |
text |
|
|
| effect |
text |
|
|
| created_at |
integer |
|
|
erp_identity_bundle · 9 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| item_variant_id |
integer |
FK |
erp_item_variant |
| purpose |
text |
|
|
| status |
text |
|
|
| source_ref |
text |
|
|
| custom_attributes |
text |
|
|
| created_at |
integer |
|
|
| updated_at |
integer |
|
|
erp_identity_bundle_line · 13 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| bundle_id |
integer |
FK |
erp_identity_bundle |
| item_variant_id |
integer |
FK |
erp_item_variant |
| lot_code |
text |
|
|
| serial_code |
text |
|
|
| qty |
numeric |
|
|
| mfg_date |
text |
|
|
| expiry_date |
text |
|
|
| supplier_lot |
text |
|
|
| warranty_expiry |
text |
|
|
| custom_attributes |
text |
|
|
| created_at |
integer |
|
|
erp_item · 21 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| code |
text |
|
|
| name |
text |
|
|
| kind |
text |
|
|
| category_id |
integer |
FK |
erp_item_category |
| base_uom_id |
integer |
FK |
erp_uom |
| purchase_uom_id |
integer |
FK |
erp_uom |
| sales_uom_id |
integer |
FK |
erp_uom |
| tracking_policy_id |
integer |
FK |
erp_item_tracking_policy |
| item_posting_group_id |
integer |
|
|
| tax_class_code |
text |
|
|
| replenishment_source |
text |
|
|
| status |
text |
|
|
| custom_attributes |
text |
|
|
| dimension_defaults |
text |
|
|
| cost_precision |
integer |
|
|
| price_precision |
integer |
|
|
| created_by |
integer |
FK |
erp_user |
| created_at |
integer |
|
|
| updated_at |
integer |
|
|
erp_item_attribute · 6 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| code |
text |
|
|
| name |
text |
|
|
| sort_order |
integer |
|
|
| created_at |
integer |
|
|
erp_item_attribute_value · 8 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| attribute_id |
integer |
FK |
erp_item_attribute |
| code |
text |
|
|
| display_value |
text |
|
|
| sort_order |
integer |
|
|
| is_active |
integer |
|
|
| created_at |
integer |
|
|
erp_item_barcode · 9 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| code |
text |
|
|
| barcode_type |
text |
|
|
| item_variant_id |
integer |
FK |
erp_item_variant |
| uom_id |
integer |
FK |
erp_uom |
| qty_per_scan |
numeric |
|
|
| is_primary |
integer |
|
|
| created_at |
integer |
|
|
erp_item_category · 11 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| parent_id |
integer |
FK |
erp_item_category |
| code |
text |
|
|
| name |
text |
|
|
| default_posting_group_id |
integer |
|
|
| default_tracking_policy_id |
integer |
|
|
| default_qc_policy_code |
text |
|
|
| default_policies |
text |
|
|
| created_at |
integer |
|
|
| updated_at |
integer |
|
|
erp_item_tracking_policy · 11 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| code |
text |
|
|
| name |
text |
|
|
| tracking_mode |
text |
|
|
| expiry_required |
integer |
|
|
| strict_expiration_posting |
integer |
|
|
| warranty_duration_formula |
text |
|
|
| shelf_life_formula |
text |
|
|
| capture_points |
text |
|
|
| created_at |
integer |
|
|
erp_item_variant · 15 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| item_id |
integer |
FK |
erp_item |
| variant_code |
text |
|
|
| name |
text |
|
|
| attribute_values |
text |
|
|
| attribute_signature |
text |
|
|
| is_default |
integer |
|
|
| status |
text |
|
|
| cost |
numeric |
|
|
| weight |
numeric |
|
|
| volume |
numeric |
|
|
| overrides |
text |
|
|
| created_at |
integer |
|
|
| updated_at |
integer |
|
|
erp_journal_entry · 15 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| journal_code |
text |
|
|
| posting_date |
text |
|
|
| origin_doctype |
text |
|
|
| origin_doc_id |
text |
|
|
| docstatus |
integer |
|
|
| hash_prev |
text |
|
|
| hash_self |
text |
|
|
| entry_no |
text |
|
|
| is_reversal |
integer |
|
|
| reverses_id |
integer |
FK |
erp_journal_entry |
| idempotency_key |
text |
|
|
| idempotency_fingerprint |
text |
|
|
| created_at |
integer |
|
|
erp_journal_entry_line · 17 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| journal_entry_id |
integer |
FK |
erp_journal_entry |
| line_no |
integer |
|
|
| account_id |
integer |
FK |
erp_account |
| account |
text |
|
|
| dr |
numeric |
|
|
| cr |
numeric |
|
|
| party_id |
integer |
FK |
erp_party |
| tax_code |
text |
|
|
| wht_code |
text |
|
|
| currency_code |
text |
|
|
| txn_currency |
text |
|
|
| txn_amount |
numeric |
|
|
| dimension_values |
text |
|
|
| origin_line_ref |
text |
|
|
| created_at |
integer |
|
|
erp_location · 18 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| parent_id |
integer |
FK |
erp_location |
| code |
text |
|
|
| name |
text |
|
|
| type |
text |
|
|
| require_receive |
integer |
|
|
| require_putaway |
integer |
|
|
| require_pick |
integer |
|
|
| require_ship |
integer |
|
|
| bin_mandatory |
integer |
|
|
| directed_putaway |
integer |
|
|
| travel_seq |
integer |
|
|
| storage_constraints |
text |
|
|
| dimension_defaults |
text |
|
|
| status |
text |
|
|
| created_at |
integer |
|
|
| updated_at |
integer |
|
|
erp_number_series · 15 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| doctype |
text |
|
|
| code |
text |
|
|
| format_mask |
text |
|
|
| gap_free |
integer |
|
|
| provisional_mask |
text |
|
|
| reset_cycle |
text |
|
|
| effective_from |
text |
|
|
| effective_to |
text |
|
|
| current_value |
integer |
|
|
| branch_code |
text |
|
|
| parent_series_id |
integer |
FK |
erp_number_series |
| lease_owner |
text |
|
|
| created_at |
integer |
|
|
erp_number_series_allocation · 7 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| series_id |
integer |
FK |
erp_number_series |
| number |
text |
|
|
| drawn_at |
integer |
|
|
| document_ref |
text |
|
|
| allocation_kind |
text |
|
|
erp_party · 15 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| code |
text |
|
|
| kind |
text |
|
|
| legal_name |
text |
|
|
| display_name |
text |
|
|
| thai_tax_id |
text |
|
|
| default_address_id |
integer |
|
|
| default_language |
text |
|
|
| contact_points |
text |
|
|
| dimension_defaults |
text |
|
|
| status |
text |
|
|
| created_by |
integer |
FK |
erp_user |
| created_at |
integer |
|
|
| updated_at |
integer |
|
|
erp_party_contact · 9 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| party_id |
integer |
FK |
erp_party |
| contact_type |
text |
|
|
| promptpay_type |
text |
|
|
| value |
text |
|
|
| label |
text |
|
|
| is_primary |
integer |
|
|
| created_at |
integer |
|
|
erp_party_role · 15 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| party_id |
integer |
FK |
erp_party |
| role |
text |
|
|
| status |
text |
|
|
| parent_party_id |
integer |
FK |
erp_party |
| posting_group_id |
integer |
|
|
| price_tier |
text |
|
|
| credit_limit |
numeric |
|
|
| payment_terms_code |
text |
|
|
| wht_profile_code |
text |
|
|
| role_attributes |
text |
|
|
| created_by |
integer |
FK |
erp_user |
| created_at |
integer |
|
|
| updated_at |
integer |
|
|
erp_policy_rule · 13 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| domain |
text |
|
|
| scope_selector |
text |
|
|
| scope_specificity |
integer |
|
|
| value_type |
text |
|
|
| value |
text |
|
|
| effective_from |
text |
|
|
| effective_to |
text |
|
|
| priority |
integer |
|
|
| provenance |
text |
|
|
| created_at |
integer |
|
|
| updated_at |
integer |
|
|
erp_posting_group · 6 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| kind |
text |
|
|
| code |
text |
|
|
| name |
text |
|
|
| created_at |
integer |
|
|
erp_posting_lock · 10 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| accounting_period_id |
integer |
FK |
erp_accounting_period |
| locked_from |
text |
|
|
| locked_to |
text |
|
|
| exception_user_id |
integer |
FK |
erp_user |
| reason |
text |
|
|
| expires_at |
integer |
|
|
| created_by |
integer |
FK |
erp_user |
| created_at |
integer |
|
|
erp_posting_setup · 14 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| matrix_key |
text |
|
|
| transaction_kind |
text |
|
|
| item_posting_group_id |
integer |
FK |
erp_posting_group |
| party_posting_group_id |
integer |
FK |
erp_posting_group |
| tax_posting_group_id |
integer |
FK |
erp_posting_group |
| wht_posting_group_id |
integer |
FK |
erp_posting_group |
| location_id |
integer |
FK |
erp_location |
| target_account_id |
integer |
FK |
erp_account |
| effectivity_start |
text |
|
|
| effectivity_end |
text |
|
|
| priority |
integer |
|
|
| created_at |
integer |
|
|
erp_role · 6 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| code |
text |
|
|
| description |
text |
|
|
| is_system |
integer |
|
|
| created_at |
integer |
|
|
erp_tax_code · 10 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| code |
text |
|
|
| kind |
text |
|
|
| rate |
numeric |
|
|
| inclusive_default |
integer |
|
|
| posting_group_id |
integer |
FK |
erp_posting_group |
| effective_from |
text |
|
|
| effective_to |
text |
|
|
| created_at |
integer |
|
|
erp_transition_trigger · 10 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| trigger_name |
text |
|
|
| doctype |
text |
|
|
| phase |
text |
|
|
| subscriber_module |
text |
|
|
| handler_ref |
text |
|
|
| ordering |
integer |
|
|
| enabled |
integer |
|
|
| created_at |
integer |
|
|
erp_uom · 9 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| code |
text |
|
|
| name |
text |
|
|
| quantity_kind |
text |
|
|
| display_precision |
integer |
|
|
| is_system |
integer |
|
|
| is_active |
integer |
|
|
| created_at |
integer |
|
|
erp_uom_conversion · 12 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| scope |
text |
|
|
| item_id |
integer |
|
|
| from_uom_id |
integer |
FK |
erp_uom |
| to_uom_id |
integer |
FK |
erp_uom |
| factor_numerator |
integer |
|
|
| factor_denominator |
integer |
|
|
| effective_from |
text |
|
|
| effective_to |
text |
|
|
| is_active |
integer |
|
|
| created_at |
integer |
|
|
erp_user · 9 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| identity_handle |
text |
|
|
| display_name |
text |
|
|
| status |
text |
|
|
| locale |
text |
|
|
| role_grants |
text |
|
|
| created_at |
integer |
|
|
| updated_at |
integer |
|
|
erp_wht_code · 13 cols
| column |
type |
key |
references |
| id |
integer |
PK |
|
| company_id |
text |
FK |
erp_company |
| code |
text |
|
|
| income_type |
text |
|
|
| rate |
numeric |
|
|
| applies_to |
text |
|
|
| payee_kind |
text |
|
|
| form_type |
text |
|
|
| min_threshold |
numeric |
|
|
| cert_series_id |
integer |
FK |
erp_number_series |
| effective_from |
text |
|
|
| effective_to |
text |
|
|
| created_at |
integer |
|
|