Reduce the amount of queries performed when updating plan (#31268)

Release Notes:

- N/A
This commit is contained in:
Antonio Scandurra 2025-05-23 14:03:50 +02:00 committed by GitHub
parent 9b7d849879
commit e88cad29e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 30 additions and 29 deletions

View file

@ -55,6 +55,11 @@ impl Model {
account_created_at
}
/// Returns the age of the user's account.
pub fn account_age(&self) -> chrono::Duration {
chrono::Utc::now().naive_utc() - self.account_created_at()
}
}
impl Related<super::access_token::Entity> for Entity {