1 use crate::newtypes::{PersonBlockId, PersonId};
2 use serde::{Deserialize, Serialize};
4 #[cfg(feature = "full")]
5 use crate::schema::person_block;
7 #[derive(Clone, PartialEq, Debug, Serialize, Deserialize)]
8 #[cfg_attr(feature = "full", derive(Queryable, Associations, Identifiable))]
9 #[cfg_attr(feature = "full", 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", table_name = "person_block")]
19 pub struct PersonBlockForm {
20 pub person_id: PersonId,
21 pub target_id: PersonId,