mirror of
https://github.com/zyycn/codex-proxy-rs.git
synced 2026-11-25 08:00:55 +00:00
Expose generic detail CRUD, aggregate contributions, and native pricing evaluation through Admin and the plugin SDK. Reuse existing request and statistics storage without schema changes; keep workflow state and recovery with callers. Co-authored-by: Zyy <zyycn@users.noreply.github.com> Co-authored-by: Codex <noreply@openai.com>
37 lines
988 B
Rust
37 lines
988 B
Rust
//! 请求明细的有界筛选与稳定顺序分页
|
|
|
|
use super::UsageRecord;
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
#[serde(deny_unknown_fields)]
|
|
pub struct GetUsageRecord {
|
|
pub id: String,
|
|
}
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
#[serde(deny_unknown_fields)]
|
|
pub struct UsageRecordFilter {
|
|
pub start_ms: i64,
|
|
pub end_ms: i64,
|
|
pub provider: Option<String>,
|
|
pub model: Option<String>,
|
|
pub account_ref: Option<String>,
|
|
pub client_key_ref: Option<String>,
|
|
}
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
#[serde(deny_unknown_fields)]
|
|
pub struct ListUsageRecords {
|
|
pub filter: UsageRecordFilter,
|
|
pub cursor: Option<String>,
|
|
pub limit: Option<u16>,
|
|
}
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
#[serde(deny_unknown_fields)]
|
|
pub struct UsageRecordPage {
|
|
pub items: Vec<UsageRecord>,
|
|
pub next_cursor: Option<String>,
|
|
}
|