540871a8cdc2c7df89bd3c0f5eb39387359db062 / frogue / src / entities / ap_remote_actors.rs
Raw
// SPDX-FileCopyrightText: 2026 Ololduck <ololduck@vit.am> and contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later
//! 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 {}