{
  "generated_at": "2026-05-30",
  "scope": "当前公开 schema 快照覆盖 Infwave 网关（控制台后端）对客户可达的应用表；密码、密钥等敏感列只公开列名与类型，实际值不会通过公开接口暴露。",
  "scope_zh": "当前公开 schema 快照覆盖 Infwave 网关（控制台后端）对客户可达的应用表；密码、密钥等敏感列只公开列名与类型，实际值不会通过公开接口暴露。",
  "stored": "用户身份、API Key 元数据、用量聚合、文本 token 计数、视频/异步任务状态与必要参数、计费明细、订阅与充值记录、请求时间戳与来源 IP 等元数据。",
  "not_stored": "成功路径下不会按请求落库 prompt 正文、模型回答正文、会话历史或附件正文，也不会为了训练或二次复用额外复制请求内容或视频结果。",
  "caveats": "异步任务（如视频生成）会在 tasks 表保留任务参数（含生成提示词）、状态与结果地址，用于轮询、下载与对账；这是异步任务必需的，与文本补全的成功请求正文落库不同。",
  "tables": {
    "logs": [
      {
        "column": "id",
        "type": "INTEGER"
      },
      {
        "column": "user_id",
        "type": "INTEGER"
      },
      {
        "column": "created_at",
        "type": "INTEGER"
      },
      {
        "column": "type",
        "type": "INTEGER"
      },
      {
        "column": "content",
        "type": "TEXT"
      },
      {
        "column": "username",
        "type": "TEXT"
      },
      {
        "column": "token_name",
        "type": "TEXT"
      },
      {
        "column": "model_name",
        "type": "TEXT"
      },
      {
        "column": "quota",
        "type": "INTEGER"
      },
      {
        "column": "prompt_tokens",
        "type": "INTEGER"
      },
      {
        "column": "completion_tokens",
        "type": "INTEGER"
      },
      {
        "column": "use_time",
        "type": "INTEGER"
      },
      {
        "column": "is_stream",
        "type": "numeric"
      },
      {
        "column": "channel_id",
        "type": "INTEGER"
      },
      {
        "column": "channel_name",
        "type": "TEXT"
      },
      {
        "column": "token_id",
        "type": "INTEGER"
      },
      {
        "column": "group",
        "type": "TEXT"
      },
      {
        "column": "ip",
        "type": "TEXT"
      },
      {
        "column": "request_id",
        "type": "varchar(64)"
      },
      {
        "column": "upstream_request_id",
        "type": "varchar(128)"
      },
      {
        "column": "other",
        "type": "TEXT"
      }
    ],
    "tokens": [
      {
        "column": "id",
        "type": "INTEGER"
      },
      {
        "column": "user_id",
        "type": "INTEGER"
      },
      {
        "column": "key",
        "type": "varchar(128)"
      },
      {
        "column": "status",
        "type": "INTEGER"
      },
      {
        "column": "name",
        "type": "TEXT"
      },
      {
        "column": "created_time",
        "type": "INTEGER"
      },
      {
        "column": "accessed_time",
        "type": "INTEGER"
      },
      {
        "column": "expired_time",
        "type": "INTEGER"
      },
      {
        "column": "remain_quota",
        "type": "INTEGER"
      },
      {
        "column": "unlimited_quota",
        "type": "numeric"
      },
      {
        "column": "model_limits_enabled",
        "type": "numeric"
      },
      {
        "column": "model_limits",
        "type": "TEXT"
      },
      {
        "column": "allow_ips",
        "type": "TEXT"
      },
      {
        "column": "used_quota",
        "type": "INTEGER"
      },
      {
        "column": "group",
        "type": "TEXT"
      },
      {
        "column": "cross_group_retry",
        "type": "numeric"
      },
      {
        "column": "deleted_at",
        "type": "datetime"
      }
    ],
    "users": [
      {
        "column": "id",
        "type": "INTEGER"
      },
      {
        "column": "username",
        "type": "TEXT"
      },
      {
        "column": "password",
        "type": "TEXT"
      },
      {
        "column": "display_name",
        "type": "TEXT"
      },
      {
        "column": "role",
        "type": "INTEGER"
      },
      {
        "column": "status",
        "type": "INTEGER"
      },
      {
        "column": "email",
        "type": "TEXT"
      },
      {
        "column": "github_id",
        "type": "TEXT"
      },
      {
        "column": "discord_id",
        "type": "TEXT"
      },
      {
        "column": "oidc_id",
        "type": "TEXT"
      },
      {
        "column": "wechat_id",
        "type": "TEXT"
      },
      {
        "column": "telegram_id",
        "type": "TEXT"
      },
      {
        "column": "access_token",
        "type": "char(32)"
      },
      {
        "column": "quota",
        "type": "INTEGER"
      },
      {
        "column": "used_quota",
        "type": "INTEGER"
      },
      {
        "column": "request_count",
        "type": "INTEGER"
      },
      {
        "column": "group",
        "type": "varchar(64)"
      },
      {
        "column": "aff_code",
        "type": "varchar(32)"
      },
      {
        "column": "aff_count",
        "type": "INTEGER"
      },
      {
        "column": "aff_quota",
        "type": "INTEGER"
      },
      {
        "column": "aff_history",
        "type": "INTEGER"
      },
      {
        "column": "inviter_id",
        "type": "INTEGER"
      },
      {
        "column": "deleted_at",
        "type": "datetime"
      },
      {
        "column": "linux_do_id",
        "type": "TEXT"
      },
      {
        "column": "setting",
        "type": "TEXT"
      },
      {
        "column": "remark",
        "type": "varchar(255)"
      },
      {
        "column": "stripe_customer",
        "type": "varchar(64)"
      },
      {
        "column": "created_at",
        "type": "INTEGER"
      },
      {
        "column": "last_login_at",
        "type": "INTEGER"
      }
    ],
    "quota_data": [
      {
        "column": "id",
        "type": "INTEGER"
      },
      {
        "column": "user_id",
        "type": "INTEGER"
      },
      {
        "column": "username",
        "type": "TEXT"
      },
      {
        "column": "model_name",
        "type": "TEXT"
      },
      {
        "column": "created_at",
        "type": "INTEGER"
      },
      {
        "column": "token_used",
        "type": "INTEGER"
      },
      {
        "column": "count",
        "type": "INTEGER"
      },
      {
        "column": "quota",
        "type": "INTEGER"
      }
    ],
    "user_subscriptions": [
      {
        "column": "id",
        "type": "INTEGER"
      },
      {
        "column": "user_id",
        "type": "INTEGER"
      },
      {
        "column": "plan_id",
        "type": "INTEGER"
      },
      {
        "column": "amount_total",
        "type": "bigint"
      },
      {
        "column": "amount_used",
        "type": "bigint"
      },
      {
        "column": "start_time",
        "type": "INTEGER"
      },
      {
        "column": "end_time",
        "type": "INTEGER"
      },
      {
        "column": "status",
        "type": "varchar(32)"
      },
      {
        "column": "source",
        "type": "varchar(32)"
      },
      {
        "column": "last_reset_time",
        "type": "bigint"
      },
      {
        "column": "next_reset_time",
        "type": "bigint"
      },
      {
        "column": "upgrade_group",
        "type": "varchar(64)"
      },
      {
        "column": "prev_user_group",
        "type": "varchar(64)"
      },
      {
        "column": "created_at",
        "type": "INTEGER"
      },
      {
        "column": "updated_at",
        "type": "INTEGER"
      }
    ],
    "subscription_orders": [
      {
        "column": "id",
        "type": "INTEGER"
      },
      {
        "column": "user_id",
        "type": "INTEGER"
      },
      {
        "column": "plan_id",
        "type": "INTEGER"
      },
      {
        "column": "money",
        "type": "REAL"
      },
      {
        "column": "trade_no",
        "type": "varchar(255)"
      },
      {
        "column": "payment_method",
        "type": "varchar(50)"
      },
      {
        "column": "payment_provider",
        "type": "varchar(50)"
      },
      {
        "column": "status",
        "type": "TEXT"
      },
      {
        "column": "create_time",
        "type": "INTEGER"
      },
      {
        "column": "complete_time",
        "type": "INTEGER"
      },
      {
        "column": "provider_payload",
        "type": "TEXT"
      }
    ],
    "tasks": [
      {
        "column": "id",
        "type": "INTEGER"
      },
      {
        "column": "created_at",
        "type": "INTEGER"
      },
      {
        "column": "updated_at",
        "type": "INTEGER"
      },
      {
        "column": "task_id",
        "type": "varchar(191)"
      },
      {
        "column": "platform",
        "type": "varchar(30)"
      },
      {
        "column": "user_id",
        "type": "INTEGER"
      },
      {
        "column": "group",
        "type": "varchar(50)"
      },
      {
        "column": "channel_id",
        "type": "INTEGER"
      },
      {
        "column": "quota",
        "type": "INTEGER"
      },
      {
        "column": "action",
        "type": "varchar(40)"
      },
      {
        "column": "status",
        "type": "varchar(20)"
      },
      {
        "column": "fail_reason",
        "type": "TEXT"
      },
      {
        "column": "submit_time",
        "type": "INTEGER"
      },
      {
        "column": "start_time",
        "type": "INTEGER"
      },
      {
        "column": "finish_time",
        "type": "INTEGER"
      },
      {
        "column": "progress",
        "type": "varchar(20)"
      },
      {
        "column": "properties",
        "type": "json"
      },
      {
        "column": "private_data",
        "type": "json"
      },
      {
        "column": "data",
        "type": "json"
      }
    ]
  },
  "published_at": "2026-05-30",
  "source_url": "https://tryaiapi.com/transparency/schema.json"
}