collab: Remove unused RateLimiter (#29343)

This PR removes the `RateLimiter` from the collab codebase, as it is no
longer used.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2025-04-24 10:23:17 -04:00 committed by GitHub
parent fd8eeb537d
commit ea5ce2a1a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 3 additions and 424 deletions

View file

@ -1,31 +0,0 @@
use crate::db::UserId;
use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(table_name = "rate_buckets")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub user_id: UserId,
#[sea_orm(primary_key, auto_increment = false)]
pub rate_limit_name: String,
pub token_count: i32,
pub last_refill: DateTime,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {
#[sea_orm(
belongs_to = "super::user::Entity",
from = "Column::UserId",
to = "super::user::Column::Id"
)]
User,
}
impl Related<super::user::Entity> for Entity {
fn to() -> RelationDef {
Relation::User.def()
}
}
impl ActiveModelBehavior for ActiveModel {}