[
  {
    "tableName": "_System_Object",
    "tableType": "system_metadata",
    "category": "metadata",
    "description": "Object metadata definitions",
    "requiredWritePermission": "ModifyMetadata",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ApiName",
        "label": "API Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true
      },
      {
        "name": "TableType",
        "label": "Table Type",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'custom_object'"
      },
      {
        "name": "Label",
        "label": "Label",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "PluralLabel",
        "label": "Plural Label",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "AppId",
        "label": "App",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "Icon",
        "label": "Icon",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "Description",
        "label": "Description",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "ThemeColor",
        "label": "Theme Color",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "IsCustom",
        "label": "Custom Object",
        "type": "TINYINT(1)",
        "default": "0"
      },
      {
        "name": "Searchable",
        "label": "Searchable",
        "type": "TINYINT(1)",
        "default": "1"
      },
      {
        "name": "SharingModel",
        "label": "Sharing Model",
        "type": "VARCHAR(255)",
        "default": "'Private'"
      },
      {
        "name": "IsCustomized",
        "label": "Is Customized",
        "type": "TINYINT(1)",
        "default": "0"
      },
      {
        "name": "EnableHierarchySharing",
        "label": "Enable Hierarchy Sharing",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": true
      },
      {
        "name": "RequiredWritePermission",
        "label": "Required Write Permission",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "RequiredReadPermission",
        "label": "Required Read Permission",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "AccessPolicy",
        "label": "Access Policy",
        "type": "JSON",
        "nullable": true
      },
      {
        "name": "DeleteMode",
        "label": "Delete Mode",
        "type": "VARCHAR(50)",
        "nullable": true
      },
      {
        "name": "PathField",
        "label": "Path Field",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "ListFields",
        "label": "List Fields",
        "type": "JSON",
        "nullable": true
      },
      {
        "name": "ChildCloneRules",
        "label": "Child Clone Rules",
        "type": "JSON",
        "nullable": true
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "OwnerId",
        "label": "Owner",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "CreatedById",
        "label": "Created By",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "LastModifiedById",
        "label": "Last Modified By",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "Iscustom"
        ]
      }
    ]
  },
  {
    "tableName": "_System_Field",
    "tableType": "system_metadata",
    "category": "metadata",
    "description": "Field metadata definitions",
    "requiredWritePermission": "ModifyMetadata",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ObjectId",
        "label": "Object",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "ApiName",
        "label": "API Name",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "Label",
        "label": "Label",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "PhysicalName",
        "label": "Physical Name",
        "type": "VARCHAR(255)",
        "nullable": true,
        "description": "Actual physical column name in the database if different from api_name (for aliasing)"
      },
      {
        "name": "Type",
        "label": "Type",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "Required",
        "label": "Required",
        "type": "TINYINT(1)",
        "default": "0"
      },
      {
        "name": "IsUnique",
        "label": "Unique",
        "type": "TINYINT(1)",
        "default": "0"
      },
      {
        "name": "IsSystem",
        "label": "System Field",
        "type": "TINYINT(1)",
        "default": "0"
      },
      {
        "name": "IsNameField",
        "label": "Name Field",
        "type": "TINYINT(1)",
        "default": "0"
      },
      {
        "name": "Createable",
        "label": "Createable",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "1"
      },
      {
        "name": "Updateable",
        "label": "Updateable",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "1"
      },
      {
        "name": "Indexed",
        "label": "Indexed",
        "type": "TINYINT(1)",
        "default": "0"
      },
      {
        "name": "Options",
        "label": "Options",
        "type": "JSON",
        "nullable": true
      },
      {
        "name": "ReferenceTo",
        "label": "Reference To",
        "type": "JSON",
        "nullable": true
      },
      {
        "name": "DeleteRule",
        "label": "Delete Rule",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "Formula",
        "label": "Formula",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "ReturnType",
        "label": "Return Type",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "FormulaMode",
        "label": "Formula Mode",
        "type": "VARCHAR(50)",
        "nullable": true,
        "description": "Formula computation mode: view (TiDB View read-time compute), frozen (use last synced SF value)"
      },
      {
        "name": "DefaultValue",
        "label": "Default Value",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "HelpText",
        "label": "Help Text",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "Description",
        "label": "Description",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "TrackHistory",
        "label": "Track History",
        "type": "TINYINT(1)",
        "default": "0"
      },
      {
        "name": "MinValue",
        "label": "Min Value",
        "type": "DECIMAL(18,4)",
        "nullable": true
      },
      {
        "name": "MaxValue",
        "label": "Max Value",
        "type": "DECIMAL(18,4)",
        "nullable": true
      },
      {
        "name": "MinLength",
        "label": "Min Length",
        "type": "INT",
        "nullable": true
      },
      {
        "name": "MaxLength",
        "label": "Max Length",
        "type": "INT",
        "nullable": true
      },
      {
        "name": "Regex",
        "label": "Regex Pattern",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "RegexMessage",
        "label": "Regex Message",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "Validator",
        "label": "Validator",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "ControllingField",
        "label": "Controlling Field",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "PicklistDependency",
        "label": "Picklist Dependency",
        "type": "JSON",
        "nullable": true
      },
      {
        "name": "RollupConfig",
        "label": "Rollup Config",
        "type": "JSON",
        "nullable": true
      },
      {
        "name": "IsMasterDetail",
        "label": "Master-Detail",
        "type": "TINYINT(1)",
        "default": "0"
      },
      {
        "name": "IsPolymorphic",
        "label": "Polymorphic",
        "type": "TINYINT(1)",
        "default": "0"
      },
      {
        "name": "RelationshipName",
        "label": "Relationship Name",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "OwnerId",
        "label": "Owner",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "CreatedById",
        "label": "Created By",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "LastModifiedById",
        "label": "Last Modified By",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "IsCustomized",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "label": "Is Customized",
        "description": "Set to 1 when an admin modifies this field via UI/API. Bootstrap will not overwrite customized fields."
      },
      {
        "name": "auto_number_format",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Auto Number Format",
        "description": "Autonumber Engine v2: display format string with tokens (e.g. 'Q-{YYYY}-{0000}'). PRD §4.3; raw VARCHAR(200) upgraded to 255 to match system_tables VARCHAR whitelist."
      },
      {
        "name": "auto_number_scope",
        "type": "VARCHAR(32)",
        "nullable": true,
        "label": "Auto Number Scope",
        "description": "Autonumber Engine v2: counter scope — 'global' or 'per_day'. PRD §4.3."
      },
      {
        "name": "auto_number_start",
        "type": "BIGINT",
        "nullable": true,
        "default": "1",
        "label": "Auto Number Start",
        "description": "Autonumber Engine v2: starting counter value. PRD §4.3."
      },
      {
        "name": "auto_number_token_refs",
        "type": "JSON",
        "nullable": true,
        "label": "Auto Number Token Refs",
        "description": "Autonumber Engine v2: canonicalized token reference array extracted from the format. PRD §4.3."
      },
      {
        "name": "auto_number_canonical_hash",
        "type": "VARCHAR(64)",
        "nullable": true,
        "label": "Auto Number Canonical Hash",
        "description": "Autonumber Engine v2: sha256 hex of canonicalized (format, scope, token_refs, start) — used for drift detection. PRD §4.3; raw CHAR(64) swapped to VARCHAR(64) to match system_tables VARCHAR whitelist."
      },
      {
        "name": "auto_number_counter_reset_policy",
        "type": "VARCHAR(32)",
        "nullable": true,
        "default": "'none'",
        "label": "Auto Number Counter Reset Policy",
        "description": "Autonumber Engine v2: counter reset policy — 'none' (default) or future policies. PRD §4.3."
      }
    ],
    "indices": [
      {
        "columns": [
          "ObjectId"
        ]
      },
      {
        "columns": [
          "Type"
        ]
      },
      {
        "columns": [
          "ObjectId",
          "ApiName"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "ObjectId",
        "references": "_System_Object(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_Table",
    "tableType": "system_core",
    "category": "registry",
    "description": "Meta-metadata registry cataloging all tables",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "TableName",
        "label": "Table Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true
      },
      {
        "name": "TableType",
        "label": "Table Type",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'custom_object'"
      },
      {
        "name": "Category",
        "label": "Category",
        "type": "VARCHAR(255)"
      },
      {
        "name": "Description",
        "label": "Description",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "IsManaged",
        "label": "Managed",
        "type": "TINYINT(1)",
        "default": "1"
      },
      {
        "name": "SchemaVersion",
        "label": "Schema Version",
        "type": "VARCHAR(255)",
        "default": "'1.0.0'"
      },
      {
        "name": "CreatedBy",
        "label": "Created By",
        "type": "VARCHAR(255)",
        "default": "'bootstrap'"
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "Tabletype"
        ]
      },
      {
        "columns": [
          "Category"
        ]
      },
      {
        "columns": [
          "Ismanaged"
        ]
      }
    ]
  },
  {
    "tableName": "Profile",
    "tableType": "system_core",
    "category": "auth",
    "description": "User profiles and permission sets",
    "requiredWritePermission": "ManageProfilesPermSets",
    "protectedRecords": {
      "guardField": "IsSystem",
      "policy": "reject_delete",
      "errorCode": "CANNOT_DELETE_PROTECTED_RECORD",
      "message": "Platform-managed Profile cannot be deleted"
    },
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "Name",
        "label": "Profile Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true
      },
      {
        "name": "Description",
        "label": "Description",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "IsActive",
        "label": "Active",
        "type": "TINYINT(1)",
        "default": "1"
      },
      {
        "name": "IsSystem",
        "label": "System Profile",
        "type": "TINYINT(1)",
        "default": "0"
      },
      {
        "name": "UserType",
        "label": "User License",
        "type": "VARCHAR(50)",
        "nullable": false,
        "default": "'Standard'"
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "OwnerId",
        "label": "Owner",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "CreatedById",
        "label": "Created By",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "LastModifiedById",
        "label": "Last Modified By",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ]
  },
  {
    "tableName": "AppMenuItem",
    "tableType": "system",
    "label": "App Menu Item",
    "description": "Navigation items for App Launcher",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "Label",
        "label": "Label",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "Description",
        "label": "Description",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "StartUrl",
        "label": "Start URL",
        "type": "VARCHAR(255)"
      },
      {
        "name": "Type",
        "label": "Type",
        "type": "VARCHAR(50)",
        "nullable": false
      },
      {
        "name": "IsVisible",
        "label": "Visible",
        "type": "TINYINT(1)",
        "default": "1"
      },
      {
        "name": "SortOrder",
        "label": "Sort Order",
        "type": "INT",
        "default": "0"
      },
      {
        "name": "AppId",
        "label": "App ID",
        "type": "VARCHAR(255)"
      },
      {
        "name": "Icon",
        "label": "Icon",
        "type": "VARCHAR(255)"
      },
      {
        "name": "Color",
        "label": "Color",
        "type": "VARCHAR(50)"
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ]
  },
  {
    "tableName": "UserRole",
    "tableType": "system_core",
    "category": "auth",
    "description": "Role hierarchy for access control",
    "requiredWritePermission": "ManageRoles",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "Name",
        "label": "Role Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true
      },
      {
        "name": "RollupDescription",
        "label": "Rollup Description",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "ParentRoleId",
        "label": "Parent Role",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "UserRole"
        ]
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "OwnerId",
        "label": "Owner",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ]
      },
      {
        "name": "CreatedById",
        "label": "Created By",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ]
      },
      {
        "name": "LastModifiedById",
        "label": "Last Modified By",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ]
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "Parentroleid"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "ParentRoleId",
        "references": "UserRole(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "User",
    "tableType": "system_core",
    "category": "auth",
    "description": "System users",
    "requiredWritePermission": "ManageUsers",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "Username",
        "label": "Username",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true,
        "isNameField": true
      },
      {
        "name": "Email",
        "label": "Email Address",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true,
        "isNameField": true
      },
      {
        "name": "Password",
        "label": "Password",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "password"
      },
      {
        "name": "FirstName",
        "label": "First Name",
        "type": "VARCHAR(255)"
      },
      {
        "name": "LastName",
        "label": "Last Name",
        "type": "VARCHAR(255)"
      },
      {
        "name": "Phone",
        "label": "Phone",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "ProfileId",
        "label": "Profile",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "Profile"
        ],
        "is_system": true,
        "default": "'standard_user'"
      },
      {
        "name": "UserRoleId",
        "label": "Role",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "UserRole"
        ],
        "is_system": true
      },
      {
        "name": "ManagerId",
        "label": "Manager",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ],
        "is_system": true
      },
      {
        "name": "Title",
        "label": "Title",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "Department",
        "label": "Department",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "Division",
        "label": "Division",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "Company",
        "label": "Company Name",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "MiddleName",
        "label": "Middle Name",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "Suffix",
        "label": "Suffix",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "Alias",
        "label": "Alias",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "CommunityNickname",
        "label": "Nickname",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "MobilePhone",
        "label": "Mobile",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "TimeZoneSidKey",
        "label": "Time Zone",
        "type": "VARCHAR(255)",
        "nullable": true,
        "default": "'America/Los_Angeles'"
      },
      {
        "name": "LocaleSidKey",
        "label": "Locale",
        "type": "VARCHAR(255)",
        "nullable": true,
        "default": "'en_US'"
      },
      {
        "name": "LanguageLocaleKey",
        "label": "Language",
        "type": "VARCHAR(255)",
        "nullable": true,
        "default": "'en_US'"
      },
      {
        "name": "EmailEncodingKey",
        "label": "Email Encoding",
        "type": "VARCHAR(255)",
        "nullable": true,
        "default": "'UTF-8'"
      },
      {
        "name": "CurrencyIsoCode",
        "label": "Currency",
        "type": "VARCHAR(255)",
        "nullable": true,
        "default": "'USD'"
      },
      {
        "name": "Street",
        "label": "Street",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "City",
        "label": "City",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "State",
        "label": "State/Province",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "PostalCode",
        "label": "Zip/Postal Code",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "Country",
        "label": "Country",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "IsActive",
        "label": "Active",
        "type": "TINYINT(1)",
        "default": "1",
        "is_system": true
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "OwnerId",
        "label": "Owner",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ]
      },
      {
        "name": "CreatedById",
        "label": "Created By",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ]
      },
      {
        "name": "LastModifiedById",
        "label": "Last Modified By",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ]
      },
      {
        "name": "FailedLoginAttempts",
        "label": "Failed Login Attempts",
        "type": "INT",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "LockedUntil",
        "label": "Locked Until",
        "type": "DATETIME",
        "nullable": true
      },
      {
        "name": "LastLoginDate",
        "label": "Last Login",
        "type": "DATETIME",
        "nullable": true
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "Profileid"
        ]
      },
      {
        "columns": [
          "Userroleid"
        ]
      },
      {
        "columns": [
          "Managerid"
        ]
      },
      {
        "columns": [
          "Department"
        ]
      },
      {
        "columns": [
          "Division"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "ProfileId",
        "references": "Profile(Id)"
      },
      {
        "column": "UserRoleId",
        "references": "UserRole(Id)",
        "onDelete": "SET NULL"
      },
      {
        "column": "ManagerId",
        "references": "User(Id)",
        "onDelete": "SET NULL"
      }
    ]
  },
  {
    "tableName": "_System_Session",
    "tableType": "system_core",
    "category": "auth",
    "description": "User authentication sessions",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "UserId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ],
        "label": "User Id"
      },
      {
        "name": "Token",
        "type": "string",
        "length": 750,
        "nullable": false,
        "unique": true,
        "label": "Token"
      },
      {
        "name": "ExpiresAt",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Expires At"
      },
      {
        "name": "LastActivity",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Activity"
      },
      {
        "name": "IpAddress",
        "type": "VARCHAR(255)",
        "label": "Ip Address"
      },
      {
        "name": "UserAgent",
        "type": "VARCHAR(255)",
        "label": "User Agent"
      },
      {
        "name": "IsRevoked",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Is Revoked"
      },
      {
        "name": "Scope",
        "type": "TEXT",
        "nullable": true,
        "label": "Scope"
      },
      {
        "name": "ConnectedAppId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Connected App Id"
      },
      {
        "name": "GrantType",
        "type": "VARCHAR(50)",
        "nullable": true,
        "label": "Grant Type"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "Userid"
        ]
      },
      {
        "columns": [
          "Expiresat"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "UserId",
        "references": "User(Id)",
        "onDelete": "CASCADE"
      }
    ],
    "requiredReadPermission": "BLOCKED"
  },
  {
    "tableName": "_System_RecordType",
    "tableType": "system_metadata",
    "category": "metadata",
    "description": "Record type configurations",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ObjectId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Object Id"
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Name"
      },
      {
        "name": "record_type_code",
        "type": "VARCHAR(50)",
        "nullable": true,
        "label": "Record Type Code",
        "description": "Autonumber Engine v2: short code used in autonumber format tokens (e.g. 'Q', 'INV'). PRD §4.5 + Q11 Approach α + v2 fixpack F7: NULL allowed on creation; V6 verify gate must check IS NOT NULL AND != '' before rollout to block empty-string bypass. Raw VARCHAR(16) upgraded to VARCHAR(50) to match system_tables VARCHAR whitelist."
      },
      {
        "name": "Description",
        "type": "TEXT",
        "label": "Description",
        "nullable": true
      },
      {
        "name": "IsActive",
        "type": "TINYINT(1)",
        "default": "1",
        "label": "Is Active"
      },
      {
        "name": "IsMaster",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Is Master"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "label": "Is Deleted"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "ObjectId"
        ]
      },
      {
        "columns": [
          "ObjectId",
          "Name"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "ObjectId",
        "references": "_System_Object(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_AutoNumberCounter",
    "tableType": "system_metadata",
    "category": "metadata",
    "label": "Auto Number Counter",
    "description": "Autonumber Engine v2 counter table. PRD §4.4. Per-(field_id, scope_key) monotonic sequence — scope_key is '' for global scope, 'YYYY-MM-DD' for per_day scope, or the rendered non-counter format prefix for per_prefix scope. Follows the established _System_AutoNumber pattern: synthetic Id PK + UNIQUE (FieldId, ScopeKey). VARCHAR widths align with the system_tables VARCHAR whitelist.",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "FieldId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Field Id",
        "description": "References _System_Field.Id."
      },
      {
        "name": "ScopeKey",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "''",
        "label": "Scope Key",
        "description": "'' for global scope, 'YYYY-MM-DD' for per_day scope, or the rendered non-counter format prefix for per_prefix scope (e.g. 'JP-QT-260418-', 'IBG-B-20260418-'). VARCHAR(255) accommodates per_prefix keys which can include country codes, RecordType codes, and date components; widened from VARCHAR(50) when per_prefix scope was added (pre-cutover, fixing Codex adversarial finding)."
      },
      {
        "name": "NextValue",
        "type": "BIGINT",
        "nullable": false,
        "default": "1",
        "label": "Next Value"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "FieldId",
          "ScopeKey"
        ],
        "unique": true
      },
      {
        "columns": [
          "FieldId"
        ]
      }
    ]
  },
  {
    "tableName": "_System_Relationship",
    "tableType": "system_metadata",
    "category": "metadata",
    "description": "Object relationship definitions",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ChildObjectApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Child Object Api Name"
      },
      {
        "name": "ParentObjectApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Parent Object Api Name"
      },
      {
        "name": "FieldApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Field Api Name"
      },
      {
        "name": "RelationshipName",
        "type": "VARCHAR(255)",
        "label": "Relationship Name"
      },
      {
        "name": "RelationshipType",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'reference'",
        "label": "Relationship Type"
      },
      {
        "name": "IsSharingParent",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Is Sharing Parent"
      },
      {
        "name": "CascadeDelete",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Cascade Delete"
      },
      {
        "name": "RestrictedDelete",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Restricted Delete"
      },
      {
        "name": "RelatedListLabel",
        "type": "VARCHAR(255)",
        "label": "Related List Label"
      },
      {
        "name": "RelatedListFields",
        "type": "TEXT",
        "label": "Related List Fields"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "Childobjectapiname"
        ]
      },
      {
        "columns": [
          "Parentobjectapiname"
        ]
      },
      {
        "columns": [
          "Fieldapiname"
        ]
      }
    ]
  },
  {
    "tableName": "_System_FieldDependency",
    "tableType": "system_metadata",
    "category": "metadata",
    "description": "Field dependency rules",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ControllingFieldId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Controlling Field Id"
      },
      {
        "name": "DependentFieldId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Dependent Field Id"
      },
      {
        "name": "ControllingValue",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Controlling Value"
      },
      {
        "name": "DependentValues",
        "type": "JSON",
        "label": "Dependent Values"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "Controllingfieldid"
        ]
      },
      {
        "columns": [
          "Dependentfieldid"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "ControllingFieldId",
        "references": "_System_Field(Id)",
        "onDelete": "CASCADE"
      },
      {
        "column": "DependentFieldId",
        "references": "_System_Field(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_App",
    "tableType": "system_metadata",
    "category": "ui",
    "description": "Application configurations",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true,
        "label": "Name"
      },
      {
        "name": "Label",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Label"
      },
      {
        "name": "Description",
        "type": "TEXT",
        "label": "Description",
        "nullable": true
      },
      {
        "name": "NamespacePrefix",
        "label": "Namespace Prefix",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "Icon",
        "type": "VARCHAR(255)",
        "label": "Icon"
      },
      {
        "name": "Color",
        "type": "VARCHAR(255)",
        "label": "Color"
      },
      {
        "name": "NavigationItems",
        "type": "JSON",
        "label": "Navigation Items"
      },
      {
        "name": "UtilityItems",
        "type": "JSON",
        "label": "Utility Items"
      },
      {
        "name": "AssignedProfiles",
        "type": "JSON",
        "label": "Assigned Profiles"
      },
      {
        "name": "IsDefault",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Is Default"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ]
  },
  {
    "tableName": "_System_Theme",
    "tableType": "system_metadata",
    "category": "ui",
    "description": "Visual theme configurations",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true,
        "label": "Name"
      },
      {
        "name": "IsActive",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Is Active"
      },
      {
        "name": "Colors",
        "type": "JSON",
        "nullable": false,
        "label": "Colors"
      },
      {
        "name": "Density",
        "type": "VARCHAR(255)",
        "default": "'comfortable'",
        "label": "Density"
      },
      {
        "name": "LogoUrl",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Logo Url"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ]
  },
  {
    "tableName": "_System_BulkJob",
    "tableType": "system_core",
    "category": "integration",
    "description": "Salesforce Bulk API v2 Job",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "Object",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Object"
      },
      {
        "name": "Operation",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Operation"
      },
      {
        "name": "State",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'Open'",
        "label": "State"
      },
      {
        "name": "ConcurrencyMode",
        "type": "VARCHAR(255)",
        "default": "'Parallel'",
        "label": "Concurrency Mode"
      },
      {
        "name": "ErrorMessage",
        "type": "TEXT",
        "nullable": true,
        "label": "Error Message"
      },
      {
        "name": "TotalProcessingTime",
        "type": "BIGINT",
        "default": "0",
        "label": "Total Processing Time"
      },
      {
        "name": "ApiActiveProcessingTime",
        "type": "BIGINT",
        "default": "0",
        "label": "Api Active Processing Time"
      },
      {
        "name": "ApexProcessingTime",
        "type": "BIGINT",
        "default": "0",
        "label": "Apex Processing Time"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Created By Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      },
      {
        "name": "JobType",
        "type": "VARCHAR(255)",
        "nullable": true,
        "comment": "Job type: V2Query for query jobs",
        "label": "Job Type"
      },
      {
        "name": "ContentUrl",
        "type": "TEXT",
        "nullable": true,
        "comment": "Stores SOQL query for query jobs",
        "label": "Content Url"
      },
      {
        "name": "IsDeleted",
        "type": "BOOLEAN",
        "default": "0",
        "label": "Is Deleted"
      }
    ],
    "indices": [
      {
        "columns": [
          "State"
        ]
      },
      {
        "columns": [
          "Object"
        ]
      }
    ]
  },
  {
    "tableName": "_System_BulkBatch",
    "tableType": "system_core",
    "category": "integration",
    "description": "Internal batch tracking for Bulk API Jobs",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "JobId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Job Id"
      },
      {
        "name": "State",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'Queued'",
        "label": "State"
      },
      {
        "name": "RecordsProcessed",
        "type": "INT",
        "default": "0",
        "label": "Records Processed"
      },
      {
        "name": "RecordsFailed",
        "type": "INT",
        "default": "0",
        "label": "Records Failed"
      },
      {
        "name": "TotalRecords",
        "type": "INT",
        "default": "0",
        "label": "Total Records"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "Jobid"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "JobId",
        "references": "_System_BulkJob(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "push_topic",
    "tableType": "system_core",
    "category": "integration",
    "description": "Salesforce Streaming API PushTopic",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true,
        "label": "Name"
      },
      {
        "name": "Query",
        "type": "TEXT",
        "nullable": false,
        "label": "Query"
      },
      {
        "name": "ApiVersion",
        "type": "DECIMAL(10,1)",
        "default": "60.0",
        "label": "Api Version"
      },
      {
        "name": "NotifyForFields",
        "type": "VARCHAR(255)",
        "default": "'Referenced'",
        "label": "Notify For Fields"
      },
      {
        "name": "NotifyForOperationCreate",
        "type": "BOOLEAN",
        "default": "true",
        "label": "Notify For Operation Create"
      },
      {
        "name": "NotifyForOperationUpdate",
        "type": "BOOLEAN",
        "default": "true",
        "label": "Notify For Operation Update"
      },
      {
        "name": "NotifyForOperationDelete",
        "type": "BOOLEAN",
        "default": "true",
        "label": "Notify For Operation Delete"
      },
      {
        "name": "NotifyForOperationUndelete",
        "type": "BOOLEAN",
        "default": "true",
        "label": "Notify For Operation Undelete"
      },
      {
        "name": "IsActive",
        "type": "BOOLEAN",
        "default": "true",
        "label": "Is Active"
      },
      {
        "name": "Description",
        "type": "TEXT",
        "nullable": true,
        "label": "Description"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Created By Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      },
      {
        "name": "IsDeleted",
        "type": "BOOLEAN",
        "default": "0",
        "label": "Is Deleted"
      }
    ],
    "indices": [
      {
        "columns": [
          "Name"
        ]
      },
      {
        "columns": [
          "Isactive"
        ]
      }
    ]
  },
  {
    "tableName": "_System_Log",
    "tableType": "system_core",
    "category": "audit",
    "description": "System event logs",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "Timestamp",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Timestamp"
      },
      {
        "name": "Level",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Level"
      },
      {
        "name": "Source",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Source"
      },
      {
        "name": "Message",
        "type": "TEXT",
        "label": "Message"
      },
      {
        "name": "Details",
        "type": "TEXT",
        "nullable": true,
        "label": "Details"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "Timestamp"
        ]
      },
      {
        "columns": [
          "Level"
        ]
      }
    ]
  },
  {
    "tableName": "_System_Recent",
    "tableType": "system_metadata",
    "category": "ui",
    "description": "Recently viewed records",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "UserId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "User Id"
      },
      {
        "name": "ObjectApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Object Api Name"
      },
      {
        "name": "RecordId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Record Id"
      },
      {
        "name": "RecordName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Record Name"
      },
      {
        "name": "Timestamp",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Timestamp"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "Userid"
        ]
      },
      {
        "columns": [
          "Userid",
          "Timestamp"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "UserId",
        "references": "User(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_Config",
    "tableType": "system_core",
    "category": "config",
    "description": "System configuration settings",
    "columns": [
      {
        "name": "KeyName",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Key Name"
      },
      {
        "name": "Value",
        "type": "TEXT",
        "label": "Value"
      },
      {
        "name": "IsSecret",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Is Secret"
      },
      {
        "name": "Description",
        "type": "TEXT",
        "label": "Description",
        "nullable": true
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "requiredReadPermission": "ViewSetup"
  },
  {
    "tableName": "_System_ValidationRule",
    "tableType": "system_metadata",
    "category": "business_logic",
    "description": "Validation rule definitions",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ObjectApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Object Api Name"
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Name"
      },
      {
        "name": "Description",
        "type": "TEXT",
        "label": "Description",
        "nullable": true
      },
      {
        "name": "Active",
        "type": "TINYINT(1)",
        "default": "1",
        "label": "Active"
      },
      {
        "name": "Condition",
        "type": "TEXT",
        "nullable": false,
        "label": "Condition"
      },
      {
        "name": "ErrorMessage",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Error Message"
      },
      {
        "name": "ErrorDisplayField",
        "type": "VARCHAR(255)",
        "label": "Error Display Field",
        "nullable": true
      },
      {
        "name": "IsCustomized",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "1",
        "label": "Is Customized"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "Objectapiname"
        ]
      },
      {
        "columns": [
          "Objectapiname",
          "Name"
        ],
        "unique": true
      }
    ]
  },
  {
    "tableName": "_System_PageLayout",
    "tableType": "system_metadata",
    "category": "ui",
    "description": "UI Page Layout definitions",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ObjectApiName",
        "label": "Object",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "LayoutName",
        "label": "Layout Name",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "Type",
        "label": "Type",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "IsDefault",
        "label": "Default",
        "type": "TINYINT(1)",
        "default": "0"
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "Config",
        "label": "JSON Configuration",
        "type": "JSON",
        "nullable": false
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "IsCustomized",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "label": "Is Customized",
        "description": "DEPRECATED \u2014 kept for backward compatibility. Use Source column instead."
      },
      {
        "name": "LayoutVersion",
        "type": "INT",
        "nullable": false,
        "default": "0",
        "label": "Layout Version",
        "description": "DEPRECATED \u2014 kept for backward compatibility. Use GenerationVersion column instead."
      },
      {
        "name": "Source",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'auto_generated'",
        "label": "Source",
        "description": "Origin of this layout: auto_generated, admin_created, cloned, curated. Controls whether auto-regeneration applies."
      },
      {
        "name": "GenerationVersion",
        "type": "INT",
        "nullable": false,
        "default": "0",
        "label": "Generation Version",
        "description": "Algorithm version that produced this layout. Only meaningful when Source=auto_generated."
      }
    ],
    "indices": [
      {
        "columns": [
          "Objectapiname"
        ]
      },
      {
        "columns": [
          "Objectapiname",
          "Layoutname"
        ],
        "unique": true
      }
    ]
  },
  {
    "tableName": "_System_ApprovalPageLayout",
    "tableType": "system_metadata",
    "category": "ui",
    "description": "UI Page Layout definitions for approval processes - allows admins to customize which fields appear on the approval response page",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ObjectApiName",
        "label": "Object",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "LayoutName",
        "label": "Layout Name",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "Type",
        "label": "Type",
        "type": "VARCHAR(255)",
        "nullable": true,
        "default": "'approval_response'"
      },
      {
        "name": "IsDefault",
        "label": "Default",
        "type": "TINYINT(1)",
        "default": "0"
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "Config",
        "label": "JSON Configuration",
        "type": "JSON",
        "nullable": false
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "IsCustomized",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "label": "Is Customized",
        "description": "DEPRECATED — kept for backward compatibility. Use Source column instead."
      },
      {
        "name": "LayoutVersion",
        "type": "INT",
        "nullable": false,
        "default": "0",
        "label": "Layout Version",
        "description": "DEPRECATED — kept for backward compatibility. Use GenerationVersion column instead."
      },
      {
        "name": "Source",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'auto_generated'",
        "label": "Source",
        "description": "Origin of this layout: auto_generated, admin_created, cloned, curated. Controls whether auto-regeneration applies."
      },
      {
        "name": "GenerationVersion",
        "type": "INT",
        "nullable": false,
        "default": "0",
        "label": "Generation Version",
        "description": "Algorithm version that produced this layout. Only meaningful when Source=auto_generated."
      }
    ],
    "indices": [
      {
        "columns": [
          "Objectapiname"
        ]
      },
      {
        "columns": [
          "Objectapiname",
          "Layoutname"
        ],
        "unique": true
      }
    ]
  },
  {
    "tableName": "ReportFolder",
    "tableType": "system_metadata",
    "category": "analytics",
    "description": "Folders for organizing reports and dashboards (Salesforce Analytics Folders API)",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Folder Name"
      },
      {
        "name": "DeveloperName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true,
        "label": "Unique Name"
      },
      {
        "name": "Description",
        "type": "TEXT",
        "nullable": true,
        "label": "Description"
      },
      {
        "name": "Type",
        "type": "VARCHAR(50)",
        "nullable": false,
        "default": "'Report'",
        "label": "Folder Type"
      },
      {
        "name": "AccessType",
        "type": "VARCHAR(50)",
        "nullable": false,
        "default": "'Shared'",
        "label": "Access Type"
      },
      {
        "name": "ParentId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Parent Folder"
      },
      {
        "name": "OwnerId",
        "label": "Owner ID",
        "type": "VARCHAR(255)",
        "nullable": true,
        "comment": "Folder owner — defaults to CreatedById, mutable for ownership transfer"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Created By Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Last Modified By Id"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "label": "Deleted"
      }
    ],
    "indices": [
      {
        "columns": [
          "Type"
        ]
      },
      {
        "columns": [
          "ParentId"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "ParentId",
        "references": "ReportFolder(Id)",
        "onDelete": "SET NULL"
      }
    ]
  },
  {
    "tableName": "FolderShare",
    "tableType": "system_metadata",
    "category": "analytics",
    "description": "Folder sharing permissions (Salesforce Analytics Folders API)",
    "requiredWritePermission": "ManageSharing",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "FolderId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Folder"
      },
      {
        "name": "SharedToId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Shared To"
      },
      {
        "name": "SharedToType",
        "type": "VARCHAR(50)",
        "nullable": false,
        "default": "'User'",
        "label": "Share Type"
      },
      {
        "name": "AccessLevel",
        "type": "VARCHAR(50)",
        "nullable": false,
        "default": "'View'",
        "label": "Access Level"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Created By Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "FolderId"
        ]
      },
      {
        "columns": [
          "SharedToId"
        ]
      },
      {
        "columns": [
          "FolderId",
          "SharedToId",
          "AccessLevel"
        ],
        "comment": "Composite index for FolderAccessService.VisibleFolderIDs single-query lookup"
      }
    ],
    "foreignKeys": [
      {
        "column": "FolderId",
        "references": "ReportFolder(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "Report",
    "tableType": "system_metadata",
    "category": "analytics",
    "description": "Report definitions",
    "requiredWritePermission": "CreateCustomizeReports",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "FolderId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Folder",
        "logicalType": "reference",
        "referenceTo": [
          "ReportFolder"
        ]
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Report Name"
      },
      {
        "name": "DeveloperName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true,
        "label": "Unique Name"
      },
      {
        "name": "Description",
        "type": "TEXT",
        "nullable": true,
        "label": "Description"
      },
      {
        "name": "SourceObject",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Primary Object"
      },
      {
        "name": "ReportType",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'tabular'",
        "label": "Report Type"
      },
      {
        "name": "Columns",
        "type": "JSON",
        "nullable": true,
        "label": "Columns"
      },
      {
        "name": "Filters",
        "type": "JSON",
        "nullable": true,
        "label": "Filters"
      },
      {
        "name": "StandardDateFilter",
        "type": "JSON",
        "nullable": true,
        "label": "Standard Date Filter"
      },
      {
        "name": "Grouping",
        "type": "JSON",
        "nullable": true,
        "label": "Grouping"
      },
      {
        "name": "Aggregates",
        "type": "JSON",
        "nullable": true,
        "label": "Aggregates"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Created By Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Last Modified By Id"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Is Deleted"
      },
      {
        "name": "Scope",
        "type": "VARCHAR(50)",
        "nullable": true,
        "label": "Show Me Scope",
        "description": "Report show-me filter scope: all, mine, myTeam (or legacy SF values)"
      },
      {
        "name": "BooleanFilter",
        "type": "TEXT",
        "nullable": true,
        "label": "Boolean Filter",
        "description": "SF-style numbered boolean expression combining Filters (e.g. \"1 OR 2 OR 3\", \"1 AND (2 OR 3)\"). Empty means AND all filters."
      }
    ],
    "indices": [
      {
        "columns": [
          "Folderid"
        ]
      },
      {
        "columns": [
          "Sourceobject"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "FolderId",
        "references": "ReportFolder(Id)",
        "onDelete": "SET NULL"
      }
    ]
  },
  {
    "tableName": "_System_Action",
    "tableType": "system_metadata",
    "category": "ui",
    "description": "UI action definitions",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ObjectApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Object Api Name"
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Name"
      },
      {
        "name": "Label",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Label"
      },
      {
        "name": "Type",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Type"
      },
      {
        "name": "Icon",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Icon"
      },
      {
        "name": "TargetObject",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Target Object"
      },
      {
        "name": "Config",
        "type": "JSON",
        "nullable": true,
        "label": "Config"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      },
      {
        "name": "IsDeleted",
        "type": "BOOLEAN",
        "default": "0",
        "label": "Is Deleted"
      }
    ],
    "indices": [
      {
        "columns": [
          "Objectapiname"
        ]
      },
      {
        "columns": [
          "Objectapiname",
          "Name"
        ],
        "unique": true
      }
    ]
  },
  {
    "tableName": "_System_ListView",
    "tableType": "system_metadata",
    "category": "ui",
    "description": "List view configurations",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ObjectApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Object Api Name"
      },
      {
        "name": "Label",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Label"
      },
      {
        "name": "FilterExpr",
        "type": "TEXT",
        "nullable": true,
        "label": "Filter Expr"
      },
      {
        "name": "Fields",
        "type": "JSON",
        "nullable": false,
        "label": "Fields"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "Objectapiname"
        ]
      }
    ]
  },
  {
    "tableName": "SharingRule",
    "tableType": "system_metadata",
    "category": "auth",
    "description": "Record sharing rules",
    "requiredWritePermission": "ManageSharing",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ObjectApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Object Api Name"
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Name"
      },
      {
        "name": "Criteria",
        "type": "TEXT",
        "label": "Criteria"
      },
      {
        "name": "AccessLevel",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Access Level"
      },
      {
        "name": "SharedFromRoleId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Shared From Role Id"
      },
      {
        "name": "SharedFromGroupId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Shared From Group Id"
      },
      {
        "name": "ShareWithRoleId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Share With Role Id"
      },
      {
        "name": "ShareWithGroupId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Share With Group Id"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "label": "Is Deleted"
      },
      {
        "name": "OwnerId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Owner Id"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Created By Id"
      },
      {
        "name": "LastModifiedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Last Modified By Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "Objectapiname"
        ]
      },
      {
        "name": "idx_sharingrule_shared_from_role_id",
        "columns": [
          "Sharedfromroleid"
        ]
      },
      {
        "name": "idx_sharingrule_shared_from_group_id",
        "columns": [
          "Sharedfromgroupid"
        ]
      },
      {
        "name": "idx_sharingrule_share_with_role_id",
        "columns": [
          "Sharewithroleid"
        ]
      },
      {
        "name": "idx_sharingrule_share_with_group_id",
        "columns": [
          "Sharewithgroupid"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "SharedFromRoleId",
        "references": "UserRole(Id)",
        "onDelete": "CASCADE"
      },
      {
        "column": "SharedFromGroupId",
        "references": "Group(Id)",
        "onDelete": "CASCADE"
      },
      {
        "column": "ShareWithRoleId",
        "references": "UserRole(Id)",
        "onDelete": "CASCADE"
      },
      {
        "column": "ShareWithGroupId",
        "references": "Group(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_RecycleBin",
    "tableType": "system_core",
    "category": "data",
    "description": "Recycle bin for soft-deleted records",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "RecordId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Record Id"
      },
      {
        "name": "ObjectApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Object Api Name"
      },
      {
        "name": "RecordName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Record Name"
      },
      {
        "name": "DeletedBy",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ],
        "label": "Deleted By"
      },
      {
        "name": "DeletedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Deleted Date"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "Objectapiname"
        ]
      },
      {
        "columns": [
          "Deleteddate"
        ]
      }
    ]
  },
  {
    "tableName": "ProfileLayout",
    "tableType": "system_metadata",
    "category": "ui",
    "description": "Profile to layout assignments",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ProfileId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Profile Id"
      },
      {
        "name": "ObjectApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Object Api Name"
      },
      {
        "name": "LayoutId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Layout Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "Profileid",
          "Objectapiname"
        ],
        "unique": true
      },
      {
        "name": "idx_profilelayout_layout_id",
        "columns": [
          "Layoutid"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "ProfileId",
        "references": "Profile(Id)",
        "onDelete": "CASCADE"
      },
      {
        "column": "LayoutId",
        "references": "_System_PageLayout(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_SetupPage",
    "tableType": "system_metadata",
    "category": "ui",
    "description": "Setup page definitions",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "Label",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Label"
      },
      {
        "name": "Icon",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Icon"
      },
      {
        "name": "ComponentName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Component Name"
      },
      {
        "name": "Category",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Category"
      },
      {
        "name": "PageOrder",
        "type": "INT",
        "default": "99",
        "label": "Page Order"
      },
      {
        "name": "PermissionRequired",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Permission Required"
      },
      {
        "name": "IsEnabled",
        "type": "BOOLEAN",
        "default": "true",
        "label": "Is Enabled"
      },
      {
        "name": "Description",
        "type": "TEXT",
        "nullable": true,
        "label": "Description"
      },
      {
        "name": "Path",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Path"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "Category"
        ]
      },
      {
        "columns": [
          "Componentname"
        ],
        "unique": true
      }
    ]
  },
  {
    "tableName": "ObjectPermissions",
    "tableType": "system_core",
    "category": "auth",
    "description": "Object permissions for profiles",
    "requiredWritePermission": "ManageProfilesPermSets",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ParentId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "description": "Reference to Profile or PermissionSet (Salesforce wire-compatible)",
        "label": "Parent Id"
      },
      {
        "name": "SobjectType",
        "type": "VARCHAR(255)",
        "nullable": false,
        "description": "API name of the object",
        "label": "Sobject Type"
      },
      {
        "name": "PermissionsRead",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Permissions Read"
      },
      {
        "name": "PermissionsCreate",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Permissions Create"
      },
      {
        "name": "PermissionsEdit",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Permissions Edit"
      },
      {
        "name": "PermissionsDelete",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Permissions Delete"
      },
      {
        "name": "PermissionsViewAllRecords",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Permissions View All Records"
      },
      {
        "name": "PermissionsModifyAllRecords",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Permissions Modify All Records"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "label": "Is Deleted"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "ParentId",
          "SobjectType"
        ],
        "unique": true
      }
    ],
    "foreignKeys": []
  },
  {
    "tableName": "FieldPermissions",
    "tableType": "system_core",
    "category": "auth",
    "description": "Field permissions for profiles",
    "requiredWritePermission": "ManageProfilesPermSets",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ParentId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "description": "Reference to Profile or PermissionSet (Salesforce wire-compatible)",
        "label": "Parent Id"
      },
      {
        "name": "SobjectType",
        "type": "VARCHAR(255)",
        "nullable": false,
        "description": "API name of the object",
        "label": "Sobject Type"
      },
      {
        "name": "Field",
        "type": "VARCHAR(255)",
        "nullable": false,
        "description": "API name of the field (Salesforce format: ObjectName.FieldName)",
        "label": "Field"
      },
      {
        "name": "PermissionsRead",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Permissions Read"
      },
      {
        "name": "PermissionsEdit",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Permissions Edit"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "label": "Is Deleted"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "ParentId",
          "SobjectType",
          "Field"
        ],
        "unique": true
      }
    ],
    "foreignKeys": []
  },
  {
    "tableName": "_System_Comment",
    "tableType": "system_core",
    "category": "data",
    "description": "User comments on records",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ObjectApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Object Api Name"
      },
      {
        "name": "RecordId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Record Id"
      },
      {
        "name": "Body",
        "type": "TEXT",
        "nullable": false,
        "label": "Body"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Created By Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Is Deleted"
      },
      {
        "name": "ParentCommentId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Parent Comment Id"
      },
      {
        "name": "IsResolved",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Is Resolved"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "Objectapiname",
          "Recordid"
        ]
      },
      {
        "columns": [
          "CreatedById"
        ]
      },
      {
        "columns": [
          "Parentcommentid"
        ]
      }
    ]
  },
  {
    "tableName": "_System_AuditLog",
    "tableType": "system_core",
    "category": "audit",
    "description": "Field history tracking",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ObjectApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Object Api Name"
      },
      {
        "name": "RecordId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Record Id"
      },
      {
        "name": "FieldName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Field Name"
      },
      {
        "name": "OldValue",
        "type": "LONGTEXT",
        "nullable": true,
        "label": "Old Value"
      },
      {
        "name": "NewValue",
        "type": "LONGTEXT",
        "nullable": true,
        "label": "New Value"
      },
      {
        "name": "ChangedById",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Changed By Id"
      },
      {
        "name": "ChangedAt",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Changed At"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      },
      {
        "name": "Entrypoint",
        "type": "VARCHAR(32)",
        "nullable": true,
        "label": "Entrypoint"
      },
      {
        "name": "Action",
        "type": "VARCHAR(32)",
        "nullable": true,
        "label": "Action"
      },
      {
        "name": "ChangesJSON",
        "type": "LONGTEXT",
        "nullable": true,
        "label": "Changes JSON"
      },
      {
        "name": "TraceId",
        "type": "CHAR(32)",
        "nullable": true,
        "label": "Trace Id"
      },
      {
        "name": "ClientIp",
        "type": "VARCHAR(45)",
        "nullable": true,
        "label": "Client Ip"
      },
      {
        "name": "SessionId",
        "type": "VARCHAR(64)",
        "nullable": true,
        "label": "Session Id"
      },
      {
        "name": "OutboxRowId",
        "type": "BIGINT",
        "nullable": true,
        "label": "Outbox Row Id"
      },
      {
        "name": "EntrypointDetail",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Entrypoint Detail"
      },
      {
        "name": "RequestId",
        "type": "VARCHAR(64)",
        "nullable": true,
        "label": "Request Id"
      },
      {
        "name": "ParentRequestId",
        "type": "VARCHAR(64)",
        "nullable": true,
        "label": "Parent Request Id"
      },
      {
        "name": "ActualUserId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Actual User Id"
      },
      {
        "name": "UserAgent",
        "type": "VARCHAR(512)",
        "nullable": true,
        "label": "User Agent"
      },
      {
        "name": "Outcome",
        "type": "VARCHAR(16)",
        "nullable": true,
        "label": "Outcome"
      },
      {
        "name": "ErrorCode",
        "type": "VARCHAR(64)",
        "nullable": true,
        "label": "Error Code"
      }
    ],
    "indices": [
      {
        "columns": [
          "Objectapiname",
          "Recordid"
        ]
      },
      {
        "columns": [
          "Changedat"
        ]
      },
      {
        "name": "uk_outbox",
        "columns": [
          "OutboxRowId",
          "FieldName",
          "ChangedAt"
        ],
        "unique": true
      }
    ]
  },
  {
    "tableName": "_System_AuditOutbox",
    "tableType": "system_core",
    "category": "audit",
    "label": "Audit Outbox",
    "description": "Async audit field-diff fan-out queue. Sync path writes a header row to _System_AuditLog + a payload row here inside the business txn; a background worker expands Payload into N field-level _System_AuditLog rows (design doc §2.4). No consumers in C2 — outbox writer lands in C5, worker in C6.",
    "columns": [
      {
        "name": "Id",
        "type": "BIGINT",
        "primaryKey": true,
        "autoIncrement": true,
        "label": "Id"
      },
      {
        "name": "Payload",
        "type": "JSON",
        "nullable": false,
        "label": "Payload"
      },
      {
        "name": "EnqueuedAt",
        "type": "DATETIME(6)",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP(6)",
        "label": "Enqueued At"
      },
      {
        "name": "ProcessedAt",
        "type": "DATETIME(6)",
        "nullable": true,
        "label": "Processed At"
      },
      {
        "name": "Attempts",
        "type": "INT",
        "nullable": false,
        "default": "0",
        "label": "Attempts"
      },
      {
        "name": "LeaseHolderId",
        "type": "VARCHAR(64)",
        "nullable": true,
        "label": "Lease Holder Id"
      },
      {
        "name": "LeaseExpiresAt",
        "type": "DATETIME(6)",
        "nullable": true,
        "label": "Lease Expires At"
      },
      {
        "name": "LastError",
        "type": "VARCHAR(1024)",
        "nullable": true,
        "label": "Last Error"
      },
      {
        "name": "PoisonClass",
        "type": "VARCHAR(32)",
        "nullable": true,
        "label": "Poison Class"
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "ProcessedAt",
          "PoisonClass",
          "EnqueuedAt"
        ]
      },
      {
        "columns": [
          "LeaseHolderId",
          "LeaseExpiresAt"
        ]
      }
    ]
  },
  {
    "tableName": "_System_RequestCapture",
    "tableType": "system_core",
    "category": "audit",
    "label": "Request Capture",
    "description": "Replay/capture of inbound HTTP requests for behavior-equivalence validation (design §14.2). Joined to _System_AuditLog by RequestId. Bodies are always scrubbed per §14.3 before insert (no raw PII stored). No middleware writer in C13 — capture middleware lands in C14; default-off response-body capture is Phase 2C. §14.2 specifies LONGBLOB + composite PK + partitioning; C13 ships LONGTEXT + single-column PK (RequestId is a UUID) as a pragmatic subset matching the current DDL validator. Binary-body handling per §14.3 already substitutes a text sentinel, so LONGTEXT does not lose information.",
    "columns": [
      {
        "name": "RequestId",
        "type": "VARCHAR(64)",
        "primaryKey": true,
        "nullable": false,
        "label": "Request Id"
      },
      {
        "name": "ReceivedAt",
        "type": "DATETIME(6)",
        "nullable": false,
        "label": "Received At"
      },
      {
        "name": "Method",
        "type": "VARCHAR(10)",
        "nullable": false,
        "label": "HTTP Method"
      },
      {
        "name": "Path",
        "type": "VARCHAR(512)",
        "nullable": false,
        "label": "Path"
      },
      {
        "name": "Query",
        "type": "LONGTEXT",
        "nullable": true,
        "label": "Query String"
      },
      {
        "name": "Headers",
        "type": "JSON",
        "nullable": true,
        "label": "Headers (scrubbed)"
      },
      {
        "name": "Body",
        "type": "LONGTEXT",
        "nullable": true,
        "label": "Request Body (scrubbed)"
      },
      {
        "name": "BodySize",
        "type": "INT",
        "nullable": false,
        "default": "0",
        "label": "Body Size (raw, pre-scrub)"
      },
      {
        "name": "BodyTruncated",
        "type": "BOOLEAN",
        "nullable": false,
        "default": "FALSE",
        "label": "Body Truncated"
      },
      {
        "name": "ResponseStatus",
        "type": "INT",
        "nullable": false,
        "default": "0",
        "label": "Response Status"
      },
      {
        "name": "ResponseBody",
        "type": "LONGTEXT",
        "nullable": true,
        "label": "Response Body (default-off, §14.4)"
      },
      {
        "name": "UserId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "User Id"
      },
      {
        "name": "SessionId",
        "type": "VARCHAR(64)",
        "nullable": true,
        "label": "Session Id"
      },
      {
        "name": "ClientIp",
        "type": "VARCHAR(45)",
        "nullable": true,
        "label": "Client Ip"
      },
      {
        "name": "Entrypoint",
        "type": "VARCHAR(32)",
        "nullable": false,
        "default": "'REST_API'",
        "label": "Entrypoint"
      },
      {
        "name": "LatencyMs",
        "type": "INT",
        "nullable": false,
        "default": "0",
        "label": "Latency Ms"
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "name": "idx_time",
        "columns": [
          "ReceivedAt"
        ]
      },
      {
        "name": "idx_user",
        "columns": [
          "UserId",
          "ReceivedAt"
        ]
      },
      {
        "name": "idx_path",
        "columns": [
          "Path",
          "ReceivedAt"
        ]
      }
    ]
  },
  {
    "tableName": "_System_SystemLog",
    "tableType": "system_core",
    "category": "utility",
    "description": "System operation logs",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "Timestamp",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Timestamp"
      },
      {
        "name": "Level",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Level"
      },
      {
        "name": "Source",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Source"
      },
      {
        "name": "Message",
        "type": "TEXT",
        "nullable": false,
        "label": "Message"
      },
      {
        "name": "Details",
        "type": "TEXT",
        "nullable": true,
        "label": "Details"
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ]
  },
  {
    "tableName": "Notification",
    "tableType": "system_core",
    "category": "system",
    "description": "User notifications",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "recipient_id",
        "type": "VARCHAR(255)",
        "nullable": false,
        "physicalName": "`RecipientId`",
        "label": "Recipient Id"
      },
      {
        "name": "title",
        "type": "VARCHAR(255)",
        "nullable": false,
        "physicalName": "`Title`",
        "label": "Title"
      },
      {
        "name": "body",
        "type": "TEXT",
        "physicalName": "`Body`",
        "label": "Body"
      },
      {
        "name": "link",
        "type": "TEXT",
        "physicalName": "`Link`",
        "label": "Link"
      },
      {
        "name": "is_read",
        "type": "TINYINT(1)",
        "default": "0",
        "physicalName": "`IsRead`",
        "label": "Is Read"
      },
      {
        "name": "notification_type",
        "type": "VARCHAR(255)",
        "physicalName": "`NotificationType`",
        "label": "Notification Type"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "recipient_id"
        ]
      },
      {
        "columns": [
          "is_read"
        ]
      }
    ]
  },
  {
    "tableName": "_System_File",
    "tableType": "system_core",
    "category": "system",
    "description": "File attachments",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ParentId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Parent Id"
      },
      {
        "name": "ParentObjectApiName",
        "type": "VARCHAR(128)",
        "nullable": false,
        "default": "'Unknown'",
        "label": "Parent Object Api Name"
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Name"
      },
      {
        "name": "OriginalFileName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "''",
        "label": "Original File Name"
      },
      {
        "name": "Extension",
        "type": "VARCHAR(32)",
        "nullable": true,
        "label": "Extension"
      },
      {
        "name": "MimeType",
        "type": "VARCHAR(255)",
        "label": "Mime Type"
      },
      {
        "name": "SizeBytes",
        "type": "BIGINT",
        "default": "0",
        "label": "Size Bytes"
      },
      {
        "name": "StoragePath",
        "type": "TEXT",
        "label": "Storage Path"
      },
      {
        "name": "StorageProvider",
        "type": "VARCHAR(32)",
        "nullable": false,
        "default": "'s3'",
        "label": "Storage Provider"
      },
      {
        "name": "StorageBucket",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "''",
        "label": "Storage Bucket"
      },
      {
        "name": "StorageKey",
        "type": "VARCHAR(1024)",
        "nullable": false,
        "default": "''",
        "label": "Storage Key"
      },
      {
        "name": "Status",
        "type": "VARCHAR(32)",
        "nullable": false,
        "default": "'Active'",
        "label": "Status"
      },
      {
        "name": "SourceType",
        "type": "VARCHAR(32)",
        "nullable": false,
        "default": "'native'",
        "label": "Source Type"
      },
      {
        "name": "SourceContentDocumentId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Source Content Document Id"
      },
      {
        "name": "SourceContentVersionId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Source Content Version Id"
      },
      {
        "name": "AttachmentKind",
        "type": "VARCHAR(64)",
        "nullable": false,
        "default": "'record'",
        "label": "Attachment Kind"
      },
      {
        "name": "SlotKey",
        "type": "VARCHAR(128)",
        "nullable": true,
        "label": "Slot Key"
      },
      {
        "name": "Checksum",
        "type": "VARCHAR(128)",
        "nullable": true,
        "label": "Checksum"
      },
      {
        "name": "Description",
        "type": "TEXT",
        "nullable": true,
        "label": "Description"
      },
      {
        "name": "DeletedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Deleted By Id"
      },
      {
        "name": "DeletedDate",
        "type": "DATETIME",
        "nullable": true,
        "label": "Deleted Date"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Created By Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "name": "idx__System_File_source_doc",
        "columns": [
          "SourceContentDocumentId",
          "ParentId"
        ]
      },
      {
        "name": "uk__System_File_slot",
        "columns": [
          "ParentObjectApiName",
          "ParentId",
          "SlotKey"
        ],
        "unique": true
      }
    ]
  },
  {
    "tableName": "_System_FileUploadOperation",
    "tableType": "system_core",
    "category": "system",
    "description": "Durable upload operation state for file-service idempotency and recovery",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "IdempotencyKey",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Idempotency Key"
      },
      {
        "name": "RequestHash",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Request Hash"
      },
      {
        "name": "State",
        "type": "VARCHAR(64)",
        "nullable": false,
        "default": "'PREPARED'",
        "label": "State"
      },
      {
        "name": "ObjectKey",
        "type": "VARCHAR(1024)",
        "nullable": true,
        "label": "Object Key"
      },
      {
        "name": "SystemFileId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "System File Id"
      },
      {
        "name": "ParentId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Parent Id"
      },
      {
        "name": "ParentObjectApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Parent Object Api Name"
      },
      {
        "name": "ErrorCode",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Error Code"
      },
      {
        "name": "ErrorMessage",
        "type": "TEXT",
        "nullable": true,
        "label": "Error Message"
      },
      {
        "name": "ExpiresAt",
        "type": "DATETIME",
        "nullable": true,
        "label": "Expires At"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "name": "uk__System_FileUploadOperation_idempotency",
        "columns": [
          "IdempotencyKey"
        ],
        "unique": true
      },
      {
        "name": "idx__System_FileUploadOperation_expires",
        "columns": [
          "ExpiresAt"
        ]
      }
    ]
  },
  {
    "tableName": "Group",
    "tableType": "system_core",
    "category": "auth",
    "description": "Groups and Queues",
    "requiredWritePermission": "ManageSharing",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true,
        "label": "Name"
      },
      {
        "name": "DeveloperName",
        "type": "VARCHAR(255)",
        "nullable": true,
        "description": "Salesforce-compatible API name (alphanumeric + underscores)",
        "label": "Developer Name"
      },
      {
        "name": "Label",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Label"
      },
      {
        "name": "Type",
        "type": "VARCHAR(255)",
        "default": "'Regular'",
        "label": "Type"
      },
      {
        "name": "Email",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Email"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": false,
        "label": "Is Deleted"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ]
  },
  {
    "tableName": "GroupMember",
    "tableType": "system_core",
    "category": "auth",
    "description": "Group membership",
    "requiredWritePermission": "ManageSharing",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "GroupId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Group Id"
      },
      {
        "name": "UserOrGroupId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "User Or Group Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": false,
        "label": "Is Deleted"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "Groupid",
          "Userorgroupid"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "GroupId",
        "references": "Group(Id)",
        "onDelete": "CASCADE"
      },
      {
        "column": "UserOrGroupId",
        "references": "User(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "CampaignMemberStatus",
    "tableType": "system_core",
    "category": "crm",
    "label": "Campaign Member Status",
    "description": "Defines available status values for campaign members per campaign",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "CampaignId",
        "label": "Campaign",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "Campaign"
        ]
      },
      {
        "name": "Label",
        "label": "Member Status",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "SortOrder",
        "label": "Sort Order",
        "type": "INT",
        "nullable": true
      },
      {
        "name": "IsDefault",
        "label": "Default",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "HasResponded",
        "label": "Has Responded",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "label": "Is Deleted"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ],
        "relationshipName": "CreatedBy",
        "label": "Created By"
      },
      {
        "name": "LastModifiedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Last Modified By Id"
      },
      {
        "name": "OwnerId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ],
        "label": "Owner Id"
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Name"
      },
      {
        "name": "SystemModstamp",
        "type": "DATETIME",
        "nullable": true,
        "label": "System Modstamp"
      }
    ],
    "indices": [
      {
        "columns": [
          "CampaignId"
        ]
      }
    ]
  },
  {
    "tableName": "QueueSobject",
    "tableType": "system_core",
    "category": "auth",
    "description": "Mapping of Queues to supported Object types",
    "requiredWritePermission": "ManageSharing",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "QueueId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Queue Id"
      },
      {
        "name": "SobjectType",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Sobject Type"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "Queueid",
          "Sobjecttype"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "QueueId",
        "references": "Group(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "PermissionSet",
    "tableType": "system_core",
    "category": "auth",
    "description": "Additive permission sets",
    "requiredWritePermission": "ManageProfilesPermSets",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true,
        "label": "Name"
      },
      {
        "name": "Label",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Label"
      },
      {
        "name": "Description",
        "type": "TEXT",
        "label": "Description",
        "nullable": true
      },
      {
        "name": "IsActive",
        "type": "TINYINT(1)",
        "default": "1",
        "label": "Is Active"
      },
      {
        "name": "IsCustom",
        "label": "Is Custom",
        "type": "TINYINT(1)",
        "default": "1",
        "description": "Salesforce: Indicates if permission set was created by admin (true) vs system (false)"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": false,
        "label": "Is Deleted"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      },
      {
        "name": "ProfileId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Profile ID",
        "description": "Reference to Profile when IsOwnedByProfile=true (Salesforce standard)"
      },
      {
        "name": "IsOwnedByProfile",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Is Owned By Profile",
        "description": "True if this PermissionSet is the implicit one backing a Profile"
      }
    ],
    "indices": [
      {
        "columns": [
          "ProfileId"
        ],
        "unique": false
      },
      {
        "name": "idx_profile_owned_permset",
        "columns": [
          "ProfileId",
          "IsOwnedByProfile"
        ],
        "unique": true
      }
    ]
  },
  {
    "tableName": "PermissionSetAssignment",
    "tableType": "system_core",
    "category": "auth",
    "description": "Assignment of permission sets to users",
    "requiredWritePermission": "ManageProfilesPermSets",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "AssigneeId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Assignee Id"
      },
      {
        "name": "PermissionSetId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Permission Set Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": false,
        "label": "Is Deleted"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "name": "idx_psa_assignee_permset",
        "columns": [
          "Assigneeid",
          "Permissionsetid"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "AssigneeId",
        "references": "User(Id)",
        "onDelete": "CASCADE"
      },
      {
        "column": "PermissionSetId",
        "references": "PermissionSet(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_RecordShare",
    "tableType": "system_core",
    "category": "auth",
    "requiredWritePermission": "ManageSharing",
    "description": "Manual record sharing with users or groups",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ObjectApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Object Api Name"
      },
      {
        "name": "RecordId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Record Id"
      },
      {
        "name": "ShareWithUserId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Share With User Id"
      },
      {
        "name": "ShareWithGroupId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Share With Group Id"
      },
      {
        "name": "AccessLevel",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'Read'",
        "label": "Access Level"
      },
      {
        "name": "Reason",
        "type": "VARCHAR(255)",
        "default": "'Manual'",
        "label": "Reason"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Created By Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Last Modified By Id"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": true,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": false,
        "label": "Is Deleted"
      }
    ],
    "indices": [
      {
        "name": "idx_recordshare_record",
        "columns": [
          "Objectapiname",
          "Recordid"
        ]
      },
      {
        "name": "idx_recordshare_user",
        "columns": [
          "Sharewithuserid"
        ]
      },
      {
        "name": "idx_recordshare_group",
        "columns": [
          "Sharewithgroupid"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "ShareWithUserId",
        "references": "User(Id)",
        "onDelete": "CASCADE"
      },
      {
        "column": "ShareWithGroupId",
        "references": "Group(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_TeamMember",
    "tableType": "system_core",
    "category": "auth",
    "description": "Generic record team members",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ObjectApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Object Api Name"
      },
      {
        "name": "RecordId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Record Id"
      },
      {
        "name": "UserId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "User Id"
      },
      {
        "name": "TeamRole",
        "type": "VARCHAR(255)",
        "default": "'Team Member'",
        "label": "Team Role"
      },
      {
        "name": "AccessLevel",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'Read'",
        "label": "Access Level"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Created By Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Last Modified By Id"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": true,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": false,
        "label": "Is Deleted"
      }
    ],
    "indices": [
      {
        "name": "idx_teammember_record",
        "columns": [
          "Objectapiname",
          "Recordid"
        ]
      },
      {
        "name": "idx_teammember_user",
        "columns": [
          "Userid"
        ]
      },
      {
        "name": "idx_teammember_unique",
        "columns": [
          "Objectapiname",
          "Recordid",
          "Userid"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "UserId",
        "references": "User(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_ApprovalProcess",
    "tableType": "system_core",
    "category": "automation",
    "description": "Approval process definitions",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Name"
      },
      {
        "name": "ObjectApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Object Api Name"
      },
      {
        "name": "Description",
        "type": "TEXT",
        "nullable": true,
        "label": "Description"
      },
      {
        "name": "EntryCriteria",
        "type": "TEXT",
        "nullable": true,
        "label": "Entry Criteria"
      },
      {
        "name": "ApproverType",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'User'",
        "label": "Approver Type"
      },
      {
        "name": "ApproverId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Approver Id"
      },
      {
        "name": "IsActive",
        "type": "TINYINT(1)",
        "default": "1",
        "nullable": false,
        "label": "Is Active"
      },
      {
        "name": "OwnerId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Owner Id"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Created By Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Last Modified By Id"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": true,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": false,
        "label": "Is Deleted"
      }
    ],
    "indices": [
      {
        "name": "idx_approvalprocess_object",
        "columns": [
          "Objectapiname"
        ]
      },
      {
        "name": "idx_approvalprocess_name",
        "columns": [
          "Name"
        ],
        "unique": true
      },
      {
        "name": "idx_approvalprocess_created_date",
        "columns": [
          "Createddate"
        ]
      },
      {
        "name": "idx_approvalprocess_last_modified_date",
        "columns": [
          "Lastmodifieddate"
        ]
      }
    ],
    "foreignKeys": []
  },
  {
    "tableName": "_System_ApprovalWorkItem",
    "tableType": "system_core",
    "category": "automation",
    "description": "Pending approval work items",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ProcessId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Process Id"
      },
      {
        "name": "FlowInstanceId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Flow Instance Id"
      },
      {
        "name": "FlowStepId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Flow Step Id"
      },
      {
        "name": "ObjectApiName",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Object Api Name"
      },
      {
        "name": "RecordId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Record Id"
      },
      {
        "name": "Status",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'Pending'",
        "label": "Status"
      },
      {
        "name": "SubmittedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Submitted By Id"
      },
      {
        "name": "SubmittedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Submitted Date"
      },
      {
        "name": "ApproverId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Approver Id"
      },
      {
        "name": "ApprovedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Approved By Id"
      },
      {
        "name": "ApprovedDate",
        "type": "DATETIME",
        "nullable": true,
        "label": "Approved Date"
      },
      {
        "name": "Comments",
        "type": "TEXT",
        "nullable": true,
        "label": "Comments"
      },
      {
        "name": "OwnerId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Owner Id"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Created By Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Last Modified By Id"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": true,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": false,
        "label": "Is Deleted"
      }
    ],
    "indices": [
      {
        "name": "idx_approvalworkitem_process",
        "columns": [
          "Processid"
        ]
      },
      {
        "name": "idx_approvalworkitem_record",
        "columns": [
          "Objectapiname",
          "Recordid"
        ]
      },
      {
        "name": "idx_approvalworkitem_status",
        "columns": [
          "Status"
        ]
      },
      {
        "name": "idx_approvalworkitem_approver",
        "columns": [
          "Approverid"
        ]
      },
      {
        "name": "idx_approvalworkitem_submitted_by_id",
        "columns": [
          "Submittedbyid"
        ]
      },
      {
        "name": "idx_approvalworkitem_created_date",
        "columns": [
          "Createddate"
        ]
      },
      {
        "name": "idx_approvalworkitem_last_modified_date",
        "columns": [
          "Lastmodifieddate"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "ProcessId",
        "references": "_System_ApprovalProcess(Id)",
        "onDelete": "CASCADE"
      },
      {
        "column": "SubmittedById",
        "references": "User(Id)",
        "onDelete": "SET NULL"
      },
      {
        "column": "ApproverId",
        "references": "User(Id)",
        "onDelete": "SET NULL"
      }
    ]
  },
  {
    "tableName": "_System_UIComponent",
    "tableType": "system_metadata",
    "category": "ui",
    "description": "Registered UI components",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true,
        "label": "Name"
      },
      {
        "name": "Type",
        "type": "VARCHAR(255)",
        "default": "'page'",
        "label": "Type"
      },
      {
        "name": "IsEmbeddable",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Is Embeddable"
      },
      {
        "name": "Description",
        "type": "TEXT",
        "label": "Description",
        "nullable": true
      },
      {
        "name": "ComponentPath",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Component Path"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "columns": [
          "Isembeddable"
        ]
      }
    ]
  },
  {
    "tableName": "_System_OutboxEvent",
    "tableType": "system_core",
    "category": "infrastructure",
    "description": "Transactional event outbox for guaranteed delivery",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "EventType",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Event Type"
      },
      {
        "name": "Payload",
        "type": "JSON",
        "nullable": false,
        "label": "Payload"
      },
      {
        "name": "Status",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'pending'",
        "label": "Status"
      },
      {
        "name": "RetryCount",
        "type": "INT",
        "default": "0",
        "label": "Retry Count"
      },
      {
        "name": "ErrorMessage",
        "type": "TEXT",
        "nullable": true,
        "label": "Error Message"
      },
      {
        "name": "ProcessedDate",
        "type": "DATETIME",
        "nullable": true,
        "label": "Processed Date"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      },
      {
        "name": "metadata_json",
        "type": "JSON",
        "nullable": true,
        "label": "Metadata Json"
      }
    ],
    "indices": [
      {
        "columns": [
          "Status",
          "CreatedDate"
        ],
        "name": "idx_outbox_pending"
      }
    ]
  },
  {
    "tableName": "_System_Webhook",
    "tableType": "system_metadata",
    "category": "integration",
    "description": "External webhook configurations",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true,
        "label": "Name"
      },
      {
        "name": "Url",
        "type": "TEXT",
        "nullable": false,
        "label": "Url"
      },
      {
        "name": "Method",
        "type": "VARCHAR(255)",
        "default": "'POST'",
        "label": "Method"
      },
      {
        "name": "Headers",
        "type": "TEXT",
        "label": "Headers"
      },
      {
        "name": "AuthType",
        "type": "VARCHAR(255)",
        "label": "Auth Type"
      },
      {
        "name": "AuthConfig",
        "type": "TEXT",
        "label": "Auth Config"
      },
      {
        "name": "IsActive",
        "type": "TINYINT(1)",
        "default": "1",
        "label": "Is Active"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "requiredReadPermission": "ViewSetup"
  },
  {
    "tableName": "_System_EmailTemplate",
    "tableType": "system_metadata",
    "category": "communication",
    "description": "Email templates for notifications",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true,
        "label": "Name"
      },
      {
        "name": "Subject",
        "type": "VARCHAR(255)",
        "label": "Subject"
      },
      {
        "name": "HtmlValue",
        "type": "TEXT",
        "label": "Html Value"
      },
      {
        "name": "Body",
        "type": "TEXT",
        "label": "Body"
      },
      {
        "name": "FolderId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Folder Id"
      },
      {
        "name": "Description",
        "type": "TEXT",
        "label": "Description",
        "nullable": true
      },
      {
        "name": "TemplateType",
        "type": "VARCHAR(255)",
        "default": "'custom'",
        "label": "Template Type"
      },
      {
        "name": "DeveloperName",
        "type": "VARCHAR(255)",
        "label": "Developer Name"
      },
      {
        "name": "IsActive",
        "type": "TINYINT(1)",
        "default": "1",
        "label": "Is Active"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "default": "0",
        "label": "Is Deleted"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Created By Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "foreignKeys": [
      {
        "column": "FolderId",
        "references": "ReportFolder(Id)",
        "onDelete": "SET NULL"
      },
      {
        "column": "CreatedById",
        "references": "User(Id)",
        "onDelete": "SET NULL"
      }
    ]
  },
  {
    "tableName": "_System_FeedItem",
    "tableType": "system_metadata",
    "category": "collaboration",
    "description": "Feed items for chatter and notifications",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "ParentId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Parent Id"
      },
      {
        "name": "Type",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Type"
      },
      {
        "name": "Body",
        "type": "TEXT",
        "label": "Body"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "label": "Created By Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ]
  },
  {
    "tableName": "_System_ConnectedApp",
    "tableType": "system",
    "category": "security",
    "description": "OAuth Connected Apps",
    "requiredWritePermission": "CustomizeApplication",
    "deleteMode": "hard",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "Name",
        "label": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true
      },
      {
        "name": "ConsumerKey",
        "label": "Consumer Key",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true
      },
      {
        "name": "ConsumerSecret",
        "label": "Consumer Secret",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "CallbackUrl",
        "label": "Callback URL",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "Scopes",
        "label": "Scopes",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "IsActive",
        "label": "Is Active",
        "type": "TINYINT(1)",
        "default": "1",
        "nullable": false
      },
      {
        "name": "RunAsUserId",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Run As User Id"
      },
      {
        "name": "PermittedUsers",
        "type": "VARCHAR(50)",
        "nullable": true,
        "default": "'AllUsers'",
        "label": "Permitted Users"
      },
      {
        "name": "DailyApiLimit",
        "label": "Daily API Limit",
        "type": "INT",
        "nullable": true
      },
      {
        "name": "HourlyApiLimit",
        "label": "Hourly API Limit",
        "type": "INT",
        "nullable": true
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "requiredReadPermission": "ViewSetup"
  },
  {
    "tableName": "_System_ConnectedAppAccess",
    "tableType": "system",
    "category": "security",
    "description": "Connected App access grants - which profiles/permsets can use which apps",
    "deleteMode": "hard",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ConnectedAppId",
        "label": "Connected App ID",
        "type": "VARCHAR(255)",
        "nullable": false,
        "referenceTo": ["_System_ConnectedApp"],
        "deleteRule": "Cascade"
      },
      {
        "name": "ProfileId",
        "label": "Profile ID",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "PermissionSetId",
        "label": "Permission Set ID",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME"
      }
    ],
    "indices": [
      {
        "columns": [
          "ConnectedAppId"
        ]
      },
      {
        "columns": [
          "ProfileId"
        ]
      },
      {
        "columns": [
          "PermissionSetId"
        ]
      }
    ],
    "requiredWritePermission": "CustomizeApplication",
    "requiredReadPermission": "ViewSetup"
  },
  {
    "tableName": "_System_OAuthCustomScope",
    "tableType": "system",
    "category": "security",
    "description": "Custom OAuth scope definitions mapped to custom permissions",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "Name",
        "label": "Scope Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true
      },
      {
        "name": "Description",
        "label": "Description",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "CustomPermissionId",
        "label": "Custom Permission ID",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "IsActive",
        "label": "Is Active",
        "type": "TINYINT(1)",
        "default": "1",
        "nullable": false
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME"
      }
    ],
    "indices": [
      {
        "columns": [
          "Name"
        ],
        "unique": true
      }
    ],
    "requiredReadPermission": "ViewSetup"
  },
  {
    "tableName": "Dashboard",
    "tableType": "system",
    "category": "analytics",
    "label": "Dashboard",
    "description": "Dashboard Definitions",
    "requiredWritePermission": "ManageDashbdsInPubFolders",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "Name",
        "label": "Name",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "DeveloperName",
        "label": "Developer Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true
      },
      {
        "name": "Description",
        "label": "Description",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "FolderId",
        "label": "Folder",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "ReportFolder"
        ]
      },
      {
        "name": "LayoutType",
        "label": "Layout Type",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'Grid'"
      },
      {
        "name": "FilterMode",
        "label": "Filter Mode",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "LayoutMode",
        "label": "Layout Mode",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "StartDate",
        "label": "Start Date",
        "type": "DATE",
        "nullable": true
      },
      {
        "name": "EndDate",
        "label": "End Date",
        "type": "DATE",
        "nullable": true
      },
      {
        "name": "DateRangeType",
        "label": "Date Range Type",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "DashboardType",
        "label": "Dashboard Type",
        "type": "VARCHAR(50)",
        "nullable": true,
        "default": "'LoggedInUser'"
      },
      {
        "name": "RunningUserId",
        "label": "Running User",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "default": "0"
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ]
  },
  {
    "tableName": "DashboardComponent",
    "tableType": "system",
    "category": "analytics",
    "label": "Dashboard Component",
    "description": "Dashboard Widgets",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "DashboardId",
        "label": "Dashboard",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "Dashboard"
        ]
      },
      {
        "name": "ReportId",
        "label": "Report",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "Report"
        ]
      },
      {
        "name": "Type",
        "label": "Type",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "Title",
        "label": "Title",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "Config",
        "label": "Configuration",
        "type": "JSON",
        "nullable": true
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "default": "0"
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ]
  },
  {
    "tableName": "_System_OAuthCode",
    "tableType": "system",
    "category": "security",
    "description": "OAuth Authorization Codes for the OAuth 2.0 flow",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "Code",
        "label": "Authorization Code",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true
      },
      {
        "name": "ClientId",
        "label": "Client ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "RedirectUri",
        "label": "Redirect URI",
        "type": "TEXT",
        "nullable": false
      },
      {
        "name": "Scope",
        "label": "Scope",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "UserId",
        "label": "User ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "Nonce",
        "label": "Nonce",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "ExpiresAt",
        "label": "Expires At",
        "type": "DATETIME",
        "nullable": false
      },
      {
        "name": "Used",
        "label": "Used",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": false
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "Code"
        ]
      },
      {
        "columns": [
          "Clientid"
        ]
      },
      {
        "columns": [
          "Expiresat"
        ]
      }
    ],
    "requiredReadPermission": "BLOCKED"
  },
  {
    "tableName": "_System_Permission",
    "tableType": "system_core",
    "category": "auth",
    "description": "Discrete system permissions (Salesforce UserPermissions equivalent)",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ApiName",
        "label": "API Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true
      },
      {
        "name": "Label",
        "label": "Label",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "Category",
        "label": "Category",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "Description",
        "label": "Description",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "IsSystem",
        "label": "Is System",
        "type": "TINYINT(1)",
        "default": "1",
        "nullable": false
      },
      {
        "name": "IsActive",
        "label": "Is Active",
        "type": "TINYINT(1)",
        "default": "1",
        "nullable": false
      },
      {
        "name": "RequiresPermission",
        "label": "Requires Permission",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "ApiName"
        ],
        "unique": true
      },
      {
        "columns": [
          "Category"
        ]
      }
    ]
  },
  {
    "tableName": "_System_ProfilePermission",
    "tableType": "system_core",
    "category": "auth",
    "requiredWritePermission": "ManageProfilesPermSets",
    "description": "Junction table linking profiles to system permissions",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ProfileId",
        "label": "Profile ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "PermissionApiName",
        "label": "Permission API Name",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "IsEnabled",
        "label": "Is Enabled",
        "type": "TINYINT(1)",
        "default": "1",
        "nullable": false
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "name": "idx_profile_perm",
        "columns": [
          "ProfileId",
          "PermissionApiName"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "ProfileId",
        "references": "Profile(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_PermissionSetPermission",
    "tableType": "system_core",
    "category": "auth",
    "requiredWritePermission": "ManageProfilesPermSets",
    "description": "Junction table linking permission sets to system permissions",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "PermissionSetId",
        "label": "Permission Set ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "PermissionApiName",
        "label": "Permission API Name",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "IsEnabled",
        "label": "Is Enabled",
        "type": "TINYINT(1)",
        "default": "1",
        "nullable": false
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "name": "idx_permset_perm",
        "columns": [
          "PermissionSetId",
          "PermissionApiName"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "PermissionSetId",
        "references": "PermissionSet(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "PermissionSetGroup",
    "tableType": "system_core",
    "category": "auth",
    "description": "Group of permission sets (Salesforce PermissionSetGroup)",
    "requiredWritePermission": "ManageProfilesPermSets",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ApiName",
        "label": "API Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true
      },
      {
        "name": "Label",
        "label": "Label",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "Description",
        "label": "Description",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "IsActive",
        "label": "Is Active",
        "type": "TINYINT(1)",
        "default": "1",
        "nullable": false
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": false
      }
    ]
  },
  {
    "tableName": "PermissionSetGroupComponent",
    "tableType": "system_core",
    "category": "auth",
    "description": "Junction: Group -> Permission Set",
    "requiredWritePermission": "ManageProfilesPermSets",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "GroupId",
        "label": "Group ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "PermissionSetId",
        "label": "Permission Set ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "name": "idx_group_permset",
        "columns": [
          "Groupid",
          "Permissionsetid"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "GroupId",
        "references": "PermissionSetGroup(Id)",
        "onDelete": "CASCADE"
      },
      {
        "column": "PermissionSetId",
        "references": "PermissionSet(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "PermissionSetGroupAssignment",
    "tableType": "system_core",
    "category": "auth",
    "description": "Junction: User -> Permission Set Group",
    "requiredWritePermission": "ManageProfilesPermSets",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "AssigneeId",
        "label": "Assignee ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "GroupId",
        "label": "Group ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": false
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "name": "idx_user_group",
        "columns": [
          "Assigneeid",
          "Groupid"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "AssigneeId",
        "references": "User(Id)",
        "onDelete": "CASCADE"
      },
      {
        "column": "GroupId",
        "references": "PermissionSetGroup(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "MutingPermissionSet",
    "tableType": "system_core",
    "category": "auth",
    "description": "Permission set that revokes permissions from a group",
    "requiredWritePermission": "ManageProfilesPermSets",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ApiName",
        "label": "API Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true
      },
      {
        "name": "Label",
        "label": "Label",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "Description",
        "label": "Description",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "GroupId",
        "label": "Group ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "foreignKeys": [
      {
        "column": "GroupId",
        "references": "PermissionSetGroup(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_MutingPermissionSetPermission",
    "tableType": "system_core",
    "category": "auth",
    "requiredWritePermission": "ManageProfilesPermSets",
    "description": "Permissions to mute (revoke) from the group",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "MutingPermissionSetId",
        "label": "Muting Permission Set ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "PermissionApiName",
        "label": "Permission API Name",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "name": "idx_muting_perm",
        "columns": [
          "Mutingpermissionsetid",
          "Permissionapiname"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "MutingPermissionSetId",
        "references": "MutingPermissionSet(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_CustomPermission",
    "tableType": "system_core",
    "category": "auth",
    "description": "User-defined permissions (for use in Flows/validation rules)",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ApiName",
        "label": "API Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true
      },
      {
        "name": "Label",
        "label": "Label",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "Description",
        "label": "Description",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "IsActive",
        "label": "Is Active",
        "type": "TINYINT(1)",
        "default": "1",
        "nullable": false
      },
      {
        "name": "ConnectedAppId",
        "label": "Connected App ID",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": false
      },
      {
        "name": "IsCustomized",
        "label": "Customized",
        "description": "Admin ownership flag. When set to 1, bootstrap upsert passes (including pack updates) must NOT overwrite this row's content. Standard invariant used across all pack-seeded _System_* tables — see ResetPackOwnedColumnsSQL in bootstrap/standard_actions.go. Required column for IsActive admin-toggle preservation (see Finding 3 in the Lead Convert Phase-1 review).",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": false
      }
    ]
  },
  {
    "tableName": "ProfileCustomPermission",
    "tableType": "system_core",
    "category": "auth",
    "description": "Junction: Profile -> Custom Permission",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ProfileId",
        "label": "Profile ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "CustomPermissionId",
        "label": "Custom Permission ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "name": "idx_profile_custperm",
        "columns": [
          "Profileid",
          "Custompermissionid"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "ProfileId",
        "references": "Profile(Id)",
        "onDelete": "CASCADE"
      },
      {
        "column": "CustomPermissionId",
        "references": "_System_CustomPermission(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "PermissionSetCustomPermission",
    "tableType": "system_core",
    "category": "auth",
    "description": "Junction: Permission Set -> Custom Permission",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "PermissionSetId",
        "label": "Permission Set ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "CustomPermissionId",
        "label": "Custom Permission ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "name": "idx_permset_custperm",
        "columns": [
          "Permissionsetid",
          "Custompermissionid"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "PermissionSetId",
        "references": "PermissionSet(Id)",
        "onDelete": "CASCADE"
      },
      {
        "column": "CustomPermissionId",
        "references": "_System_CustomPermission(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "ProfileTabSetting",
    "tableType": "system_core",
    "category": "auth",
    "description": "Tab visibility per profile",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ProfileId",
        "label": "Profile ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "TabName",
        "label": "Tab Name",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "Visibility",
        "label": "Visibility",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'DefaultOn'"
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "name": "idx_profile_tab",
        "columns": [
          "Profileid",
          "Tabname"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "ProfileId",
        "references": "Profile(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "PermissionSetTabSetting",
    "tableType": "system_core",
    "category": "auth",
    "description": "Tab visibility per permission set",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "PermissionSetId",
        "label": "Permission Set ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "TabName",
        "label": "Tab Name",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "Visibility",
        "label": "Visibility",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'Available'"
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "name": "idx_permset_tab",
        "columns": [
          "Permissionsetid",
          "Tabname"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "PermissionSetId",
        "references": "PermissionSet(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "ProfileAppVisibility",
    "tableType": "system_core",
    "category": "auth",
    "description": "App visibility per profile",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ProfileId",
        "label": "Profile ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "AppId",
        "label": "App ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "IsVisible",
        "label": "Is Visible",
        "type": "TINYINT(1)",
        "default": "1",
        "nullable": false
      },
      {
        "name": "IsDefault",
        "label": "Is Default",
        "type": "TINYINT(1)",
        "default": "0",
        "nullable": false
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "name": "idx_profile_app",
        "columns": [
          "Profileid",
          "Appid"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "ProfileId",
        "references": "Profile(Id)",
        "onDelete": "CASCADE"
      },
      {
        "column": "AppId",
        "references": "_System_App(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "PermissionSetAppVisibility",
    "tableType": "system_core",
    "category": "auth",
    "description": "App visibility per permission set",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "PermissionSetId",
        "label": "Permission Set ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "AppId",
        "label": "App ID",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "IsVisible",
        "label": "Is Visible",
        "type": "TINYINT(1)",
        "default": "1",
        "nullable": false
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "name": "idx_permset_app",
        "columns": [
          "Permissionsetid",
          "Appid"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "PermissionSetId",
        "references": "PermissionSet(Id)",
        "onDelete": "CASCADE"
      },
      {
        "column": "AppId",
        "references": "_System_App(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_UserObjectInteraction",
    "tableType": "system_metadata",
    "category": "mru",
    "label": "User Object Interaction",
    "description": "Tracks user object interaction frequency for search scope ordering",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "UserId",
        "label": "User",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ]
      },
      {
        "name": "ObjectApiName",
        "label": "Object API Name",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "InteractionCount",
        "label": "Interaction Count",
        "type": "INT",
        "default": "1"
      },
      {
        "name": "LastAccessedAt",
        "label": "Last Accessed",
        "type": "DATETIME",
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "IsPinned",
        "label": "Pinned",
        "type": "TINYINT(1)",
        "default": "0"
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "UserId",
          "ObjectApiName"
        ],
        "unique": true
      },
      {
        "columns": [
          "UserId",
          "InteractionCount"
        ]
      }
    ]
  },
  {
    "tableName": "_System_UserRecentItem",
    "tableType": "system_metadata",
    "category": "mru",
    "label": "User Recent Item",
    "description": "Tracks user recent items for relevantItems API (MRU)",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "UserId",
        "label": "User",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ]
      },
      {
        "name": "ObjectApiName",
        "label": "Object API Name",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "RecordId",
        "label": "Record",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "AccessedAt",
        "label": "Accessed At",
        "type": "DATETIME",
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "UpdateCounter",
        "label": "Update Counter",
        "type": "BIGINT",
        "default": "1"
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "UserId",
          "ObjectApiName",
          "RecordId"
        ],
        "unique": true
      },
      {
        "columns": [
          "UserId",
          "ObjectApiName",
          "AccessedAt"
        ]
      }
    ]
  },
  {
    "tableName": "FlowDefinition",
    "tableType": "system_automation",
    "category": "automation",
    "requiredWritePermission": "ManageFlows",
    "label": "Flow Definition",
    "description": "Salesforce-compatible flow definitions (Tooling API)",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "DeveloperName",
        "label": "Developer Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "unique": true,
        "isNameField": true
      },
      {
        "name": "MasterLabel",
        "label": "Label",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "Description",
        "label": "Description",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "ProcessType",
        "label": "Process Type",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'AutoLaunchedFlow'"
      },
      {
        "name": "TriggerType",
        "label": "Trigger Type",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "TriggerObjectOrEvent",
        "label": "Trigger Object",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "ActiveVersionId",
        "label": "Active Version",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "LatestVersionId",
        "label": "Latest Version",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "IsCustomized",
        "label": "Customized",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "OwnerId",
        "label": "Owner",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "CreatedById",
        "label": "Created By",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "LastModifiedById",
        "label": "Last Modified By",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "ProcessType"
        ]
      },
      {
        "columns": [
          "TriggerType"
        ]
      },
      {
        "columns": [
          "ActiveVersionId"
        ]
      }
    ],
    "skipStructGen": true
  },
  {
    "tableName": "Flow",
    "tableType": "system_automation",
    "category": "automation",
    "requiredWritePermission": "ManageFlows",
    "label": "Flow Version",
    "description": "Salesforce-compatible flow versions (Tooling API)",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "DefinitionId",
        "label": "Flow Definition",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "FlowDefinition"
        ]
      },
      {
        "name": "MasterLabel",
        "label": "Label",
        "type": "VARCHAR(255)",
        "nullable": true,
        "isNameField": true
      },
      {
        "name": "VersionNumber",
        "label": "Version Number",
        "type": "INT",
        "nullable": false,
        "default": "1"
      },
      {
        "name": "Status",
        "label": "Status",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'Draft'"
      },
      {
        "name": "Description",
        "label": "Description",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "ProcessType",
        "label": "Process Type",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'AutoLaunchedFlow'"
      },
      {
        "name": "Metadata",
        "label": "Flow Metadata",
        "type": "LONGTEXT",
        "nullable": true,
        "description": "JSON containing flow canvas elements"
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "Source",
        "label": "Source",
        "type": "VARCHAR(16)",
        "nullable": false,
        "default": "'custom'",
        "description": "Provenance bit: 'standard' = pack-seeded by standard_flows/* and never mutated in place; 'custom' = admin-authored or admin-edited. Drives the seeder's upgrade-path auto-advance logic — a pack upgrade auto-activates new metadata ONLY when the current ActiveVersionId still points to a Source='standard' row. Any in-place metadata edit via the tooling API flips the row to 'custom' (adopting a standard flow makes the admin its owner). Column default is 'custom' so non-seeder inserts remain conservative even if a writer forgets to set it; only standard_flows.go is permitted to write 'standard'."
      },
      {
        "name": "OwnerId",
        "label": "Owner",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "CreatedById",
        "label": "Created By",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "LastModifiedById",
        "label": "Last Modified By",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "DefinitionId"
        ]
      },
      {
        "columns": [
          "Status"
        ]
      },
      {
        "columns": [
          "DefinitionId",
          "VersionNumber"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "DefinitionId",
        "references": "FlowDefinition(Id)",
        "onDelete": "CASCADE"
      }
    ],
    "skipStructGen": true
  },
  {
    "tableName": "FlowInterview",
    "tableType": "system_automation",
    "category": "automation",
    "label": "Flow Interview",
    "description": "Running and paused flow instances",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "FlowVersionId",
        "label": "Flow Version",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "Flow"
        ]
      },
      {
        "name": "InterviewLabel",
        "label": "Interview Label",
        "type": "VARCHAR(255)",
        "nullable": true,
        "isNameField": true
      },
      {
        "name": "InterviewStatus",
        "label": "Status",
        "type": "VARCHAR(255)",
        "nullable": false,
        "default": "'Running'"
      },
      {
        "name": "CurrentElement",
        "label": "Current Element",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "ContextData",
        "label": "Context Data",
        "type": "LONGTEXT",
        "nullable": true,
        "description": "JSON containing flow variable values"
      },
      {
        "name": "PausedDate",
        "label": "Paused Date",
        "type": "DATETIME",
        "nullable": true
      },
      {
        "name": "PausedUntil",
        "label": "Paused Until",
        "type": "TIMESTAMP",
        "nullable": true,
        "description": "When the scheduler should resume this paused interview (Wait element target time)"
      },
      {
        "name": "ClaimedBy",
        "label": "Claimed By Node",
        "type": "VARCHAR(64)",
        "nullable": true,
        "description": "Hostname/UUID of the scheduler node that claimed this interview for resume"
      },
      {
        "name": "ClaimedAt",
        "label": "Claimed At",
        "type": "TIMESTAMP",
        "nullable": true,
        "description": "When the interview was claimed for resume (stale claims older than 10 minutes are recovered)"
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "OwnerId",
        "label": "Owner",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "CreatedById",
        "label": "Created By",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "LastModifiedById",
        "label": "Last Modified By",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "FlowVersionId"
        ]
      },
      {
        "columns": [
          "InterviewStatus"
        ]
      },
      {
        "columns": [
          "OwnerId"
        ]
      },
      {
        "name": "idx_flow_interview_paused_scan",
        "columns": [
          "InterviewStatus",
          "PausedUntil"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "FlowVersionId",
        "references": "Flow(Id)",
        "onDelete": "CASCADE"
      }
    ],
    "skipStructGen": true
  },
  {
    "tableName": "ProcessDefinition",
    "tableType": "system_automation",
    "sharingModel": "PublicReadWrite",
    "category": "approval",
    "label": "Approval Process",
    "description": "Approval process definitions",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "Name",
        "label": "Process Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "isNameField": true
      },
      {
        "name": "DeveloperName",
        "label": "Developer Name",
        "type": "VARCHAR(255)",
        "nullable": true,
        "unique": true
      },
      {
        "name": "Description",
        "label": "Description",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "State",
        "label": "State",
        "type": "VARCHAR(50)",
        "nullable": false,
        "default": "'Active'"
      },
      {
        "name": "TableEnumOrId",
        "label": "Object",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "LockType",
        "label": "Lock Type",
        "type": "VARCHAR(50)",
        "nullable": true
      },
      {
        "name": "EntryFilter",
        "label": "Entry Criteria",
        "type": "TEXT",
        "nullable": true,
        "description": "Formula expression for record entry criteria (e.g. Status == 'Draft' && Amount > 1000)"
      },
      {
        "name": "FinalApprovalRecordLock",
        "label": "Lock Record on Final Approval",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "FinalRejectionRecordLock",
        "label": "Lock Record on Final Rejection",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "AllowRecall",
        "label": "Allow Submitters to Recall",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "1"
      },
      {
        "name": "IsActive",
        "label": "Active",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "1"
      },
      {
        "name": "CreatedById",
        "label": "Created By",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ]
      },
      {
        "name": "LastModifiedById",
        "label": "Last Modified By",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ]
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "Metadata",
        "label": "Approval Process Metadata",
        "type": "LONGTEXT",
        "nullable": true,
        "description": "JSON containing the XML definition of the Approval Process"
      },
      {
        "name": "ProcessOrder",
        "label": "Process Order",
        "type": "INT",
        "nullable": true,
        "description": "Numerical order for evaluation sequence when multiple active processes exist for the same object"
      }
    ],
    "indices": [
      {
        "columns": [
          "State"
        ]
      },
      {
        "columns": [
          "TableEnumOrId"
        ]
      },
      {
        "columns": [
          "IsActive"
        ]
      }
    ],
    "skipStructGen": true
  },
  {
    "tableName": "ProcessNode",
    "tableType": "system_automation",
    "sharingModel": "PublicReadWrite",
    "category": "approval",
    "label": "Approval Step",
    "description": "Defined steps within an approval process",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "Name",
        "label": "Step Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "isNameField": true
      },
      {
        "name": "DeveloperName",
        "label": "Developer Name",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "ProcessDefinitionId",
        "label": "Process Definition",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "ProcessDefinition"
        ]
      },
      {
        "name": "Description",
        "label": "Description",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "ApproverType",
        "label": "Approver Type",
        "type": "VARCHAR(50)",
        "nullable": true,
        "default": "'User'"
      },
      {
        "name": "ApproverUserId",
        "label": "Approver User",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ]
      },
      {
        "name": "ApproverRelatedField",
        "label": "Approver Related Field",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "AllowComments",
        "label": "Allow Comments",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "1"
      },
      {
        "name": "RequireComments",
        "label": "Require Comments",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "StepOrder",
        "label": "Step Order",
        "type": "INT",
        "nullable": true
      },
      {
        "name": "RejectBehavior",
        "label": "Reject Behavior",
        "type": "VARCHAR(50)",
        "nullable": true
      }
    ],
    "indices": [
      {
        "columns": [
          "ProcessDefinitionId"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "ProcessDefinitionId",
        "references": "ProcessDefinition(Id)",
        "onDelete": "CASCADE"
      }
    ],
    "skipStructGen": true
  },
  {
    "tableName": "ProcessInstance",
    "tableType": "system_automation",
    "sharingModel": "PublicReadWrite",
    "category": "approval",
    "label": "Approval Instance",
    "description": "Runtime approval instances for submitted records",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ProcessDefinitionId",
        "label": "Process Definition",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "ProcessDefinition"
        ]
      },
      {
        "name": "TargetObjectId",
        "label": "Target Record",
        "type": "VARCHAR(255)",
        "nullable": false
      },
      {
        "name": "Status",
        "label": "Status",
        "type": "VARCHAR(50)",
        "nullable": false,
        "default": "'Pending'"
      },
      {
        "name": "SubmittedById",
        "label": "Submitted By",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ]
      },
      {
        "name": "CompletedDate",
        "label": "Completed Date",
        "type": "DATETIME",
        "nullable": true
      },
      {
        "name": "CreatedById",
        "label": "Created By",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ]
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "ProcessDefinitionId"
        ]
      },
      {
        "columns": [
          "TargetObjectId"
        ]
      },
      {
        "columns": [
          "Status"
        ]
      },
      {
        "columns": [
          "SubmittedById"
        ]
      },
      {
        "columns": [
          "CreatedDate"
        ]
      },
      {
        "columns": [
          "LastModifiedDate"
        ]
      },
      {
        "columns": [
          "TargetObjectId",
          "CreatedDate"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "ProcessDefinitionId",
        "references": "ProcessDefinition(Id)",
        "onDelete": "CASCADE"
      }
    ],
    "skipStructGen": true
  },
  {
    "tableName": "ProcessInstanceWorkitem",
    "tableType": "system_automation",
    "sharingModel": "PublicReadWrite",
    "category": "approval",
    "label": "Approval Work Item",
    "description": "Pending work items assigned to approvers",
    "deleteMode": "hard",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ProcessInstanceId",
        "label": "Process Instance",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "ProcessInstance"
        ],
        "relationshipName": "StepsAndWorkitems"
      },
      {
        "name": "ActorId",
        "label": "Assigned Approver",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "User",
          "Group"
        ],
        "isPolymorphic": true
      },
      {
        "name": "OriginalActorId",
        "label": "Original Approver",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User",
          "Group"
        ],
        "isPolymorphic": true
      },
      {
        "name": "Comments",
        "label": "Comments",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "ProcessInstanceId"
        ]
      },
      {
        "columns": [
          "ActorId"
        ]
      },
      {
        "columns": [
          "CreatedDate"
        ]
      },
      {
        "columns": [
          "ActorId",
          "CreatedDate"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "ProcessInstanceId",
        "references": "ProcessInstance(Id)",
        "onDelete": "CASCADE"
      }
    ],
    "skipStructGen": true
  },
  {
    "tableName": "ProcessInstanceNode",
    "tableType": "system_automation",
    "sharingModel": "PublicReadWrite",
    "category": "approval",
    "label": "Approval Step Instance",
    "description": "Runtime step execution records for approval instances",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ProcessInstanceId",
        "label": "Process Instance",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "ProcessInstance"
        ]
      },
      {
        "name": "ProcessNodeId",
        "label": "Process Node",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "ProcessNode"
        ]
      },
      {
        "name": "ProcessNodeName",
        "label": "Step Name",
        "type": "VARCHAR(255)",
        "nullable": true
      },
      {
        "name": "NodeStatus",
        "label": "Status",
        "type": "VARCHAR(50)",
        "nullable": false,
        "default": "'Pending'"
      },
      {
        "name": "CompletedDate",
        "label": "Completed Date",
        "type": "DATETIME",
        "nullable": true
      },
      {
        "name": "LastActorId",
        "label": "Last Actor",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ]
      },
      {
        "name": "Comments",
        "label": "Comments",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "ProcessInstanceId"
        ]
      },
      {
        "columns": [
          "ProcessNodeId"
        ]
      },
      {
        "columns": [
          "NodeStatus"
        ]
      },
      {
        "columns": [
          "CreatedDate"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "ProcessInstanceId",
        "references": "ProcessInstance(Id)",
        "onDelete": "CASCADE"
      }
    ],
    "skipStructGen": true
  },
  {
    "tableName": "ProcessAction",
    "tableType": "system_automation",
    "sharingModel": "PublicReadWrite",
    "category": "approval",
    "label": "Approval Process Action",
    "description": "Actions executed at specific points in the approval lifecycle (Submit, Final Approve, Final Reject, Recall, Step Approve, Step Reject)",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "Name",
        "label": "Action Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "isNameField": true
      },
      {
        "name": "ProcessDefinitionId",
        "label": "Process Definition",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "ProcessDefinition"
        ]
      },
      {
        "name": "ProcessNodeId",
        "label": "Process Step (Node)",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "ProcessNode"
        ],
        "description": "null = process-level action; set = step-level action"
      },
      {
        "name": "ActionType",
        "label": "Action Type",
        "type": "VARCHAR(50)",
        "nullable": false,
        "description": "FieldUpdate, Alert, RecordLock"
      },
      {
        "name": "ActionEvent",
        "label": "Action Event",
        "type": "VARCHAR(50)",
        "nullable": false,
        "description": "Submit, StepApproval, FinalApproval, FinalRejection, Recall, Reassign, StepRejection"
      },
      {
        "name": "FieldApiName",
        "label": "Field API Name",
        "type": "VARCHAR(255)",
        "nullable": true,
        "description": "For FieldUpdate: the field to update"
      },
      {
        "name": "FieldValue",
        "label": "Field Value",
        "type": "TEXT",
        "nullable": true,
        "description": "For FieldUpdate: the value to set"
      },
      {
        "name": "EmailTemplateId",
        "label": "Email Template",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "_System_EmailTemplate"
        ],
        "description": "For Alert: the email template to send"
      },
      {
        "name": "ApiName",
        "label": "API Name",
        "type": "VARCHAR(255)",
        "nullable": true,
        "description": "Developer name linking to the underlying automation object (e.g. _System_WorkflowAlert.Name for Alert actions)"
      },
      {
        "name": "Order",
        "label": "Action Order",
        "type": "INT",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "IsDeleted",
        "label": "Deleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0"
      },
      {
        "name": "CreatedById",
        "label": "Created By",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ]
      },
      {
        "name": "LastModifiedById",
        "label": "Last Modified By",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ]
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "ProcessDefinitionId"
        ]
      },
      {
        "columns": [
          "ProcessNodeId"
        ]
      },
      {
        "columns": [
          "ActionEvent"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "ProcessDefinitionId",
        "references": "ProcessDefinition(Id)",
        "onDelete": "CASCADE"
      }
    ],
    "skipStructGen": true
  },
  {
    "tableName": "_System_LayoutAssignment",
    "tableType": "system_metadata",
    "category": "ui",
    "description": "Layout routing rules \u2014 maps (Role x Profile x RecordType) to a PageLayout. Replaces ProfileLayout with multi-dimensional specificity-based resolution.",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Record ID"
      },
      {
        "name": "ObjectApiName",
        "type": "VARCHAR(191)",
        "nullable": false,
        "label": "Object API Name"
      },
      {
        "name": "LayoutId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Layout ID"
      },
      {
        "name": "RoleId",
        "type": "VARCHAR(191)",
        "nullable": true,
        "label": "Role ID",
        "description": "Organizational position. NULL = any role. Inherits via Role Hierarchy."
      },
      {
        "name": "ProfileId",
        "type": "VARCHAR(191)",
        "nullable": true,
        "label": "Profile ID",
        "description": "Permission role. NULL = any profile. Salesforce compatibility dimension."
      },
      {
        "name": "RecordTypeId",
        "type": "VARCHAR(191)",
        "nullable": true,
        "label": "Record Type ID",
        "description": "Business process type. NULL = any record type."
      },
      {
        "name": "Specificity",
        "type": "INT",
        "nullable": false,
        "default": "0",
        "label": "Specificity",
        "description": "Count of non-NULL routing dimensions. Computed by application on write."
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Created By"
      },
      {
        "name": "RouteSource",
        "type": "VARCHAR(32)",
        "logicalType": "internal",
        "nullable": true,
        "label": "Route Source",
        "description": "Routing provenance. NULL = unresolved legacy row; runtime_fallback, managed_seed, admin_authored = classified route intent."
      }
    ],
    "indices": [
      {
        "name": "idx_la_object",
        "columns": [
          "ObjectApiName"
        ]
      },
      {
        "name": "idx_la_specificity",
        "columns": [
          "ObjectApiName",
          "Specificity"
        ]
      },
      {
        "name": "idx_la_layout",
        "columns": [
          "LayoutId"
        ]
      },
      {
        "name": "uq_la_dimensions",
        "columns": [
          "ObjectApiName",
          "RoleId",
          "ProfileId",
          "RecordTypeId"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "LayoutId",
        "references": "_System_PageLayout(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_PageLayoutHistory",
    "tableType": "system_metadata",
    "category": "ui",
    "description": "Content version history for page layouts. Append-only audit trail supporting undo/rollback.",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Record ID"
      },
      {
        "name": "LayoutId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Layout ID"
      },
      {
        "name": "VersionNumber",
        "type": "INT",
        "nullable": false,
        "label": "Version Number"
      },
      {
        "name": "Config",
        "type": "JSON",
        "nullable": false,
        "label": "Layout Config Snapshot"
      },
      {
        "name": "ChangedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Changed By",
        "description": "NULL = system/auto-generate"
      },
      {
        "name": "ChangeReason",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Change Reason",
        "description": "auto_generate, auto_regenerate_v{N}, admin_edit, field_added, restored_from_v{N}"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "name": "uq_plh_layout_version",
        "columns": [
          "LayoutId",
          "VersionNumber"
        ],
        "unique": true
      }
    ],
    "foreignKeys": [
      {
        "column": "LayoutId",
        "references": "_System_PageLayout(Id)",
        "onDelete": "CASCADE"
      }
    ]
  },
  {
    "tableName": "_System_Migration",
    "tableType": "system_metadata",
    "category": "system",
    "description": "Tracks applied data migrations. Used to ensure idempotent one-time migrations.",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Migration ID"
      },
      {
        "name": "Version",
        "type": "INT",
        "nullable": false,
        "label": "Version"
      },
      {
        "name": "AppliedAt",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Applied At"
      },
      {
        "name": "Description",
        "type": "TEXT",
        "nullable": true,
        "label": "Description"
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ]
  },
  {
    "tableName": "_System_LoginHistory",
    "tableType": "system_core",
    "category": "auth",
    "description": "Login history for user authentication events",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "UserId",
        "type": "VARCHAR(255)",
        "nullable": false,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ],
        "label": "User Id"
      },
      {
        "name": "LoginTime",
        "type": "DATETIME",
        "nullable": false,
        "label": "Login Time"
      },
      {
        "name": "LoginType",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Login Type"
      },
      {
        "name": "SourceIp",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Source Ip"
      },
      {
        "name": "Browser",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Browser"
      },
      {
        "name": "Platform",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Platform"
      },
      {
        "name": "Status",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Status"
      },
      {
        "name": "Application",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Application"
      },
      {
        "name": "SessionId",
        "type": "VARCHAR(64)",
        "nullable": true,
        "label": "Session Id"
      },
      {
        "name": "LogoutTime",
        "type": "DATETIME(6)",
        "nullable": true,
        "label": "Logout Time"
      },
      {
        "name": "LogoutReason",
        "type": "VARCHAR(32)",
        "nullable": true,
        "label": "Logout Reason"
      },
      {
        "name": "AuthenticationMethod",
        "type": "VARCHAR(32)",
        "nullable": true,
        "label": "Authentication Method"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "UserId"
        ]
      },
      {
        "columns": [
          "LoginTime"
        ]
      }
    ],
    "foreignKeys": [
      {
        "column": "UserId",
        "references": "User(Id)",
        "onDelete": "CASCADE"
      }
    ],
    "requiredReadPermission": "ViewSetup"
  },
  {
    "tableName": "_System_SetupAuditTrail",
    "tableType": "system_core",
    "category": "audit",
    "description": "Admin setup configuration change audit trail",
    "requiredWritePermission": "BLOCKED",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "Action",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Action"
      },
      {
        "name": "Section",
        "type": "VARCHAR(255)",
        "nullable": false,
        "label": "Section"
      },
      {
        "name": "Display",
        "type": "TEXT",
        "nullable": true,
        "label": "Display"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "logicalType": "reference",
        "referenceTo": [
          "User"
        ],
        "label": "Created By Id"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "DelegateUser",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Delegate User"
      },
      {
        "name": "ResponsibleNamespacePrefix",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Responsible Namespace Prefix"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "CreatedById"
        ]
      },
      {
        "columns": [
          "CreatedDate"
        ]
      }
    ],
    "requiredReadPermission": "ViewSetup"
  },
  {
    "tableName": "_System_ObjectFieldMapping",
    "tableType": "system_metadata",
    "category": "metadata",
    "description": "Cross-object field mapping rules for Lead Convert and similar record conversion operations",
    "columns": [
      {
        "name": "Id",
        "type": "VARCHAR(255)",
        "primaryKey": true,
        "label": "Id"
      },
      {
        "name": "SourceObject",
        "type": "VARCHAR(128)",
        "nullable": false,
        "label": "Source Object"
      },
      {
        "name": "TargetObject",
        "type": "VARCHAR(128)",
        "nullable": false,
        "label": "Target Object"
      },
      {
        "name": "ActionType",
        "type": "VARCHAR(64)",
        "nullable": false,
        "label": "Action Type"
      },
      {
        "name": "SourceField",
        "type": "VARCHAR(128)",
        "nullable": false,
        "label": "Source Field"
      },
      {
        "name": "TargetField",
        "type": "VARCHAR(128)",
        "nullable": false,
        "label": "Target Field"
      },
      {
        "name": "SourceLookupField",
        "type": "VARCHAR(128)",
        "nullable": true,
        "label": "Source Lookup Field"
      },
      {
        "name": "DefaultValue",
        "type": "TEXT",
        "nullable": true,
        "label": "Default Value"
      },
      {
        "name": "SortOrder",
        "type": "INT",
        "nullable": false,
        "default": "0",
        "label": "Sort Order"
      },
      {
        "name": "IsCustomized",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "label": "Is Customized"
      },
      {
        "name": "Source",
        "type": "VARCHAR(64)",
        "nullable": false,
        "default": "'legacy'",
        "label": "Source",
        "description": "Authoring owner and identity scope for tuple reconciliation. Existing rows are conservatively introduced as 'legacy' until a writer claims matching business keys before reconcile. 'standard' rows are owned by the platform standard field-mapping pack; tenant overlays use tenant-scoped values so partial overlays reconcile only their own rows and never delete standard mappings."
      },
      {
        "name": "IsActive",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "1",
        "label": "Is Active"
      },
      {
        "name": "IsDeleted",
        "type": "TINYINT(1)",
        "nullable": false,
        "default": "0",
        "label": "Is Deleted"
      },
      {
        "name": "CreatedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Created By"
      },
      {
        "name": "LastModifiedById",
        "type": "VARCHAR(255)",
        "nullable": true,
        "label": "Last Modified By"
      },
      {
        "name": "CreatedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Created Date"
      },
      {
        "name": "LastModifiedDate",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP",
        "label": "Last Modified Date"
      }
    ],
    "indices": [
      {
        "name": "uq_ofm_mapping",
        "columns": [
          "Source",
          "SourceObject",
          "TargetObject",
          "ActionType",
          "SourceField"
        ],
        "unique": true
      },
      {
        "name": "idx_ofm_lookup",
        "columns": [
          "SourceObject",
          "TargetObject",
          "ActionType"
        ]
      }
    ],
    "requiredReadPermission": "ViewSetup"
  },
  {
    "tableName": "_System_StandardAction",
    "tableType": "system_metadata",
    "category": "metadata",
    "description": "Registry of standard invocable actions (Salesforce-compatible actions/standard/:name). Each row points at a seeded Flow that implements the action.",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "label": "Id" },
      { "name": "Name", "type": "VARCHAR(128)", "nullable": false, "label": "Action Name" },
      { "name": "Label", "type": "VARCHAR(255)", "nullable": false, "label": "Label" },
      { "name": "Description", "type": "TEXT", "nullable": true, "label": "Description" },
      { "name": "FlowDeveloperName", "type": "VARCHAR(128)", "nullable": false, "label": "Flow Developer Name" },
      { "name": "Category", "type": "VARCHAR(64)", "nullable": true, "label": "Category" },
      { "name": "RequiredPermissions", "type": "TEXT", "nullable": true, "label": "Required Permissions (JSON array)" },
      { "name": "IsAtomic", "type": "TINYINT(1)", "nullable": false, "default": "0", "label": "Run Flow Atomically" },
      { "name": "SortOrder", "type": "INT", "nullable": false, "default": "0", "label": "Sort Order" },
      { "name": "IsCustomized", "type": "TINYINT(1)", "nullable": false, "default": "0", "label": "Is Customized" },
      { "name": "IsActive", "type": "TINYINT(1)", "nullable": false, "default": "1", "label": "Is Active" },
      { "name": "IsDeleted", "type": "TINYINT(1)", "nullable": false, "default": "0", "label": "Is Deleted" },
      { "name": "CreatedById", "type": "VARCHAR(255)", "nullable": true, "label": "Created By" },
      { "name": "TargetObjects", "type": "TEXT", "nullable": true, "label": "Target Objects",
        "description": "JSON array of SObject API names this standard action applies to (e.g. [\"Lead\"] for convertLead). Drives metadata-driven button discovery in the UI: GET /actions/standard returns this field and the frontend filters actions by membership. Admin edits to this column MUST also set IsCustomized=1 to survive pack updates (Label-style pack-content semantics, NOT IsActive-style runtime state)." },
      { "name": "LastModifiedById", "type": "VARCHAR(255)", "nullable": true, "label": "Last Modified By" },
      { "name": "CreatedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "uq_sa_name", "columns": ["Name"], "unique": true },
      { "name": "idx_sa_active", "columns": ["IsActive", "IsDeleted"] }
    ],
    "requiredReadPermission": "ViewSetup"
  },
  {
    "tableName": "_System_ActionSchema",
    "tableType": "system_metadata",
    "category": "metadata",
    "description": "Input and output field descriptors for rows in _System_StandardAction. Mirrors the shape of the Salesforce InvocableAction input/output sObject.",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "label": "Id" },
      { "name": "StandardActionId", "type": "VARCHAR(255)", "nullable": false, "label": "Standard Action Id" },
      { "name": "Direction", "type": "VARCHAR(32)", "nullable": false, "label": "Direction (input/output)" },
      { "name": "APIName", "type": "VARCHAR(128)", "nullable": false, "label": "API Name" },
      { "name": "DataType", "type": "VARCHAR(64)", "nullable": false, "label": "Data Type" },
      { "name": "ReferenceTo", "type": "VARCHAR(128)", "nullable": true, "label": "Reference To" },
      { "name": "Label", "type": "VARCHAR(255)", "nullable": true, "label": "Label",
        "description": "Optional action-input label override. Field-bound inputs normally resolve their label from target field metadata." },
      { "name": "UISection", "type": "VARCHAR(128)", "nullable": true, "label": "UI Section",
        "description": "Generic UI grouping key for standard action inputs, for example the target object section rendered by a modal." },
      { "name": "UIMode", "type": "VARCHAR(32)", "nullable": true, "label": "UI Mode",
        "description": "Generic UI mode for an action input, such as create, reuse, skip, or hidden." },
      { "name": "TargetObject", "type": "VARCHAR(128)", "nullable": true, "label": "Target Object",
        "description": "Target SObject API name for field-bound or lookup inputs." },
      { "name": "TargetFieldAPIName", "type": "VARCHAR(128)", "nullable": true, "label": "Target Field API Name",
        "description": "Target field API name for create-panel field inputs. Null for mode controls and lookup inputs." },
      { "name": "RequiredPicklistTag", "type": "VARCHAR(128)", "nullable": true, "label": "Required Picklist Tag",
        "description": "Optional PicklistOption.Tags value that a supplied action input must carry on the bound target field metadata." },
      { "name": "MappingSourceObject", "type": "VARCHAR(128)", "nullable": true, "label": "Mapping Source Object",
        "description": "Optional source SObject API name used with TargetObject, TargetFieldAPIName, and MappingActionType to project prefill source metadata from _System_ObjectFieldMapping." },
      { "name": "MappingActionType", "type": "VARCHAR(64)", "nullable": true, "label": "Mapping Action Type",
        "description": "Optional _System_ObjectFieldMapping action type used to derive prefill source metadata for a create-panel input." },
      { "name": "IsRequired", "type": "TINYINT(1)", "nullable": false, "default": "0", "label": "Is Required" },
      { "name": "Description", "type": "TEXT", "nullable": true, "label": "Description" },
      { "name": "SortOrder", "type": "INT", "nullable": false, "default": "0", "label": "Sort Order" },
      { "name": "IsCustomized", "type": "TINYINT(1)", "nullable": false, "default": "0", "label": "Is Customized" },
      { "name": "IsActive", "type": "TINYINT(1)", "nullable": false, "default": "1", "label": "Is Active" },
      { "name": "IsDeleted", "type": "TINYINT(1)", "nullable": false, "default": "0", "label": "Is Deleted" },
      { "name": "CreatedById", "type": "VARCHAR(255)", "nullable": true, "label": "Created By" },
      { "name": "LastModifiedById", "type": "VARCHAR(255)", "nullable": true, "label": "Last Modified By" },
      { "name": "CreatedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "uq_as_field", "columns": ["StandardActionId", "Direction", "APIName"], "unique": true },
      { "name": "idx_as_order", "columns": ["StandardActionId", "Direction", "SortOrder"] }
    ],
    "requiredReadPermission": "ViewSetup"
  },
  {
    "tableName": "_System_ActionFieldDefault",
    "tableType": "system_metadata",
    "category": "metadata",
    "label": "Action Field Default",
    "description": "Default-value formulas applied by a standard action AFTER Flow inputAssignments run, and only to fields still absent from the record map (stage 3 of the recordCreate pipeline documented in executor_record_ops.go). Priority resolves conflicts when multiple rows match within (TargetObject, FieldAPIName); higher Priority wins.",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "label": "Id" },
      { "name": "StandardActionId", "type": "VARCHAR(255)", "nullable": false, "label": "Standard Action Id" },
      { "name": "TargetObject", "type": "VARCHAR(128)", "nullable": false, "label": "Target Object" },
      { "name": "FieldAPIName", "type": "VARCHAR(128)", "nullable": false, "label": "Field API Name" },
      { "name": "ValueFormula", "type": "TEXT", "nullable": false, "label": "Value Formula" },
      { "name": "Condition", "type": "TEXT", "nullable": true, "label": "Condition Formula" },
      { "name": "Priority", "type": "INT", "nullable": false, "default": "0", "label": "Priority" },
      { "name": "IsCustomized", "type": "TINYINT(1)", "nullable": false, "default": "0", "label": "Is Customized" },
      { "name": "IsActive", "type": "TINYINT(1)", "nullable": false, "default": "1", "label": "Is Active" },
      { "name": "IsDeleted", "type": "TINYINT(1)", "nullable": false, "default": "0", "label": "Is Deleted" },
      { "name": "CreatedById", "type": "VARCHAR(255)", "nullable": true, "label": "Created By" },
      { "name": "LastModifiedById", "type": "VARCHAR(255)", "nullable": true, "label": "Last Modified By" },
      { "name": "CreatedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "uq_afd_key", "columns": ["StandardActionId", "TargetObject", "FieldAPIName", "Priority"], "unique": true },
      { "name": "idx_afd_target", "columns": ["StandardActionId", "TargetObject"] }
    ],
    "requiredReadPermission": "ViewSetup"
  },
  {
    "tableName": "_System_ActionInputGuard",
    "tableType": "system_metadata",
    "category": "metadata",
    "description": "Conditional permission and object CRUD guards evaluated by the generic standard-action dispatcher before invoking the Flow. Replaces hardcoded per-action permission branching.",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "label": "Id" },
      { "name": "StandardActionId", "type": "VARCHAR(255)", "nullable": false, "label": "Standard Action Id" },
      { "name": "Condition", "type": "VARCHAR(255)", "nullable": false, "label": "Condition Formula" },
      { "name": "GuardKey", "type": "VARCHAR(255)", "nullable": false, "default": "", "label": "Guard Key",
        "description": "Synthetic stable key for the guard target, e.g. permission:SkipOpportunityOnConvert or object:Account:Create. Used only for idempotent pack upsert/reconcile identity." },
      { "name": "RequiredPermission", "type": "VARCHAR(128)", "nullable": true, "label": "Required Permission" },
      { "name": "RequiredObject", "type": "VARCHAR(128)", "nullable": true, "label": "Required Object" },
      { "name": "RequiredOperation", "type": "VARCHAR(32)", "nullable": true, "label": "Required Operation" },
      { "name": "ErrorMessage", "type": "TEXT", "nullable": true, "label": "Error Message" },
      { "name": "GatedInput", "type": "VARCHAR(128)", "nullable": true, "label": "Gated Input",
        "description": "APIName of the action input or mode-control input this guard targets. Used by GET /actions/standard to expose a per-caller verdict for rendering the matching input path. If blank, the guard is a whole-action precondition rather than an input-rendering verdict." },
      { "name": "SortOrder", "type": "INT", "nullable": false, "default": "0", "label": "Sort Order" },
      { "name": "IsCustomized", "type": "TINYINT(1)", "nullable": false, "default": "0", "label": "Is Customized" },
      { "name": "IsActive", "type": "TINYINT(1)", "nullable": false, "default": "1", "label": "Is Active" },
      { "name": "IsDeleted", "type": "TINYINT(1)", "nullable": false, "default": "0", "label": "Is Deleted" },
      { "name": "CreatedById", "type": "VARCHAR(255)", "nullable": true, "label": "Created By" },
      { "name": "LastModifiedById", "type": "VARCHAR(255)", "nullable": true, "label": "Last Modified By" },
      { "name": "CreatedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "uq_aig_rule", "columns": ["StandardActionId", "Condition", "GuardKey"], "unique": true },
      { "name": "idx_aig_action", "columns": ["StandardActionId", "IsActive", "IsDeleted", "SortOrder"] }
    ],
    "requiredReadPermission": "ViewSetup"
  },
  {
    "tableName": "_System_StandardActionInternalAccessScope",
    "tableType": "system_metadata",
    "category": "metadata",
    "label": "Standard Action Internal Access Scope",
    "description": "Metadata-owned access scopes for standard-action bookkeeping reads and writes. The generic dispatcher stamps active rows on the action context; query and persistence paths may widen read/RLS visibility or bypass user object CRUD/FLS only for the matching action, object, and operation.",
    "columns": [
      { "name": "Id", "type": "VARCHAR(255)", "primaryKey": true, "label": "Id" },
      { "name": "StandardActionId", "type": "VARCHAR(255)", "nullable": false, "label": "Standard Action Id" },
      { "name": "ObjectApiName", "type": "VARCHAR(128)", "nullable": false, "label": "Object API Name" },
      { "name": "Operation", "type": "VARCHAR(32)", "nullable": false, "label": "Operation" },
      { "name": "Reason", "type": "TEXT", "nullable": true, "label": "Reason" },
      { "name": "IsActive", "type": "TINYINT(1)", "nullable": false, "default": "1", "label": "Is Active" },
      { "name": "IsDeleted", "type": "TINYINT(1)", "nullable": false, "default": "0", "label": "Is Deleted" },
      { "name": "CreatedById", "type": "VARCHAR(255)", "nullable": true, "label": "Created By" },
      { "name": "LastModifiedById", "type": "VARCHAR(255)", "nullable": true, "label": "Last Modified By" },
      { "name": "CreatedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Created Date" },
      { "name": "LastModifiedDate", "type": "DATETIME", "nullable": false, "default": "CURRENT_TIMESTAMP", "label": "Last Modified Date" }
    ],
    "indices": [
      { "name": "uq_saias_scope", "columns": ["StandardActionId", "ObjectApiName", "Operation"], "unique": true },
      { "name": "idx_saias_action", "columns": ["StandardActionId", "IsActive", "IsDeleted"] }
    ],
    "requiredReadPermission": "ViewSetup"
  },
  {
    "tableName": "_System_WorkflowAlert",
    "tableType": "system_automation",
    "sharingModel": "PublicReadWrite",
    "category": "automation",
    "label": "Workflow Email Alert",
    "description": "Reusable email alert definitions with recipients, sender, and template configuration. Referenced by ProcessAction.ApiName for approval and workflow automation.",
    "columns": [
      {
        "name": "Id",
        "label": "Record ID",
        "type": "VARCHAR(255)",
        "primaryKey": true
      },
      {
        "name": "ObjectApiName",
        "label": "Object API Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "description": "The SObject this alert is associated with"
      },
      {
        "name": "Name",
        "label": "Name",
        "type": "VARCHAR(255)",
        "nullable": false,
        "isNameField": true,
        "description": "Developer name (unique identifier, used as join key from ProcessAction.ApiName)"
      },
      {
        "name": "Description",
        "label": "Description",
        "type": "TEXT",
        "nullable": true
      },
      {
        "name": "Template",
        "label": "Email Template",
        "type": "VARCHAR(255)",
        "nullable": true,
        "description": "Email template reference (ID or folder/name path)"
      },
      {
        "name": "SenderType",
        "label": "Sender Type",
        "type": "VARCHAR(50)",
        "nullable": true,
        "description": "CurrentUser, OrgWideEmailAddress, or DefaultWorkflowUser"
      },
      {
        "name": "SenderAddress",
        "label": "Sender Address",
        "type": "VARCHAR(255)",
        "nullable": true,
        "description": "Email address for OrgWideEmailAddress sender type"
      },
      {
        "name": "Recipients",
        "label": "Recipients",
        "type": "TEXT",
        "nullable": true,
        "description": "JSON array of recipient entries, e.g. [{\"type\":\"user\",\"recipient\":\"email\"},{\"type\":\"owner\"}]"
      },
      {
        "name": "CcEmails",
        "label": "CC Emails",
        "type": "TEXT",
        "nullable": true,
        "description": "Comma-separated CC email addresses"
      },
      {
        "name": "CreatedDate",
        "label": "Created Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      },
      {
        "name": "LastModifiedDate",
        "label": "Last Modified Date",
        "type": "DATETIME",
        "nullable": false,
        "default": "CURRENT_TIMESTAMP"
      }
    ],
    "indices": [
      {
        "columns": [
          "ObjectApiName"
        ]
      },
      {
        "columns": [
          "Name"
        ],
        "unique": true
      }
    ],
    "skipStructGen": true
  }
]
