refactor: is_paid→is_member, paid_expires_at→membership_expires_at 全局重命名

This commit is contained in:
2026-05-25 15:33:31 +08:00
parent 94ad9ba190
commit 722ab837d0
7 changed files with 116 additions and 98 deletions

View File

@@ -318,12 +318,12 @@ pub struct User {
#[serde(rename = "desc")]
#[sqlx(rename = "desc")]
pub description: Option<String>,
#[sqlx(rename = "is_paid")]
pub is_paid: bool,
#[sqlx(rename = "is_member")]
pub is_member: bool,
#[sqlx(rename = "is_admin")]
pub is_admin: bool,
#[sqlx(rename = "paid_expires_at")]
pub paid_expires_at: Option<chrono::DateTime<chrono::Utc>>,
#[sqlx(rename = "membership_expires_at")]
pub membership_expires_at: Option<chrono::DateTime<chrono::Utc>>,
#[serde(rename = "avatarUrl")]
#[sqlx(rename = "avatar_url")]
pub avatar_url: Option<String>,
@@ -335,8 +335,8 @@ pub struct User {
// 管理员更新用户付费状态的请求体
#[derive(Debug, Deserialize)]
pub struct UpdatePaymentRequest {
pub is_paid: bool,
pub paid_expires_at: Option<String>, // ISO 8601 格式
pub is_member: bool,
pub membership_expires_at: Option<String>, // ISO 8601 格式
}
// 应用状态结构体