1 use crate::newtypes::InstanceId;
2 #[cfg(feature = "full")]
3 use crate::schema::federation_blocklist;
4 use serde::{Deserialize, Serialize};
7 #[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
8 #[cfg_attr(feature = "full", derive(Queryable, Associations, Identifiable))]
11 diesel(belongs_to(crate::source::instance::Instance))
13 #[cfg_attr(feature = "full", diesel(table_name = federation_blocklist))]
14 pub struct FederationBlockList {
16 pub instance_id: InstanceId,
17 pub published: chrono::NaiveDateTime,
18 pub updated: Option<chrono::NaiveDateTime>,
21 #[derive(Clone, Default)]
22 #[cfg_attr(feature = "full", derive(Insertable, AsChangeset))]
23 #[cfg_attr(feature = "full", diesel(table_name = federation_blocklist))]
24 pub struct FederationBlockListForm {
25 pub instance_id: InstanceId,
26 pub updated: Option<chrono::NaiveDateTime>,