1 use crate::newtypes::LocalSiteId;
2 #[cfg(feature = "full")]
3 use crate::schema::tagline;
4 use serde::{Deserialize, Serialize};
5 use serde_with::skip_serializing_none;
6 #[cfg(feature = "full")]
9 #[skip_serializing_none]
10 #[derive(PartialEq, Eq, Debug, Clone, Serialize, Deserialize)]
11 #[cfg_attr(feature = "full", derive(Queryable, Associations, Identifiable, TS))]
12 #[cfg_attr(feature = "full", diesel(table_name = tagline))]
15 diesel(belongs_to(crate::source::local_site::LocalSite))
17 #[cfg_attr(feature = "full", ts(export))]
18 /// A tagline, shown at the top of your site.
21 pub local_site_id: LocalSiteId,
23 pub published: chrono::NaiveDateTime,
24 pub updated: Option<chrono::NaiveDateTime>,
27 #[derive(Clone, Default)]
28 #[cfg_attr(feature = "full", derive(Insertable, AsChangeset))]
29 #[cfg_attr(feature = "full", diesel(table_name = tagline))]
30 pub struct TaglineForm {
31 pub local_site_id: LocalSiteId,
33 pub updated: Option<chrono::NaiveDateTime>,