Reduce the amount of queries performed when updating plan (#31268)
Release Notes: - N/A
This commit is contained in:
parent
9b7d849879
commit
e88cad29e5
2 changed files with 30 additions and 29 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue