feat: implement payment order system (create-order, mock-confirm, get-quota)
This commit is contained in:
@@ -327,3 +327,31 @@ impl AppState {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// ===== 支付系统 =====
|
||||
|
||||
/// 创建订单请求体
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct CreateOrderRequest {
|
||||
pub package_type: String,
|
||||
}
|
||||
|
||||
/// 模拟确认支付请求体
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct MockConfirmRequest {
|
||||
pub order_id: String,
|
||||
}
|
||||
|
||||
/// payment_orders 表行结构
|
||||
#[derive(Debug, Serialize, FromRow)]
|
||||
pub struct PaymentOrder {
|
||||
pub id: i32,
|
||||
pub user_id: i32,
|
||||
pub order_no: String,
|
||||
pub package_type: String,
|
||||
pub amount: i32,
|
||||
pub status: String,
|
||||
pub paid_at: Option<chrono::DateTime<chrono::Utc>>,
|
||||
pub expires_at: Option<chrono::DateTime<chrono::Utc>>,
|
||||
pub created_at: chrono::DateTime<chrono::Utc>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user