[
  {
    "apiName": "NetSuite_Revenue_Voucher_Line__c",
    "label": "NetSuite Revenue Voucher Line",
    "pluralLabel": "NetSuite Revenue Voucher Lines",
    "tableType": "custom_object",
    "category": "crm",
    "sharingModel": "Private",
    "enableHierarchySharing": false,
    "description": "Immutable-source-fact mirror of one NetSuite customsearch1710 revenue voucher transaction line. Stable source identity is realm:transaction:lineUniqueKey; admitted rows are written only through the authenticated NexusCRM Composite external-ID API, and CRM enrichment must not replace source fields.",
    "fields": [
      {
        "apiName": "Name",
        "label": "Name",
        "type": "string",
        "isNameField": true,
        "required": true
      },
      {
        "apiName": "Transaction_Type__c",
        "label": "Transaction Type",
        "type": "string"
      },
      {
        "apiName": "Company__c",
        "label": "Company",
        "type": "string"
      },
      {
        "apiName": "Transaction_Date__c",
        "label": "Transaction Date",
        "type": "date"
      },
      {
        "apiName": "Document_Number__c",
        "label": "Document Number",
        "type": "string"
      },
      {
        "apiName": "Posting_Period__c",
        "label": "Posting Period",
        "type": "string"
      },
      {
        "apiName": "Transaction_Number__c",
        "label": "Transaction Number",
        "type": "string"
      },
      {
        "apiName": "Description__c",
        "label": "Description",
        "type": "textarea"
      },
      {
        "apiName": "GL_Account_Number__c",
        "label": "GL Account Number",
        "type": "string"
      },
      {
        "apiName": "GL_Account_Name__c",
        "label": "GL Account Name",
        "type": "string"
      },
      {
        "apiName": "Transaction_Currency__c",
        "label": "Transaction Currency",
        "type": "string"
      },
      {
        "apiName": "Transaction_Amount__c",
        "label": "Transaction Amount",
        "type": "currency"
      },
      {
        "apiName": "Exchange_Rate__c",
        "label": "Exchange Rate",
        "type": "double"
      },
      {
        "apiName": "Base_Amount__c",
        "label": "Base Amount",
        "type": "currency"
      },
      {
        "apiName": "Cost_Center_Code__c",
        "label": "Cost Center Code",
        "type": "string"
      },
      {
        "apiName": "Cost_Center_Formula__c",
        "label": "Cost Center Formula",
        "type": "string"
      },
      {
        "apiName": "Entity_Name__c",
        "label": "Entity Name",
        "type": "string"
      },
      {
        "apiName": "Source_Customer_Account_Id__c",
        "label": "Source Customer Account ID",
        "type": "string",
        "required": true
      },
      {
        "apiName": "Mgmt_Report_L1_Formula__c",
        "label": "Management Reporting Item L1 Formula",
        "type": "string"
      },
      {
        "apiName": "Mgmt_Report_L2_Formula__c",
        "label": "Management Reporting Item L2 Formula",
        "type": "string"
      },
      {
        "apiName": "Mgmt_Report_L1__c",
        "label": "Management Reporting Item L1",
        "type": "string"
      },
      {
        "apiName": "Mgmt_Report_L2__c",
        "label": "Management Reporting Item L2",
        "type": "string"
      },
      {
        "apiName": "Department_No_Hierarchy__c",
        "label": "Department (No Hierarchy)",
        "type": "string"
      },
      {
        "apiName": "First_Level_Department__c",
        "label": "First Level Department",
        "type": "string"
      },
      {
        "apiName": "Trading_Partner_Name__c",
        "label": "Trading Partner Name",
        "type": "string"
      },
      {
        "apiName": "Main_Memo__c",
        "label": "Main Memo",
        "type": "textarea"
      },
      {
        "apiName": "Customer_Region__c",
        "label": "Customer Region",
        "type": "string"
      },
      {
        "apiName": "Order_Number__c",
        "label": "Order Number",
        "type": "string"
      },
      {
        "apiName": "Support_Type__c",
        "label": "Support Type",
        "type": "string"
      },
      {
        "apiName": "Group_COA__c",
        "label": "Group COA",
        "type": "string"
      },
      {
        "apiName": "Source_Transaction_Modified_At__c",
        "label": "Source Transaction Modified At",
        "type": "datetime"
      },
      {
        "apiName": "Source_Line_Modified_At__c",
        "label": "Source Line Modified At",
        "type": "datetime"
      },
      {
        "apiName": "GL_Account_Type__c",
        "label": "GL Account Type",
        "type": "string"
      },
      {
        "apiName": "Product_Name__c",
        "label": "Product Name",
        "type": "string"
      },
      {
        "apiName": "Product_Category__c",
        "label": "Product Category",
        "type": "string"
      },
      {
        "apiName": "Cloud_Provider__c",
        "label": "Cloud Provider",
        "type": "string"
      },
      {
        "apiName": "Project__c",
        "label": "Project",
        "type": "string"
      },
      {
        "apiName": "NetSuite_Source_Key__c",
        "label": "NetSuite Source Key",
        "type": "string",
        "required": true,
        "unique": true
      },
      {
        "apiName": "NetSuite_Account_Realm__c",
        "label": "NetSuite Account Realm",
        "type": "string",
        "required": true
      },
      {
        "apiName": "NetSuite_Transaction_Id__c",
        "label": "NetSuite Transaction ID",
        "type": "string",
        "required": true
      },
      {
        "apiName": "NetSuite_Line_Unique_Key__c",
        "label": "NetSuite Line Unique Key",
        "type": "string",
        "required": true
      },
      {
        "apiName": "NetSuite_Accounting_Book_Id__c",
        "label": "NetSuite Accounting Book ID",
        "type": "string"
      },
      {
        "apiName": "NetSuite_Posting_Period_Id__c",
        "label": "NetSuite Posting Period ID",
        "type": "string",
        "required": true
      },
      {
        "apiName": "Source_Search_Id__c",
        "label": "Source Search ID",
        "type": "string",
        "required": true,
        "default": "customsearch1710"
      },
      {
        "apiName": "Source_Schema_Version__c",
        "label": "Source Schema Version",
        "type": "string",
        "required": true,
        "default": "revenue-voucher-excel/v1"
      },
      {
        "apiName": "Source_Payload_Hash__c",
        "label": "Source Payload Hash",
        "type": "string",
        "required": true
      },
      {
        "apiName": "First_Seen_Run_Id__c",
        "label": "First Seen Run ID",
        "type": "string",
        "required": true
      },
      {
        "apiName": "First_Seen_At__c",
        "label": "First Seen At",
        "type": "datetime",
        "required": true
      },
      {
        "apiName": "Last_Seen_Run_Id__c",
        "label": "Last Seen Run ID",
        "type": "string",
        "required": true
      },
      {
        "apiName": "Last_Seen_At__c",
        "label": "Last Seen At",
        "type": "datetime",
        "required": true
      },
      {
        "apiName": "Is_Source_Active__c",
        "label": "Is Source Active",
        "type": "boolean",
        "required": true,
        "default": "1"
      },
      {
        "apiName": "CRM_Account__c",
        "label": "CRM Account",
        "type": "reference",
        "referenceTo": [
          "Account"
        ],
        "relationshipName": "CRM_Account__r",
        "childRelationshipName": "NetSuite_Revenue_Voucher_Lines",
        "deleteConstraint": "Restrict",
        "required": true
      }
    ],
    "indices": [
      {
        "name": "idx_nrv_account",
        "columns": [
          "CRM_Account__c"
        ]
      },
      {
        "name": "idx_nrv_period_active",
        "columns": [
          "NetSuite_Posting_Period_Id__c",
          "Is_Source_Active__c"
        ]
      }
    ],
    "keyPrefix": "a1Z"
  }
]
