use super::fetch;
use crate::connection::Conn;
use crate::schema::{actors, followings};

/// A model for storing an actor in a database.
#[derive(Debug, Identifiable, Insertable, Queryable, Serialize, Deserialize)]
#[table_name = "actors"]
pub struct Actor {
    /// The id of the actor as the URL to the ActivityPub Actor document.
    pub id: String,
}

/// A model for storing an actor who follows the user in a database.
#[derive(Debug, Insertable, Queryable, AsChangeset, Serialize, Deserialize)]
#[table_name = "followings"]