[
  {
    "apiName": "Revenue__c",
    "label": "RevRec",
    "pluralLabel": "RevRec",
    "tableType": "custom_object",
    "category": "crm",
    "sharingModel": "ControlledByParent",
    "enableHierarchySharing": false,
    "description": "Probe-converted object spec for Revenue__c",
    "fields": [
      {
        "apiName": "Name",
        "label": "Name",
        "type": "string",
        "isNameField": true
      },
      {
        "apiName": "Account__c",
        "label": "Account",
        "type": "reference",
        "referenceTo": [
          "Account"
        ],
        "relationshipName": "Account__r",
        "childRelationshipName": "Revenue",
        "deleteConstraint": "SetNull"
      },
      {
        "apiName": "Amount_Before_Adjust__c",
        "label": "Amount Before Adjust",
        "type": "formula",
        "formula": "IF(Date__c < DATE(2025,4,30) ,IF(Amount_Before_Adjust_to_Use__c<0.01, Amount_USD__c, Amount_Before_Adjust_to_Use__c),Amount_Before_Adjust_to_Use__c)",
        "returnType": "double",
        "formulaMode": "active",
        "createable": false,
        "updateable": false
      },
      {
        "apiName": "Amount_Before_Adjust_to_Use__c",
        "label": "Amount Before Adjust to Use",
        "type": "double"
      },
      {
        "apiName": "Amount_USD__c",
        "label": "Amount (USD)",
        "type": "formula",
        "formula": "Amount__c / Exchange_Rate_to_Use__c",
        "returnType": "double",
        "formulaMode": "active",
        "createable": false,
        "updateable": false
      },
      {
        "apiName": "Amount__c",
        "label": "Amount",
        "type": "currency"
      },
      {
        "apiName": "Estimated_Revenue_Amount__c",
        "label": "Estimated Revenue Amount",
        "type": "currency"
      },
      {
        "apiName": "Billing_End_Date__c",
        "label": "TiDB Cloud Billing End Date",
        "type": "date"
      },
      {
        "apiName": "Contract__c",
        "label": "Contract",
        "type": "reference",
        "referenceTo": [
          "Contract"
        ],
        "relationshipName": "Contract__r",
        "childRelationshipName": "Revenue",
        "deleteConstraint": "SetNull"
      },
      {
        "apiName": "Credit_Amount__c",
        "label": "Credit Amount",
        "type": "double"
      },
      {
        "apiName": "CurrencyIsoCode",
        "label": "Currency ISO Code",
        "type": "picklist",
        "default": "USD",
        "options": [
          {
            "label": "Chinese Yuan",
            "value": "CNY"
          },
          {
            "label": "Japanese Yen",
            "value": "JPY"
          },
          {
            "label": "Singapore Dollar",
            "value": "SGD"
          },
          {
            "label": "U.S. Dollar",
            "value": "USD"
          }
        ]
      },
      {
        "apiName": "Date__c",
        "label": "Date",
        "type": "date",
        "default": "today()"
      },
      {
        "apiName": "Deal_Registration__c",
        "label": "Deal Registration",
        "type": "formula",
        "formula": "Order__r.Deal_Registration__c",
        "returnType": "string",
        "formulaMode": "active",
        "createable": false,
        "updateable": false
      },
      {
        "apiName": "Exchange_Rate_to_Use__c",
        "label": "Exchange Rate to Use",
        "type": "double"
      },
      {
        "apiName": "Fiscal_Period__c",
        "label": "Fiscal Period",
        "type": "formula",
        "formula": "\"Q\"& text(CEILING(MONTH( ADDMONTHS( Date__c ,9) )/3))&\"FY\"&RIGHT(text(YEAR( ADDMONTHS( Date__c ,9))), 2)",
        "returnType": "string",
        "formulaMode": "active",
        "createable": false,
        "updateable": false
      },
      {
        "apiName": "Key__c",
        "label": "*Key",
        "type": "formula",
        "formula": "CASESAFEID(Order_Product__c) + CASESAFEID(Order__c)",
        "returnType": "string",
        "formulaMode": "active",
        "createable": false,
        "updateable": false
      },
      {
        "apiName": "Order_Number__c",
        "label": "Order Number",
        "type": "formula",
        "formula": "HYPERLINK( Order__c ,  Order__r.Name )",
        "returnType": "string",
        "formulaMode": "active",
        "createable": false,
        "updateable": false
      },
      {
        "apiName": "Order_Product__c",
        "label": "Order Product",
        "type": "reference",
        "referenceTo": [
          "Order_Product__c"
        ],
        "relationshipName": "Order_Product__r",
        "childRelationshipName": "Revenue",
        "deleteConstraint": "SetNull"
      },
      {
        "apiName": "Order__c",
        "label": "Order",
        "type": "masterdetail",
        "referenceTo": [
          "Order"
        ],
        "relationshipName": "Order__r",
        "childRelationshipName": "Revenue"
      },
      {
        "apiName": "PLG_BD_Pool__c",
        "label": "PLG BD Pool",
        "type": "boolean",
        "default": "0"
      },
      {
        "apiName": "Partner_Name__c",
        "label": "Partner Name",
        "type": "reference",
        "referenceTo": [
          "Account"
        ],
        "relationshipName": "Partner_Name__r",
        "childRelationshipName": "RevRec",
        "deleteConstraint": "SetNull"
      },
      {
        "apiName": "Product__c",
        "label": "Product",
        "type": "reference",
        "referenceTo": [
          "Product2"
        ],
        "relationshipName": "Product__r",
        "childRelationshipName": "Revenue",
        "deleteConstraint": "SetNull"
      },
      {
        "apiName": "Rate__c",
        "label": "Exchange Rate",
        "type": "double"
      },
      {
        "apiName": "Related_RevRec_Records_Date__c",
        "label": "Related RevRec Records Date",
        "type": "formula",
        "formula": "Related_RevRec_Records__r.Date__c",
        "returnType": "date",
        "formulaMode": "active",
        "createable": false,
        "updateable": false
      },
      {
        "apiName": "Related_RevRec_Records__c",
        "label": "Related RevRec Records",
        "type": "reference",
        "referenceTo": [
          "Revenue__c"
        ],
        "relationshipName": "Related_RevRec_Records__r",
        "childRelationshipName": "RevRec",
        "deleteConstraint": "SetNull"
      },
      {
        "apiName": "Sales_Channel_Type__c",
        "label": "Sales Channel Type",
        "type": "formula",
        "formula": "Order__r.Sales_Channel_Type__c",
        "returnType": "string",
        "formulaMode": "active",
        "createable": false,
        "updateable": false
      },
      {
        "apiName": "Service_Man_day__c",
        "label": "Service Man-day",
        "type": "reference",
        "referenceTo": [
          "Service_Man_day__c"
        ],
        "relationshipName": "Service_Man_day__r",
        "childRelationshipName": "Revenue",
        "deleteConstraint": "SetNull"
      },
      {
        "apiName": "Status__c",
        "label": "Status",
        "type": "picklist",
        "options": [
          {
            "value": "Unconfirmed",
            "label": "Unconfirmed"
          },
          {
            "value": "Confirmed",
            "label": "Confirmed"
          },
          {
            "value": "Cancelled",
            "label": "Cancelled"
          }
        ],
        "default": "Unconfirmed"
      },
      {
        "apiName": "Tax__c",
        "label": "Tax",
        "type": "formula",
        "formula": "Order__r.Tax__c",
        "returnType": "percent",
        "formulaMode": "active",
        "createable": false,
        "updateable": false
      },
      {
        "apiName": "TiDB_Cloud_Dedicated_Amount_Raw__c",
        "label": "TiDB Cloud - Dedicated Amount (Raw)",
        "type": "double"
      },
      {
        "apiName": "TiDB_Cloud_Dedicated_Amount__c",
        "label": "TiDB Cloud - Dedicated Amount",
        "type": "formula",
        "formula": "IF(TiDB_Cloud_Dedicated_Amount_Raw__c > 0, IF(AND(TiDB_Cloud_Dedicated_Amount_Raw__c + TiDB_Cloud_Serverless_Amount_Raw__c + TiDB_Cloud_Essential_Amount_Raw__c + TiDB_Cloud_Premium_Amount_Raw__c + TiDB_Cloud_Support_Amount__c - Amount_USD__c < 0.05, TiDB_Cloud_Dedicated_Amount_Raw__c + TiDB_Cloud_Serverless_Amount_Raw__c + TiDB_Cloud_Essential_Amount_Raw__c + TiDB_Cloud_Premium_Amount_Raw__c + TiDB_Cloud_Support_Amount__c - Amount_USD__c > -0.05), TiDB_Cloud_Dedicated_Amount_Raw__c - TiDB_Cloud_Dedicated_Amount_Raw__c - TiDB_Cloud_Serverless_Amount_Raw__c - TiDB_Cloud_Essential_Amount_Raw__c - TiDB_Cloud_Premium_Amount_Raw__c - TiDB_Cloud_Support_Amount__c + Amount_USD__c, TiDB_Cloud_Dedicated_Amount_Raw__c), TiDB_Cloud_Dedicated_Amount_Raw__c)",
        "returnType": "double",
        "formulaMode": "active",
        "createable": false,
        "updateable": false
      },
      {
        "apiName": "TiDB_Cloud_Essential_Amount_Raw__c",
        "label": "TiDB Cloud - Essential Amount (Raw)",
        "type": "double"
      },
      {
        "apiName": "TiDB_Cloud_Essential_Amount__c",
        "label": "TiDB Cloud - Essential Amount",
        "type": "formula",
        "formula": "IF(OR(TiDB_Cloud_Dedicated_Amount_Raw__c > 0, TiDB_Cloud_Premium_Amount_Raw__c > 0), TiDB_Cloud_Essential_Amount_Raw__c, IF(AND(TiDB_Cloud_Dedicated_Amount_Raw__c + TiDB_Cloud_Serverless_Amount_Raw__c + TiDB_Cloud_Essential_Amount_Raw__c + TiDB_Cloud_Premium_Amount_Raw__c + TiDB_Cloud_Support_Amount__c - Amount_USD__c < 0.05, TiDB_Cloud_Dedicated_Amount_Raw__c + TiDB_Cloud_Serverless_Amount_Raw__c + TiDB_Cloud_Essential_Amount_Raw__c + TiDB_Cloud_Premium_Amount_Raw__c + TiDB_Cloud_Support_Amount__c - Amount_USD__c > -0.05, TiDB_Cloud_Essential_Amount_Raw__c > 0), TiDB_Cloud_Essential_Amount_Raw__c - TiDB_Cloud_Dedicated_Amount_Raw__c - TiDB_Cloud_Serverless_Amount_Raw__c - TiDB_Cloud_Essential_Amount_Raw__c - TiDB_Cloud_Premium_Amount_Raw__c - TiDB_Cloud_Support_Amount__c + Amount_USD__c, TiDB_Cloud_Essential_Amount_Raw__c))",
        "returnType": "double",
        "formulaMode": "active",
        "createable": false,
        "updateable": false
      },
      {
        "apiName": "TiDB_Cloud_Premium_Amount_Raw__c",
        "label": "TiDB Cloud - Premium Amount (Raw)",
        "type": "double"
      },
      {
        "apiName": "TiDB_Cloud_Premium_Amount__c",
        "label": "TiDB Cloud - Premium Amount",
        "type": "formula",
        "formula": "IF(TiDB_Cloud_Dedicated_Amount_Raw__c > 0, TiDB_Cloud_Premium_Amount_Raw__c, IF(AND(TiDB_Cloud_Dedicated_Amount_Raw__c + TiDB_Cloud_Serverless_Amount_Raw__c + TiDB_Cloud_Essential_Amount_Raw__c + TiDB_Cloud_Premium_Amount_Raw__c + TiDB_Cloud_Support_Amount__c - Amount_USD__c < 0.05, TiDB_Cloud_Dedicated_Amount_Raw__c + TiDB_Cloud_Serverless_Amount_Raw__c + TiDB_Cloud_Essential_Amount_Raw__c + TiDB_Cloud_Premium_Amount_Raw__c + TiDB_Cloud_Support_Amount__c - Amount_USD__c > -0.05, TiDB_Cloud_Premium_Amount_Raw__c > 0), TiDB_Cloud_Premium_Amount_Raw__c - TiDB_Cloud_Dedicated_Amount_Raw__c - TiDB_Cloud_Serverless_Amount_Raw__c - TiDB_Cloud_Essential_Amount_Raw__c - TiDB_Cloud_Premium_Amount_Raw__c - TiDB_Cloud_Support_Amount__c + Amount_USD__c, TiDB_Cloud_Premium_Amount_Raw__c))",
        "returnType": "double",
        "formulaMode": "active",
        "createable": false,
        "updateable": false
      },
      {
        "apiName": "TiDB_Cloud_Serverless_Amount_Raw__c",
        "label": "TiDB Cloud - Starter Amount (Raw)",
        "type": "double"
      },
      {
        "apiName": "TiDB_Cloud_Serverless_Amount__c",
        "label": "TiDB Cloud - Starter Amount",
        "type": "formula",
        "formula": "IF(OR(TiDB_Cloud_Dedicated_Amount_Raw__c > 0,TiDB_Cloud_Essential_Amount_Raw__c > 0, TiDB_Cloud_Premium_Amount_Raw__c > 0), TiDB_Cloud_Serverless_Amount_Raw__c, IF(AND(TiDB_Cloud_Dedicated_Amount_Raw__c + TiDB_Cloud_Serverless_Amount_Raw__c + TiDB_Cloud_Essential_Amount_Raw__c + TiDB_Cloud_Premium_Amount_Raw__c + TiDB_Cloud_Support_Amount__c - Amount_USD__c < 0.05, TiDB_Cloud_Dedicated_Amount_Raw__c + TiDB_Cloud_Serverless_Amount_Raw__c + TiDB_Cloud_Essential_Amount_Raw__c + TiDB_Cloud_Premium_Amount_Raw__c + TiDB_Cloud_Support_Amount__c - Amount_USD__c > -0.05, TiDB_Cloud_Serverless_Amount_Raw__c > 0), TiDB_Cloud_Serverless_Amount_Raw__c - TiDB_Cloud_Dedicated_Amount_Raw__c - TiDB_Cloud_Serverless_Amount_Raw__c - TiDB_Cloud_Essential_Amount_Raw__c - TiDB_Cloud_Premium_Amount_Raw__c - TiDB_Cloud_Support_Amount__c + Amount_USD__c, TiDB_Cloud_Serverless_Amount_Raw__c))",
        "returnType": "double",
        "formulaMode": "active",
        "createable": false,
        "updateable": false
      },
      {
        "apiName": "TiDB_Cloud_Shortfall_Amount__c",
        "label": "TiDB Cloud - Shortfall Amount",
        "type": "formula",
        "formula": "IF(OR(TiDB_Cloud_Dedicated_Amount__c > 0, TiDB_Cloud_Serverless_Amount__c > 0, TiDB_Cloud_Support_Amount__c > 0, TiDB_Cloud_Essential_Amount_Raw__c > 0, TiDB_Cloud_Premium_Amount_Raw__c > 0), Amount__c - TiDB_Cloud_Dedicated_Amount__c - TiDB_Cloud_Serverless_Amount__c - TiDB_Cloud_Essential_Amount_Raw__c - TiDB_Cloud_Premium_Amount_Raw__c - TiDB_Cloud_Support_Amount__c, 0)",
        "returnType": "double",
        "formulaMode": "active",
        "createable": false,
        "updateable": false
      },
      {
        "apiName": "TiDB_Cloud_Support_Amount__c",
        "label": "TiDB Cloud - Support Amount",
        "type": "double"
      }
    ],
    "keyPrefix": "a0R"
  }
]
