2 newtypes::{CommentId, PersonId, PersonMentionId},
3 schema::person_mention,
4 source::comment::Comment,
6 use serde::{Deserialize, Serialize};
9 Clone, Queryable, Associations, Identifiable, PartialEq, Debug, Serialize, Deserialize,
11 #[belongs_to(Comment)]
12 #[table_name = "person_mention"]
13 pub struct PersonMention {
14 pub id: PersonMentionId,
15 pub recipient_id: PersonId,
16 pub comment_id: CommentId,
18 pub published: chrono::NaiveDateTime,
21 #[derive(Insertable, AsChangeset)]
22 #[table_name = "person_mention"]
23 pub struct PersonMentionForm {
24 pub recipient_id: PersonId,
25 pub comment_id: CommentId,
26 pub read: Option<bool>,