🐸 Frogue(Fed)

~ololduck/Frogue

Raw

//! Entity representing a tombstone for a deleted remote ActivityPub actor.
//!
//! When we try to fetch a remote actor and get a 410 Gone response, we record
//! it here so we don't repeatedly try to fetch it. This prevents retry storms
//! from servers that keep sending activities for deleted accounts.

use sea_orm::entity::prelude::*;

#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(table_name = "ap_remote_actor_tombstones")]
pub struct Model {
    #[sea_orm(primary_key)]
    pub id: i64,
    #[sea_orm(unique)]
    pub actor_url: String,
    pub gone_at: DateTimeWithTimeZone,
}

#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}

impl ActiveModelBehavior for ActiveModel {}