540871a8cdc2c7df89bd3c0f5eb39387359db062 / frogue / src / entities / ap_actors.rs
Raw
// SPDX-FileCopyrightText: 2026 Ololduck <ololduck@vit.am> and contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later
//! `SeaORM` Entity for ActivityPub actors.
use sea_orm::entity::prelude::*;
use serde::Serialize;
#[sea_orm::model]
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize)]
#[sea_orm(table_name = "ap_actors")]
pub struct Model {
#[sea_orm(primary_key)]
pub id: i64,
/// The user this actor represents, if any.
#[sea_orm(unique)]
pub user_id: Option<i64>,
/// The repository this actor represents, if any.
#[sea_orm(unique)]
pub repo_id: Option<i64>,
pub private_key_pem: String,
pub public_key_pem: String,
pub created_at: DateTimeWithTimeZone,
}
impl ActiveModelBehavior for ActiveModel {}