refactor: is_paid→is_member, paid_expires_at→membership_expires_at 全局重命名
This commit is contained in:
@@ -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 格式
|
||||
}
|
||||
|
||||
// 应用状态结构体
|
||||
|
||||
Reference in New Issue
Block a user