mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-16 01:14:02 +00:00
29 lines
671 B
Rust
29 lines
671 B
Rust
use crate::{
|
|
schema::person_mention,
|
|
source::comment::Comment,
|
|
CommentId,
|
|
PersonId,
|
|
PersonMentionId,
|
|
};
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(
|
|
Clone, Queryable, Associations, Identifiable, PartialEq, Debug, Serialize, Deserialize,
|
|
)]
|
|
#[belongs_to(Comment)]
|
|
#[table_name = "person_mention"]
|
|
pub struct PersonMention {
|
|
pub id: PersonMentionId,
|
|
pub recipient_id: PersonId,
|
|
pub comment_id: CommentId,
|
|
pub read: bool,
|
|
pub published: chrono::NaiveDateTime,
|
|
}
|
|
|
|
#[derive(Insertable, AsChangeset)]
|
|
#[table_name = "person_mention"]
|
|
pub struct PersonMentionForm {
|
|
pub recipient_id: PersonId,
|
|
pub comment_id: CommentId,
|
|
pub read: Option<bool>,
|
|
}
|