{
  "id": "1c45018a-8bb7-4a78-84dd-519805b83f61",
  "prevId": "f12500b5-9962-46e2-bcca-521c363dd234",
  "version": "7",
  "dialect": "postgresql",
  "tables": {
    "public.chat_broadcasts": {
      "name": "chat_broadcasts",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "tenant_id": {
          "name": "tenant_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "sender_name": {
          "name": "sender_name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "content": {
          "name": "content",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "targets": {
          "name": "targets",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "scheduled_at": {
          "name": "scheduled_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        },
        "is_sent": {
          "name": "is_sent",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "chat_broadcasts_tenant_id_tenants_id_fk": {
          "name": "chat_broadcasts_tenant_id_tenants_id_fk",
          "tableFrom": "chat_broadcasts",
          "tableTo": "tenants",
          "columnsFrom": [
            "tenant_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.chat_statuses": {
      "name": "chat_statuses",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "tenant_id": {
          "name": "tenant_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "sender": {
          "name": "sender",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "content": {
          "name": "content",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "visibility": {
          "name": "visibility",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'tenant'"
        },
        "expires_at": {
          "name": "expires_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "chat_statuses_tenant_id_tenants_id_fk": {
          "name": "chat_statuses_tenant_id_tenants_id_fk",
          "tableFrom": "chat_statuses",
          "tableTo": "tenants",
          "columnsFrom": [
            "tenant_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.guest_invites": {
      "name": "guest_invites",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "room": {
          "name": "room",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "host_id": {
          "name": "host_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "pin": {
          "name": "pin",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "is_used": {
          "name": "is_used",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.live_kill_switches": {
      "name": "live_kill_switches",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "tenant_id": {
          "name": "tenant_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "target_type": {
          "name": "target_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "target_id": {
          "name": "target_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "reason": {
          "name": "reason",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "issued_by": {
          "name": "issued_by",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "expires_at": {
          "name": "expires_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "live_kill_switches_tenant_id_tenants_id_fk": {
          "name": "live_kill_switches_tenant_id_tenants_id_fk",
          "tableFrom": "live_kill_switches",
          "tableTo": "tenants",
          "columnsFrom": [
            "tenant_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.messages": {
      "name": "messages",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "room": {
          "name": "room",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "sender": {
          "name": "sender",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "content": {
          "name": "content",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'sent'"
        },
        "is_edited": {
          "name": "is_edited",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.network_telemetry": {
      "name": "network_telemetry",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "tenant_id": {
          "name": "tenant_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "user_id": {
          "name": "user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "endpoint": {
          "name": "endpoint",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "method": {
          "name": "method",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "response_time_ms": {
          "name": "response_time_ms",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "status_code": {
          "name": "status_code",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "ip_address": {
          "name": "ip_address",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "geo_region": {
          "name": "geo_region",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "traffic_bytes": {
          "name": "traffic_bytes",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "timestamp": {
          "name": "timestamp",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "network_telemetry_tenant_id_tenants_id_fk": {
          "name": "network_telemetry_tenant_id_tenants_id_fk",
          "tableFrom": "network_telemetry",
          "tableTo": "tenants",
          "columnsFrom": [
            "tenant_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "network_telemetry_user_id_users_id_fk": {
          "name": "network_telemetry_user_id_users_id_fk",
          "tableFrom": "network_telemetry",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.quantum_logs": {
      "name": "quantum_logs",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "tenant_id": {
          "name": "tenant_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "actor": {
          "name": "actor",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "action": {
          "name": "action",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "target_id": {
          "name": "target_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "ip_address": {
          "name": "ip_address",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "user_agent": {
          "name": "user_agent",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "nano_timestamp": {
          "name": "nano_timestamp",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "quantum_logs_tenant_id_tenants_id_fk": {
          "name": "quantum_logs_tenant_id_tenants_id_fk",
          "tableFrom": "quantum_logs",
          "tableTo": "tenants",
          "columnsFrom": [
            "tenant_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.saas_packages": {
      "name": "saas_packages",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "price": {
          "name": "price",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "features": {
          "name": "features",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'"
        },
        "is_hidden": {
          "name": "is_hidden",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "is_active": {
          "name": "is_active",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.system_features": {
      "name": "system_features",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "module": {
          "name": "module",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'IAM'"
        },
        "key": {
          "name": "key",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "default_state": {
          "name": "default_state",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'UPSELL'"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "system_features_key_unique": {
          "name": "system_features_key_unique",
          "nullsNotDistinct": false,
          "columns": [
            "key"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.tenants": {
      "name": "tenants",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "is_active": {
          "name": "is_active",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "package_id": {
          "name": "package_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "licenses": {
          "name": "licenses",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'{}'"
        },
        "license_number": {
          "name": "license_number",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "allow_cross_group": {
          "name": "allow_cross_group",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "brand_color": {
          "name": "brand_color",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'#0b5cff'"
        },
        "platform_name": {
          "name": "platform_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'JUMPA.ID'"
        },
        "media_engine_strategy": {
          "name": "media_engine_strategy",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'XCU_GLOBAL_MESH'"
        },
        "chat_engine_strategy": {
          "name": "chat_engine_strategy",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'XTM_GLOBAL_MESH'"
        },
        "byok_enabled": {
          "name": "byok_enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "byok_key": {
          "name": "byok_key",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "tenants_package_id_saas_packages_id_fk": {
          "name": "tenants_package_id_saas_packages_id_fk",
          "tableFrom": "tenants",
          "tableTo": "saas_packages",
          "columnsFrom": [
            "package_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "tenants_license_number_unique": {
          "name": "tenants_license_number_unique",
          "nullsNotDistinct": false,
          "columns": [
            "license_number"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.users": {
      "name": "users",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "tenant_id": {
          "name": "tenant_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "email": {
          "name": "email",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "password_hash": {
          "name": "password_hash",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "role": {
          "name": "role",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'user'"
        },
        "licenses": {
          "name": "licenses",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "byok_enabled": {
          "name": "byok_enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "byok_key": {
          "name": "byok_key",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "users_tenant_id_tenants_id_fk": {
          "name": "users_tenant_id_tenants_id_fk",
          "tableFrom": "users",
          "tableTo": "tenants",
          "columnsFrom": [
            "tenant_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "users_email_unique": {
          "name": "users_email_unique",
          "nullsNotDistinct": false,
          "columns": [
            "email"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    }
  },
  "enums": {},
  "schemas": {},
  "sequences": {},
  "roles": {},
  "policies": {},
  "views": {},
  "_meta": {
    "columns": {},
    "schemas": {},
    "tables": {}
  }
}