From ab62739605d0f0d5b0c2bbbb4670f708dd454278 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Wed, 12 Nov 2025 10:38:16 -0500 Subject: [PATCH] collab: Remove unused methods from `User` model (#42536) This PR removes some unused methods from the `User` model. Release Notes: - N/A --- crates/collab/src/db/tables/user.rs | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/crates/collab/src/db/tables/user.rs b/crates/collab/src/db/tables/user.rs index 8e8c03fafc92127f8754f473e04dfab39592ea14..3f753954ebb1cff78318de8d9be4786a4d5d0efb 100644 --- a/crates/collab/src/db/tables/user.rs +++ b/crates/collab/src/db/tables/user.rs @@ -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 for Entity { fn to() -> RelationDef { Relation::AccessToken.def()