10 use serde::{Deserialize, Serialize};
12 #[cfg(feature = "full")]
13 use crate::schema::local_user_language;
15 #[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
16 #[cfg_attr(feature = "full", derive(Queryable, Identifiable))]
17 #[cfg_attr(feature = "full", diesel(table_name = local_user_language))]
18 pub struct LocalUserLanguage {
20 pub id: LocalUserLanguageId,
21 pub local_user_id: LocalUserId,
22 pub language_id: LanguageId,
26 #[cfg_attr(feature = "full", derive(Insertable, AsChangeset))]
27 #[cfg_attr(feature = "full", diesel(table_name = local_user_language))]
28 pub struct LocalUserLanguageForm {
29 pub local_user_id: LocalUserId,
30 pub language_id: LanguageId,
33 #[cfg(feature = "full")]
34 use crate::schema::community_language;
36 #[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
37 #[cfg_attr(feature = "full", derive(Queryable, Identifiable))]
38 #[cfg_attr(feature = "full", diesel(table_name = community_language))]
39 pub struct CommunityLanguage {
41 pub id: CommunityLanguageId,
42 pub community_id: CommunityId,
43 pub language_id: LanguageId,
47 #[cfg_attr(feature = "full", derive(Insertable, AsChangeset))]
48 #[cfg_attr(feature = "full", diesel(table_name = community_language))]
49 pub struct CommunityLanguageForm {
50 pub community_id: CommunityId,
51 pub language_id: LanguageId,
54 #[cfg(feature = "full")]
55 use crate::schema::site_language;
57 #[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
58 #[cfg_attr(feature = "full", derive(Queryable, Identifiable))]
59 #[cfg_attr(feature = "full", diesel(table_name = site_language))]
60 pub struct SiteLanguage {
62 pub id: SiteLanguageId,
64 pub language_id: LanguageId,
67 #[derive(Clone, Debug)]
68 #[cfg_attr(feature = "full", derive(Insertable, AsChangeset))]
69 #[cfg_attr(feature = "full", diesel(table_name = site_language))]
70 pub struct SiteLanguageForm {
72 pub language_id: LanguageId,