2 newtypes::{CommunityBlockId, CommunityId, PersonId},
3 schema::community_block,
4 source::community::Community,
6 use serde::{Deserialize, Serialize};
9 Clone, Queryable, Associations, Identifiable, PartialEq, Debug, Serialize, Deserialize,
11 #[table_name = "community_block"]
12 #[belongs_to(Community)]
13 pub struct CommunityBlock {
14 pub id: CommunityBlockId,
15 pub person_id: PersonId,
16 pub community_id: CommunityId,
17 pub published: chrono::NaiveDateTime,
20 #[derive(Insertable, AsChangeset)]
21 #[table_name = "community_block"]
22 pub struct CommunityBlockForm {
23 pub person_id: PersonId,
24 pub community_id: CommunityId,