c768b12c05b0fc8c40b3fec6daf3c6b5cda7d097 / frogue / src / entities / ap_remote_actors.rs
Raw
//! Entity representing a cached remote ActivityPub actor.
//!
//! These are actors we've fetched from other servers when verifying HTTP
//! signatures or looking up followers. We cache their public key and inbox
//! URL so we don't have to fetch them repeatedly.
use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(table_name = "ap_remote_actors")]
pub struct Model {
#[sea_orm(primary_key)]
pub id: i64,
#[sea_orm(unique)]
pub actor_url: String,
pub inbox_url: String,
pub shared_inbox_url: Option<String>,
pub public_key_pem: String,
pub public_key_id: String,
pub name: Option<String>,
pub preferred_username: Option<String>,
pub icon_url: Option<String>,
pub fetched_at: DateTimeWithTimeZone,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}
impl ActiveModelBehavior for ActiveModel {}