@@ -39,25 +39,6 @@ pub enum Relation {
Contributor,
}
-impl Model {- /// Returns the timestamp of when the user's account was created.- ///- /// This will be the earlier of the `created_at` and `github_user_created_at` timestamps.- pub fn account_created_at(&self) -> NaiveDateTime {- let mut account_created_at = self.created_at;- if let Some(github_created_at) = self.github_user_created_at {- account_created_at = account_created_at.min(github_created_at);- }-- 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 {
fn to() -> RelationDef {
Relation::AccessToken.def()