feat: expose updated at (#137)

This commit is contained in:
Nathan.fooo 2023-10-24 16:55:05 +08:00 committed by GitHub
parent f5fd264309
commit 67b3741a3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -320,6 +320,7 @@ pub struct AFUserProfile {
pub metadata: Option<serde_json::Value>,
pub encryption_sign: Option<String>,
pub latest_workspace_id: Uuid,
pub updated_at: i64,
}
impl TryFrom<AFUserProfileRow> for AFUserProfile {
@ -346,6 +347,7 @@ impl TryFrom<AFUserProfileRow> for AFUserProfile {
metadata: value.metadata,
encryption_sign: value.encryption_sign,
latest_workspace_id,
updated_at: value.updated_at.map(|v| v.timestamp()).unwrap_or(0),
})
}
}