1 use crate::newtypes::CustomEmojiId;
2 #[cfg(feature = "full")]
3 use crate::schema::custom_emoji_keyword;
4 use serde::{Deserialize, Serialize};
5 #[cfg(feature = "full")]
7 use typed_builder::TypedBuilder;
9 #[derive(PartialEq, Eq, Debug, Clone, Serialize, Deserialize)]
10 #[cfg_attr(feature = "full", derive(Queryable, Associations, Identifiable, TS))]
11 #[cfg_attr(feature = "full", diesel(table_name = custom_emoji_keyword))]
14 diesel(belongs_to(crate::source::custom_emoji::CustomEmoji))
16 #[cfg_attr(feature = "full", ts(export))]
17 /// A custom keyword for an emoji.
18 pub struct CustomEmojiKeyword {
20 pub custom_emoji_id: CustomEmojiId,
24 #[derive(Debug, Clone, TypedBuilder)]
25 #[cfg_attr(feature = "full", derive(Insertable, AsChangeset))]
26 #[cfg_attr(feature = "full", diesel(table_name = custom_emoji_keyword))]
27 pub struct CustomEmojiKeywordInsertForm {
28 pub custom_emoji_id: CustomEmojiId,