1 use crate::newtypes::{PersonBlockId, PersonId};
2 #[cfg(feature = "full")]
3 use crate::schema::person_block;
4 use serde::{Deserialize, Serialize};
6 #[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
7 #[cfg_attr(feature = "full", derive(Queryable, Associations, Identifiable))]
8 #[cfg_attr(feature = "full", diesel(belongs_to(crate::source::person::Person)))]
9 #[cfg_attr(feature = "full", diesel(table_name = person_block))]
10 pub struct PersonBlock {
11 pub id: PersonBlockId,
12 pub person_id: PersonId,
13 pub target_id: PersonId,
14 pub published: chrono::NaiveDateTime,
17 #[cfg_attr(feature = "full", derive(Insertable, AsChangeset))]
18 #[cfg_attr(feature = "full", diesel(table_name = person_block))]
19 pub struct PersonBlockForm {
20 pub person_id: PersonId,
21 pub target_id: PersonId,