{
  "version": "v1",
  "scope": "dados:read",
  "tableCount": 37,
  "fieldCount": 371,
  "tables": [
    {
      "name": "audit_events",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "audit_event_id",
        "organization_id",
        "user_id",
        "action",
        "entity_type",
        "entity_id",
        "before_data",
        "after_data",
        "ip_address",
        "user_agent",
        "occurred_at"
      ],
      "primaryKey": [
        "audit_event_id"
      ],
      "columns": [
        {
          "name": "audit_event_id",
          "type": "bigint",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "organization_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "user_id",
          "type": "uuid",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "action",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "entity_type",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "entity_id",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "before_data",
          "type": "jsonb",
          "nullable": true,
          "available": true,
          "operators": [
            "isNull"
          ],
          "jsonType": "JSON"
        },
        {
          "name": "after_data",
          "type": "jsonb",
          "nullable": true,
          "available": true,
          "operators": [
            "isNull"
          ],
          "jsonType": "JSON"
        },
        {
          "name": "ip_address",
          "type": "inet",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "user_agent",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "occurred_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [
        {
          "column": "organization_id",
          "targetTable": "organizations",
          "targetColumn": "organization_id"
        },
        {
          "column": "user_id",
          "targetTable": "users",
          "targetColumn": "user_id"
        }
      ],
      "notes": [
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "bulk_operations",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "bulk_operation_id",
        "organization_id",
        "created_by",
        "filters",
        "changes",
        "affected_rows",
        "status",
        "created_at"
      ],
      "primaryKey": [
        "bulk_operation_id"
      ],
      "columns": [
        {
          "name": "bulk_operation_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "organization_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "created_by",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "filters",
          "type": "jsonb",
          "nullable": false,
          "available": true,
          "operators": [
            "isNull"
          ],
          "jsonType": "JSON"
        },
        {
          "name": "changes",
          "type": "jsonb",
          "nullable": false,
          "available": true,
          "operators": [
            "isNull"
          ],
          "jsonType": "JSON"
        },
        {
          "name": "affected_rows",
          "type": "integer",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "integer"
        },
        {
          "name": "status",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [
        {
          "column": "created_by",
          "targetTable": "users",
          "targetColumn": "user_id"
        },
        {
          "column": "organization_id",
          "targetTable": "organizations",
          "targetColumn": "organization_id"
        }
      ],
      "notes": [
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "campaign_documents",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "campaign_document_id",
        "organization_id",
        "campaign_id",
        "document_type_id",
        "uploaded_by",
        "file_name",
        "mime_type",
        "file_size",
        "created_at",
        "deleted_at",
        "deleted_by"
      ],
      "primaryKey": [
        "campaign_document_id"
      ],
      "columns": [
        {
          "name": "campaign_document_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "organization_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "campaign_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "document_type_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "uploaded_by",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "file_name",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "mime_type",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "file_size",
          "type": "integer",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "integer"
        },
        {
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "deleted_at",
          "type": "timestamp with time zone",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "deleted_by",
          "type": "uuid",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [
        {
          "column": "campaign_id",
          "targetTable": "campaigns",
          "targetColumn": "campaign_id"
        },
        {
          "column": "deleted_by",
          "targetTable": "users",
          "targetColumn": "user_id"
        },
        {
          "column": "document_type_id",
          "targetTable": "document_types",
          "targetColumn": "document_type_id"
        },
        {
          "column": "organization_id",
          "targetTable": "organizations",
          "targetColumn": "organization_id"
        },
        {
          "column": "uploaded_by",
          "targetTable": "users",
          "targetColumn": "user_id"
        }
      ],
      "notes": [
        "Inclui registros com exclusão lógica; filtre deleted_at quando necessário.",
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "campaigns",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "campaign_id",
        "organization_id",
        "product_id",
        "name",
        "status",
        "category",
        "partner",
        "partner_percentage",
        "settings",
        "active",
        "created_at",
        "updated_at",
        "commercial_strategy",
        "campaign_notes",
        "process_number"
      ],
      "primaryKey": [
        "campaign_id"
      ],
      "columns": [
        {
          "name": "campaign_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "organization_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "product_id",
          "type": "uuid",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "name",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "status",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "category",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "partner",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "partner_percentage",
          "type": "numeric",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "settings",
          "type": "jsonb",
          "nullable": false,
          "available": true,
          "operators": [
            "isNull"
          ],
          "jsonType": "JSON"
        },
        {
          "name": "active",
          "type": "boolean",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "in",
            "isNull"
          ],
          "jsonType": "boolean"
        },
        {
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "commercial_strategy",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "campaign_notes",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "process_number",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [
        {
          "column": "organization_id",
          "targetTable": "organizations",
          "targetColumn": "organization_id"
        },
        {
          "column": "product_id",
          "targetTable": "products",
          "targetColumn": "product_id"
        }
      ],
      "notes": [
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "document_types",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "document_type_id",
        "organization_id",
        "description",
        "active",
        "created_at",
        "updated_at"
      ],
      "primaryKey": [
        "document_type_id"
      ],
      "columns": [
        {
          "name": "document_type_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "organization_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "description",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "active",
          "type": "boolean",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "in",
            "isNull"
          ],
          "jsonType": "boolean"
        },
        {
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [
        {
          "column": "organization_id",
          "targetTable": "organizations",
          "targetColumn": "organization_id"
        }
      ],
      "notes": [
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "generated_documents",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "generated_document_id",
        "prospect_id",
        "generated_by",
        "document_type",
        "template_name",
        "template_version",
        "storage_key",
        "status",
        "generated_at",
        "approved_by",
        "approved_at",
        "sent_at"
      ],
      "primaryKey": [
        "generated_document_id"
      ],
      "columns": [
        {
          "name": "generated_document_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "prospect_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "generated_by",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "document_type",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "template_name",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "template_version",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "storage_key",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "status",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "generated_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "approved_by",
          "type": "uuid",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "approved_at",
          "type": "timestamp with time zone",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "sent_at",
          "type": "timestamp with time zone",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [
        {
          "column": "approved_by",
          "targetTable": "users",
          "targetColumn": "user_id"
        },
        {
          "column": "generated_by",
          "targetTable": "users",
          "targetColumn": "user_id"
        },
        {
          "column": "prospect_id",
          "targetTable": "prospects",
          "targetColumn": "prospect_id"
        }
      ],
      "notes": [
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "import_batch_reviews",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "import_batch_id",
        "organization_id",
        "created_by",
        "review_data",
        "revision",
        "created_at"
      ],
      "primaryKey": [
        "import_batch_id"
      ],
      "columns": [
        {
          "name": "import_batch_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "organization_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "created_by",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "review_data",
          "type": "jsonb",
          "nullable": false,
          "available": true,
          "operators": [
            "isNull"
          ],
          "jsonType": "JSON"
        },
        {
          "name": "revision",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [
        {
          "column": "created_by",
          "targetTable": "users",
          "targetColumn": "user_id"
        },
        {
          "column": "import_batch_id",
          "targetTable": "import_batches",
          "targetColumn": "import_batch_id"
        },
        {
          "column": "organization_id",
          "targetTable": "organizations",
          "targetColumn": "organization_id"
        }
      ],
      "notes": [
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "import_batch_rows",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "import_batch_row_id",
        "import_batch_id",
        "row_number",
        "action",
        "source_key",
        "source_data",
        "normalized_data",
        "changes",
        "errors",
        "prospect_id",
        "applied_at"
      ],
      "primaryKey": [
        "import_batch_row_id"
      ],
      "columns": [
        {
          "name": "import_batch_row_id",
          "type": "bigint",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "import_batch_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "row_number",
          "type": "integer",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "integer"
        },
        {
          "name": "action",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "source_key",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "source_data",
          "type": "jsonb",
          "nullable": false,
          "available": true,
          "operators": [
            "isNull"
          ],
          "jsonType": "JSON"
        },
        {
          "name": "normalized_data",
          "type": "jsonb",
          "nullable": true,
          "available": true,
          "operators": [
            "isNull"
          ],
          "jsonType": "JSON"
        },
        {
          "name": "changes",
          "type": "jsonb",
          "nullable": true,
          "available": true,
          "operators": [
            "isNull"
          ],
          "jsonType": "JSON"
        },
        {
          "name": "errors",
          "type": "jsonb",
          "nullable": false,
          "available": true,
          "operators": [
            "isNull"
          ],
          "jsonType": "JSON"
        },
        {
          "name": "prospect_id",
          "type": "uuid",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "applied_at",
          "type": "timestamp with time zone",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [
        {
          "column": "import_batch_id",
          "targetTable": "import_batches",
          "targetColumn": "import_batch_id"
        },
        {
          "column": "prospect_id",
          "targetTable": "prospects",
          "targetColumn": "prospect_id"
        }
      ],
      "notes": [
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "import_batches",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "import_batch_id",
        "organization_id",
        "campaign_id",
        "imported_by",
        "file_name",
        "file_sha256",
        "source_type",
        "status",
        "total_rows",
        "successful_rows",
        "failed_rows",
        "created_at",
        "completed_at"
      ],
      "primaryKey": [
        "import_batch_id"
      ],
      "columns": [
        {
          "name": "import_batch_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "organization_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "campaign_id",
          "type": "uuid",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "imported_by",
          "type": "uuid",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "file_name",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "file_sha256",
          "type": "character",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "source_type",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "status",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "total_rows",
          "type": "integer",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "integer"
        },
        {
          "name": "successful_rows",
          "type": "integer",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "integer"
        },
        {
          "name": "failed_rows",
          "type": "integer",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "integer"
        },
        {
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "completed_at",
          "type": "timestamp with time zone",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [
        {
          "column": "campaign_id",
          "targetTable": "campaigns",
          "targetColumn": "campaign_id"
        },
        {
          "column": "imported_by",
          "targetTable": "users",
          "targetColumn": "user_id"
        },
        {
          "column": "organization_id",
          "targetTable": "organizations",
          "targetColumn": "organization_id"
        }
      ],
      "notes": [
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "import_contact_lookups",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "import_batch_id",
        "document_normalized",
        "organization_id",
        "status",
        "result",
        "queried_at",
        "started_at",
        "error",
        "lease"
      ],
      "primaryKey": [
        "import_batch_id",
        "document_normalized"
      ],
      "columns": [
        {
          "name": "import_batch_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "document_normalized",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "organization_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "status",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "result",
          "type": "jsonb",
          "nullable": true,
          "available": true,
          "operators": [
            "isNull"
          ],
          "jsonType": "JSON"
        },
        {
          "name": "queried_at",
          "type": "timestamp with time zone",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "started_at",
          "type": "timestamp with time zone",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "error",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "lease",
          "type": "uuid",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [
        {
          "column": "import_batch_id",
          "targetTable": "import_batches",
          "targetColumn": "import_batch_id"
        },
        {
          "column": "organization_id",
          "targetTable": "organizations",
          "targetColumn": "organization_id"
        }
      ],
      "notes": [
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "migration_sources",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "migration_source_id",
        "prospect_id",
        "source_type",
        "source_key",
        "extracted_at",
        "source_payload",
        "source_sha256",
        "imported_at"
      ],
      "primaryKey": [
        "migration_source_id"
      ],
      "columns": [
        {
          "name": "migration_source_id",
          "type": "bigint",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "prospect_id",
          "type": "uuid",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "source_type",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "source_key",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "extracted_at",
          "type": "timestamp with time zone",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "source_payload",
          "type": "jsonb",
          "nullable": true,
          "available": true,
          "operators": [
            "isNull"
          ],
          "jsonType": "JSON"
        },
        {
          "name": "source_sha256",
          "type": "character",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "imported_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [
        {
          "column": "prospect_id",
          "targetTable": "prospects",
          "targetColumn": "prospect_id"
        }
      ],
      "notes": [
        "Registros sem prospect_id não têm organização comprovável e não são expostos.",
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "organizations",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "organization_id",
        "name",
        "active",
        "created_at",
        "updated_at"
      ],
      "primaryKey": [
        "organization_id"
      ],
      "columns": [
        {
          "name": "organization_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "name",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "active",
          "type": "boolean",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "in",
            "isNull"
          ],
          "jsonType": "boolean"
        },
        {
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [],
      "notes": [
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "permissions",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "permission_id",
        "resource",
        "action"
      ],
      "primaryKey": [
        "permission_id"
      ],
      "columns": [
        {
          "name": "permission_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "resource",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "action",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [],
      "notes": [
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "phone_contact_attempts",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "phone_contact_attempt_id",
        "prospect_id",
        "phone_id",
        "user_id",
        "result",
        "notes",
        "attempted_at",
        "generated_interaction_id"
      ],
      "primaryKey": [
        "phone_contact_attempt_id"
      ],
      "columns": [
        {
          "name": "phone_contact_attempt_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "prospect_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "phone_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "user_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "result",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "notes",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "attempted_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "generated_interaction_id",
          "type": "uuid",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [
        {
          "column": "generated_interaction_id",
          "targetTable": "prospect_interactions",
          "targetColumn": "interaction_id"
        },
        {
          "column": "phone_id",
          "targetTable": "prospect_phones",
          "targetColumn": "phone_id"
        },
        {
          "column": "prospect_id",
          "targetTable": "prospects",
          "targetColumn": "prospect_id"
        },
        {
          "column": "user_id",
          "targetTable": "users",
          "targetColumn": "user_id"
        }
      ],
      "notes": [
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "products",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "product_id",
        "organization_id",
        "name",
        "active"
      ],
      "primaryKey": [
        "product_id"
      ],
      "columns": [
        {
          "name": "product_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "organization_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "name",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "active",
          "type": "boolean",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "in",
            "isNull"
          ],
          "jsonType": "boolean"
        }
      ],
      "relations": [
        {
          "column": "organization_id",
          "targetTable": "organizations",
          "targetColumn": "organization_id"
        }
      ],
      "notes": [
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "prospect_contact_lookups",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "prospect_id",
        "organization_id",
        "document_normalized",
        "result",
        "related_contacts",
        "queried_at",
        "revision"
      ],
      "primaryKey": [
        "prospect_id"
      ],
      "columns": [
        {
          "name": "prospect_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "organization_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "document_normalized",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "result",
          "type": "jsonb",
          "nullable": false,
          "available": true,
          "operators": [
            "isNull"
          ],
          "jsonType": "JSON"
        },
        {
          "name": "related_contacts",
          "type": "jsonb",
          "nullable": false,
          "available": true,
          "operators": [
            "isNull"
          ],
          "jsonType": "JSON"
        },
        {
          "name": "queried_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "revision",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [
        {
          "column": "organization_id",
          "targetTable": "organizations",
          "targetColumn": "organization_id"
        },
        {
          "column": "prospect_id",
          "targetTable": "prospects",
          "targetColumn": "prospect_id"
        }
      ],
      "notes": [
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "prospect_documents",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "prospect_document_id",
        "organization_id",
        "prospect_id",
        "document_type_id",
        "uploaded_by",
        "file_name",
        "mime_type",
        "file_size",
        "created_at",
        "deleted_at",
        "deleted_by"
      ],
      "primaryKey": [
        "prospect_document_id"
      ],
      "columns": [
        {
          "name": "prospect_document_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "organization_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "prospect_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "document_type_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "uploaded_by",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "file_name",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "mime_type",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "file_size",
          "type": "integer",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "integer"
        },
        {
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "deleted_at",
          "type": "timestamp with time zone",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "deleted_by",
          "type": "uuid",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [
        {
          "column": "deleted_by",
          "targetTable": "users",
          "targetColumn": "user_id"
        },
        {
          "column": "document_type_id",
          "targetTable": "document_types",
          "targetColumn": "document_type_id"
        },
        {
          "column": "organization_id",
          "targetTable": "organizations",
          "targetColumn": "organization_id"
        },
        {
          "column": "prospect_id",
          "targetTable": "prospects",
          "targetColumn": "prospect_id"
        },
        {
          "column": "uploaded_by",
          "targetTable": "users",
          "targetColumn": "user_id"
        }
      ],
      "notes": [
        "Inclui registros com exclusão lógica; filtre deleted_at quando necessário.",
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "prospect_emails",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "email_id",
        "prospect_id",
        "source_order",
        "address_raw",
        "normalized_address",
        "legacy_valid",
        "current_status",
        "is_primary",
        "source",
        "last_validated_at",
        "created_at",
        "updated_at",
        "deleted_at",
        "deleted_by"
      ],
      "primaryKey": [
        "email_id"
      ],
      "columns": [
        {
          "name": "email_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "prospect_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "source_order",
          "type": "integer",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "integer"
        },
        {
          "name": "address_raw",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "normalized_address",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "legacy_valid",
          "type": "boolean",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "in",
            "isNull"
          ],
          "jsonType": "boolean"
        },
        {
          "name": "current_status",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "is_primary",
          "type": "boolean",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "in",
            "isNull"
          ],
          "jsonType": "boolean"
        },
        {
          "name": "source",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "last_validated_at",
          "type": "timestamp with time zone",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "deleted_at",
          "type": "timestamp with time zone",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "deleted_by",
          "type": "uuid",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [
        {
          "column": "deleted_by",
          "targetTable": "users",
          "targetColumn": "user_id"
        },
        {
          "column": "prospect_id",
          "targetTable": "prospects",
          "targetColumn": "prospect_id"
        }
      ],
      "notes": [
        "Inclui registros com exclusão lógica; filtre deleted_at quando necessário.",
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "prospect_financial_movement_documents",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "movement_id",
        "prospect_document_id"
      ],
      "primaryKey": [
        "movement_id",
        "prospect_document_id"
      ],
      "columns": [
        {
          "name": "movement_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "prospect_document_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [
        {
          "column": "movement_id",
          "targetTable": "prospect_financial_movements",
          "targetColumn": "movement_id"
        },
        {
          "column": "prospect_document_id",
          "targetTable": "prospect_documents",
          "targetColumn": "prospect_document_id"
        }
      ],
      "notes": [
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "prospect_financial_movements",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "movement_id",
        "prospect_id",
        "kind",
        "occurred_on",
        "amount",
        "beneficiary",
        "notes",
        "from_opening",
        "created_by",
        "updated_by",
        "created_at",
        "updated_at",
        "deleted_at"
      ],
      "primaryKey": [
        "movement_id"
      ],
      "columns": [
        {
          "name": "movement_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "prospect_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "kind",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "occurred_on",
          "type": "date",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "amount",
          "type": "numeric",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "beneficiary",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "notes",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "from_opening",
          "type": "boolean",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "in",
            "isNull"
          ],
          "jsonType": "boolean"
        },
        {
          "name": "created_by",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "updated_by",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "deleted_at",
          "type": "timestamp with time zone",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [
        {
          "column": "created_by",
          "targetTable": "users",
          "targetColumn": "user_id"
        },
        {
          "column": "prospect_id",
          "targetTable": "prospects",
          "targetColumn": "prospect_id"
        },
        {
          "column": "updated_by",
          "targetTable": "users",
          "targetColumn": "user_id"
        }
      ],
      "notes": [
        "Inclui registros com exclusão lógica; filtre deleted_at quando necessário.",
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "prospect_financial_profiles",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "prospect_id",
        "details",
        "revision",
        "ledger_initialized",
        "opening_paid",
        "opening_received",
        "opening_paid_at",
        "opening_received_at",
        "updated_at"
      ],
      "primaryKey": [
        "prospect_id"
      ],
      "columns": [
        {
          "name": "prospect_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "details",
          "type": "jsonb",
          "nullable": false,
          "available": true,
          "operators": [
            "isNull"
          ],
          "jsonType": "JSON"
        },
        {
          "name": "revision",
          "type": "bigint",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "ledger_initialized",
          "type": "boolean",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "in",
            "isNull"
          ],
          "jsonType": "boolean"
        },
        {
          "name": "opening_paid",
          "type": "numeric",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "opening_received",
          "type": "numeric",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "opening_paid_at",
          "type": "date",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "opening_received_at",
          "type": "date",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [
        {
          "column": "prospect_id",
          "targetTable": "prospects",
          "targetColumn": "prospect_id"
        }
      ],
      "notes": [
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "prospect_financial_totals",
      "kind": "VIEW",
      "available": true,
      "fields": [
        "prospect_id",
        "creditor_paid",
        "lawyer_paid",
        "origination_paid",
        "other_paid",
        "payments",
        "receipts",
        "allocated_paid",
        "allocated_received",
        "last_paid_at",
        "last_lawyer_paid_at",
        "last_received_at"
      ],
      "primaryKey": [
        "prospect_id"
      ],
      "columns": [
        {
          "name": "prospect_id",
          "type": "uuid",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "creditor_paid",
          "type": "numeric",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "lawyer_paid",
          "type": "numeric",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "origination_paid",
          "type": "numeric",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "other_paid",
          "type": "numeric",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "payments",
          "type": "numeric",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "receipts",
          "type": "numeric",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "allocated_paid",
          "type": "numeric",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "allocated_received",
          "type": "numeric",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "last_paid_at",
          "type": "date",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "last_lawyer_paid_at",
          "type": "date",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "last_received_at",
          "type": "date",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [
        {
          "column": "prospect_id",
          "targetTable": "prospects",
          "targetColumn": "prospect_id"
        }
      ],
      "notes": [
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "prospect_interactions",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "interaction_id",
        "prospect_id",
        "user_id",
        "legacy_user",
        "interaction_type",
        "occurred_at",
        "occurred_date",
        "occurred_time",
        "notes",
        "pages_reference",
        "situation",
        "created_at_legacy",
        "priority",
        "completed",
        "source",
        "source_order",
        "created_at",
        "deleted_at",
        "deleted_by"
      ],
      "primaryKey": [
        "interaction_id"
      ],
      "columns": [
        {
          "name": "interaction_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "prospect_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "user_id",
          "type": "uuid",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "legacy_user",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "interaction_type",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "occurred_at",
          "type": "timestamp with time zone",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "occurred_date",
          "type": "date",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "occurred_time",
          "type": "time without time zone",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "notes",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "pages_reference",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "situation",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "created_at_legacy",
          "type": "timestamp with time zone",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "priority",
          "type": "boolean",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "in",
            "isNull"
          ],
          "jsonType": "boolean"
        },
        {
          "name": "completed",
          "type": "boolean",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "in",
            "isNull"
          ],
          "jsonType": "boolean"
        },
        {
          "name": "source",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "source_order",
          "type": "integer",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "integer"
        },
        {
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "deleted_at",
          "type": "timestamp with time zone",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "deleted_by",
          "type": "uuid",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [
        {
          "column": "deleted_by",
          "targetTable": "users",
          "targetColumn": "user_id"
        },
        {
          "column": "prospect_id",
          "targetTable": "prospects",
          "targetColumn": "prospect_id"
        },
        {
          "column": "user_id",
          "targetTable": "users",
          "targetColumn": "user_id"
        }
      ],
      "notes": [
        "Inclui registros com exclusão lógica; filtre deleted_at quando necessário.",
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "prospect_phones",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "phone_id",
        "prospect_id",
        "source_order",
        "area_code_raw",
        "number_raw",
        "normalized_number",
        "legacy_valid",
        "legacy_preferred",
        "legacy_advogado_flag",
        "current_status",
        "is_primary",
        "has_whatsapp",
        "source",
        "last_validated_at",
        "created_at",
        "updated_at",
        "deleted_at",
        "deleted_by"
      ],
      "primaryKey": [
        "phone_id"
      ],
      "columns": [
        {
          "name": "phone_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "prospect_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "source_order",
          "type": "integer",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "integer"
        },
        {
          "name": "area_code_raw",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "number_raw",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "normalized_number",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "legacy_valid",
          "type": "boolean",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "in",
            "isNull"
          ],
          "jsonType": "boolean"
        },
        {
          "name": "legacy_preferred",
          "type": "boolean",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "in",
            "isNull"
          ],
          "jsonType": "boolean"
        },
        {
          "name": "legacy_advogado_flag",
          "type": "boolean",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "in",
            "isNull"
          ],
          "jsonType": "boolean"
        },
        {
          "name": "current_status",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "is_primary",
          "type": "boolean",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "in",
            "isNull"
          ],
          "jsonType": "boolean"
        },
        {
          "name": "has_whatsapp",
          "type": "boolean",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "in",
            "isNull"
          ],
          "jsonType": "boolean"
        },
        {
          "name": "source",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "last_validated_at",
          "type": "timestamp with time zone",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "deleted_at",
          "type": "timestamp with time zone",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "deleted_by",
          "type": "uuid",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [
        {
          "column": "deleted_by",
          "targetTable": "users",
          "targetColumn": "user_id"
        },
        {
          "column": "prospect_id",
          "targetTable": "prospects",
          "targetColumn": "prospect_id"
        }
      ],
      "notes": [
        "Inclui registros com exclusão lógica; filtre deleted_at quando necessário.",
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "prospect_values",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "prospect_id",
        "proposal_amount",
        "receivable_amount",
        "acquisition_amount",
        "closing_amount",
        "paid_amount",
        "received_amount",
        "historical_amount",
        "settlement_amount",
        "maximum_proposal_amount",
        "proposed_at",
        "signed_at",
        "paid_at",
        "received_at",
        "payment_term_days",
        "updated_at"
      ],
      "primaryKey": [
        "prospect_id"
      ],
      "columns": [
        {
          "name": "prospect_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "proposal_amount",
          "type": "numeric",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "receivable_amount",
          "type": "numeric",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "acquisition_amount",
          "type": "numeric",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "closing_amount",
          "type": "numeric",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "paid_amount",
          "type": "numeric",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "received_amount",
          "type": "numeric",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "historical_amount",
          "type": "numeric",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "settlement_amount",
          "type": "numeric",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "maximum_proposal_amount",
          "type": "numeric",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "proposed_at",
          "type": "date",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "signed_at",
          "type": "date",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "paid_at",
          "type": "date",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "received_at",
          "type": "date",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "payment_term_days",
          "type": "integer",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "integer"
        },
        {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [
        {
          "column": "prospect_id",
          "targetTable": "prospects",
          "targetColumn": "prospect_id"
        }
      ],
      "notes": [
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "prospects",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "prospect_id",
        "organization_id",
        "campaign_id",
        "import_batch_id",
        "legacy_contact_prospect_id",
        "legacy_prospect_id",
        "legacy_contact_id",
        "source_state",
        "creditor_name",
        "document_raw",
        "document_normalized",
        "document_type",
        "document_valid",
        "class_name",
        "category",
        "group_name",
        "situation",
        "workflow_status",
        "campaign_status_legacy",
        "owner_code_legacy",
        "owner_name_legacy",
        "closer_code_legacy",
        "closing_owner_legacy",
        "credit_risk",
        "payment_type",
        "procedural_strategy",
        "assignee",
        "office",
        "partner",
        "above_65",
        "campaign_notes",
        "historico_followups_incompleto",
        "contatos_incompletos",
        "created_at_legacy",
        "status_changed_at",
        "first_interaction_at",
        "created_at",
        "updated_at",
        "archived_at",
        "assigned_user_id",
        "situation_updated_by",
        "partner_percentage",
        "commercial_strategy",
        "cessionary"
      ],
      "primaryKey": [
        "prospect_id"
      ],
      "columns": [
        {
          "name": "prospect_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "organization_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "campaign_id",
          "type": "uuid",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "import_batch_id",
          "type": "uuid",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "legacy_contact_prospect_id",
          "type": "bigint",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "legacy_prospect_id",
          "type": "bigint",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "legacy_contact_id",
          "type": "bigint",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "source_state",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "creditor_name",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "document_raw",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "document_normalized",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "document_type",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "document_valid",
          "type": "boolean",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "in",
            "isNull"
          ],
          "jsonType": "boolean"
        },
        {
          "name": "class_name",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "category",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "group_name",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "situation",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "workflow_status",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "campaign_status_legacy",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "owner_code_legacy",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "owner_name_legacy",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "closer_code_legacy",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "closing_owner_legacy",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "credit_risk",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "payment_type",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "procedural_strategy",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "assignee",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "office",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "partner",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "above_65",
          "type": "boolean",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "in",
            "isNull"
          ],
          "jsonType": "boolean"
        },
        {
          "name": "campaign_notes",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "historico_followups_incompleto",
          "type": "boolean",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "in",
            "isNull"
          ],
          "jsonType": "boolean"
        },
        {
          "name": "contatos_incompletos",
          "type": "boolean",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "in",
            "isNull"
          ],
          "jsonType": "boolean"
        },
        {
          "name": "created_at_legacy",
          "type": "timestamp with time zone",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "status_changed_at",
          "type": "timestamp with time zone",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "first_interaction_at",
          "type": "timestamp with time zone",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "archived_at",
          "type": "timestamp with time zone",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "assigned_user_id",
          "type": "uuid",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "situation_updated_by",
          "type": "uuid",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "partner_percentage",
          "type": "numeric",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "commercial_strategy",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "cessionary",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [
        {
          "column": "assigned_user_id",
          "targetTable": "users",
          "targetColumn": "user_id"
        },
        {
          "column": "campaign_id",
          "targetTable": "campaigns",
          "targetColumn": "campaign_id"
        },
        {
          "column": "import_batch_id",
          "targetTable": "import_batches",
          "targetColumn": "import_batch_id"
        },
        {
          "column": "organization_id",
          "targetTable": "organizations",
          "targetColumn": "organization_id"
        },
        {
          "column": "situation_updated_by",
          "targetTable": "users",
          "targetColumn": "user_id"
        }
      ],
      "notes": [
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "queue_notifications",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "notification_id",
        "organization_id",
        "user_id",
        "prospect_id",
        "entered_at",
        "seen_at"
      ],
      "primaryKey": [
        "notification_id"
      ],
      "columns": [
        {
          "name": "notification_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "organization_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "user_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "prospect_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "entered_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "seen_at",
          "type": "timestamp with time zone",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [
        {
          "column": "organization_id",
          "targetTable": "organizations",
          "targetColumn": "organization_id"
        },
        {
          "column": "prospect_id",
          "targetTable": "prospects",
          "targetColumn": "prospect_id"
        },
        {
          "column": "user_id",
          "targetTable": "users",
          "targetColumn": "user_id"
        }
      ],
      "notes": [
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "role_permissions",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "role_id",
        "permission_id"
      ],
      "primaryKey": [
        "role_id",
        "permission_id"
      ],
      "columns": [
        {
          "name": "role_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "permission_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [
        {
          "column": "permission_id",
          "targetTable": "permissions",
          "targetColumn": "permission_id"
        },
        {
          "column": "role_id",
          "targetTable": "roles",
          "targetColumn": "role_id"
        }
      ],
      "notes": [
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "roles",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "role_id",
        "organization_id",
        "name",
        "description"
      ],
      "primaryKey": [
        "role_id"
      ],
      "columns": [
        {
          "name": "role_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "organization_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "name",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "description",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [
        {
          "column": "organization_id",
          "targetTable": "organizations",
          "targetColumn": "organization_id"
        }
      ],
      "notes": [
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "situation_definitions",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "situation_definition_id",
        "organization_id",
        "name",
        "status",
        "group_name",
        "active",
        "created_at",
        "updated_at"
      ],
      "primaryKey": [
        "situation_definition_id"
      ],
      "columns": [
        {
          "name": "situation_definition_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "organization_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "name",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "status",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "group_name",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "active",
          "type": "boolean",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "in",
            "isNull"
          ],
          "jsonType": "boolean"
        },
        {
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [
        {
          "column": "organization_id",
          "targetTable": "organizations",
          "targetColumn": "organization_id"
        }
      ],
      "notes": [
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "situation_fup_role_permissions",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "situation_definition_id",
        "role_id"
      ],
      "primaryKey": [
        "situation_definition_id",
        "role_id"
      ],
      "columns": [
        {
          "name": "situation_definition_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "role_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [
        {
          "column": "role_id",
          "targetTable": "roles",
          "targetColumn": "role_id"
        },
        {
          "column": "situation_definition_id",
          "targetTable": "situation_definitions",
          "targetColumn": "situation_definition_id"
        }
      ],
      "notes": [
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "situation_role_visibility",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "situation_definition_id",
        "role_id"
      ],
      "primaryKey": [
        "situation_definition_id",
        "role_id"
      ],
      "columns": [
        {
          "name": "situation_definition_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "role_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [
        {
          "column": "role_id",
          "targetTable": "roles",
          "targetColumn": "role_id"
        },
        {
          "column": "situation_definition_id",
          "targetTable": "situation_definitions",
          "targetColumn": "situation_definition_id"
        }
      ],
      "notes": [
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "user_annual_goals",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "organization_id",
        "user_id",
        "year",
        "start_date",
        "annual_amount",
        "revision",
        "created_by",
        "updated_by",
        "created_at",
        "updated_at",
        "calculation_mode"
      ],
      "primaryKey": [
        "user_id",
        "year"
      ],
      "columns": [
        {
          "name": "organization_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "user_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "year",
          "type": "integer",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "integer"
        },
        {
          "name": "start_date",
          "type": "date",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "annual_amount",
          "type": "numeric",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "revision",
          "type": "integer",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "integer"
        },
        {
          "name": "created_by",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "updated_by",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "calculation_mode",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [
        {
          "column": "created_by",
          "targetTable": "users",
          "targetColumn": "user_id"
        },
        {
          "column": "organization_id",
          "targetTable": "organizations",
          "targetColumn": "organization_id"
        },
        {
          "column": "updated_by",
          "targetTable": "users",
          "targetColumn": "user_id"
        },
        {
          "column": "user_id",
          "targetTable": "users",
          "targetColumn": "user_id"
        }
      ],
      "notes": [
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "user_legacy_aliases",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "user_legacy_alias_id",
        "organization_id",
        "user_id",
        "alias",
        "normalized_alias",
        "created_at"
      ],
      "primaryKey": [
        "user_legacy_alias_id"
      ],
      "columns": [
        {
          "name": "user_legacy_alias_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "organization_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "user_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "alias",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "normalized_alias",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [
        {
          "column": "organization_id",
          "targetTable": "organizations",
          "targetColumn": "organization_id"
        },
        {
          "column": "user_id",
          "targetTable": "users",
          "targetColumn": "user_id"
        }
      ],
      "notes": [
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "user_roles",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "user_id",
        "role_id"
      ],
      "primaryKey": [
        "user_id",
        "role_id"
      ],
      "columns": [
        {
          "name": "user_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "role_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [
        {
          "column": "role_id",
          "targetTable": "roles",
          "targetColumn": "role_id"
        },
        {
          "column": "user_id",
          "targetTable": "users",
          "targetColumn": "user_id"
        }
      ],
      "notes": [
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "users",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "user_id",
        "organization_id",
        "name",
        "email",
        "active",
        "password_changed_at",
        "password_expires_at",
        "last_login_at",
        "created_at",
        "updated_at",
        "must_change_password",
        "legacy_user_code",
        "phone",
        "whatsapp",
        "job_title",
        "avatar_mime_type",
        "avatar_updated_at"
      ],
      "primaryKey": [
        "user_id"
      ],
      "columns": [
        {
          "name": "user_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "organization_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "name",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "email",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "active",
          "type": "boolean",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "in",
            "isNull"
          ],
          "jsonType": "boolean"
        },
        {
          "name": "password_changed_at",
          "type": "timestamp with time zone",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "password_expires_at",
          "type": "timestamp with time zone",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "last_login_at",
          "type": "timestamp with time zone",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "must_change_password",
          "type": "boolean",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "in",
            "isNull"
          ],
          "jsonType": "boolean"
        },
        {
          "name": "legacy_user_code",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "phone",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "whatsapp",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "job_title",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "avatar_mime_type",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "avatar_updated_at",
          "type": "timestamp with time zone",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [
        {
          "column": "organization_id",
          "targetTable": "organizations",
          "targetColumn": "organization_id"
        }
      ],
      "notes": [
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    },
    {
      "name": "work_tasks",
      "kind": "BASE TABLE",
      "available": true,
      "fields": [
        "task_id",
        "organization_id",
        "prospect_id",
        "assigned_to",
        "created_by",
        "completed_by",
        "task_type",
        "title",
        "notes",
        "scheduled_for",
        "priority",
        "status",
        "completed_at",
        "created_at",
        "updated_at",
        "completion_interaction_id"
      ],
      "primaryKey": [
        "task_id"
      ],
      "columns": [
        {
          "name": "task_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "organization_id",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "prospect_id",
          "type": "uuid",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "assigned_to",
          "type": "uuid",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "created_by",
          "type": "uuid",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "completed_by",
          "type": "uuid",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "task_type",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "title",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "notes",
          "type": "text",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "scheduled_for",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "priority",
          "type": "boolean",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "in",
            "isNull"
          ],
          "jsonType": "boolean"
        },
        {
          "name": "status",
          "type": "text",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull",
            "contains"
          ],
          "jsonType": "string"
        },
        {
          "name": "completed_at",
          "type": "timestamp with time zone",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "created_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "nullable": false,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        },
        {
          "name": "completion_interaction_id",
          "type": "uuid",
          "nullable": true,
          "available": true,
          "operators": [
            "eq",
            "ne",
            "gt",
            "gte",
            "lt",
            "lte",
            "in",
            "isNull"
          ],
          "jsonType": "string"
        }
      ],
      "relations": [
        {
          "column": "assigned_to",
          "targetTable": "users",
          "targetColumn": "user_id"
        },
        {
          "column": "completed_by",
          "targetTable": "users",
          "targetColumn": "user_id"
        },
        {
          "column": "completion_interaction_id",
          "targetTable": "prospect_interactions",
          "targetColumn": "interaction_id"
        },
        {
          "column": "created_by",
          "targetTable": "users",
          "targetColumn": "user_id"
        },
        {
          "column": "organization_id",
          "targetTable": "organizations",
          "targetColumn": "organization_id"
        },
        {
          "column": "prospect_id",
          "targetTable": "prospects",
          "targetColumn": "prospect_id"
        }
      ],
      "notes": [
        "Vínculos para outra organização são recusados, inclusive em registros inconsistentes."
      ]
    }
  ]
}
