Fix ts optionals.

This commit is contained in:
Dessalines 2024-11-26 16:58:46 -05:00
parent 1ff8ae0641
commit 2351c7a93b

View file

@ -1,4 +1,4 @@
use crate::newtypes::{CommentReportId, PostReportId, ReportCombinedId}; use crate::newtypes::{CommentReportId, PostReportId, PrivateMessageReportId, ReportCombinedId};
#[cfg(feature = "full")] #[cfg(feature = "full")]
use crate::schema::report_combined; use crate::schema::report_combined;
use chrono::{DateTime, Utc}; use chrono::{DateTime, Utc};
@ -17,6 +17,10 @@ use ts_rs::TS;
pub struct ReportCombined { pub struct ReportCombined {
pub id: ReportCombinedId, pub id: ReportCombinedId,
pub published: DateTime<Utc>, pub published: DateTime<Utc>,
#[cfg_attr(feature = "full", ts(optional))]
pub post_report_id: Option<PostReportId>, pub post_report_id: Option<PostReportId>,
#[cfg_attr(feature = "full", ts(optional))]
pub comment_report_id: Option<CommentReportId>, pub comment_report_id: Option<CommentReportId>,
#[cfg_attr(feature = "full", ts(optional))]
pub private_message_report_id: Option<PrivateMessageReportId>,
} }