mirror of https://github.com/LemmyNet/lemmy.git
Add WithoutId derives
parent
5e86922b0f
commit
06006d6ad3
|
@ -13,7 +13,7 @@ use typed_builder::TypedBuilder;
|
|||
|
||||
#[skip_serializing_none]
|
||||
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
||||
#[cfg_attr(feature = "full", derive(Queryable, Associations, Identifiable, TS))]
|
||||
#[cfg_attr(feature = "full", derive(Queryable, Associations, Identifiable, TS, WithoutId!))]
|
||||
#[cfg_attr(feature = "full", ts(export))]
|
||||
#[cfg_attr(feature = "full", diesel(belongs_to(crate::source::post::Post)))]
|
||||
#[cfg_attr(feature = "full", diesel(table_name = comment))]
|
||||
|
|
|
@ -6,7 +6,7 @@ use serde::{Deserialize, Serialize};
|
|||
use ts_rs::TS;
|
||||
|
||||
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
||||
#[cfg_attr(feature = "full", derive(Queryable, Associations, Identifiable, TS))]
|
||||
#[cfg_attr(feature = "full", derive(Queryable, Associations, Identifiable, TS, WithoutId!))]
|
||||
#[cfg_attr(feature = "full", diesel(belongs_to(crate::source::comment::Comment)))]
|
||||
#[cfg_attr(feature = "full", diesel(table_name = comment_reply))]
|
||||
#[cfg_attr(feature = "full", ts(export))]
|
||||
|
|
|
@ -8,7 +8,7 @@ use ts_rs::TS;
|
|||
|
||||
#[skip_serializing_none]
|
||||
#[derive(PartialEq, Eq, Serialize, Deserialize, Debug, Clone)]
|
||||
#[cfg_attr(feature = "full", derive(Queryable, Associations, Identifiable, TS))]
|
||||
#[cfg_attr(feature = "full", derive(Queryable, Associations, Identifiable, TS, WithoutId!))]
|
||||
#[cfg_attr(feature = "full", diesel(belongs_to(crate::source::comment::Comment)))]
|
||||
#[cfg_attr(feature = "full", diesel(table_name = comment_report))]
|
||||
#[cfg_attr(feature = "full", ts(export))]
|
||||
|
|
|
@ -11,7 +11,7 @@ use ts_rs::TS;
|
|||
use typed_builder::TypedBuilder;
|
||||
|
||||
#[skip_serializing_none]
|
||||
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
||||
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize, WithoutId!)]
|
||||
#[cfg_attr(feature = "full", derive(Queryable, Identifiable, TS))]
|
||||
#[cfg_attr(feature = "full", diesel(table_name = community))]
|
||||
#[cfg_attr(feature = "full", ts(export))]
|
||||
|
@ -126,7 +126,7 @@ pub struct CommunityUpdateForm {
|
|||
}
|
||||
|
||||
#[derive(PartialEq, Eq, Debug)]
|
||||
#[cfg_attr(feature = "full", derive(Identifiable, Queryable, Associations))]
|
||||
#[cfg_attr(feature = "full", derive(Identifiable, Queryable, Associations, WithoutId!))]
|
||||
#[cfg_attr(
|
||||
feature = "full",
|
||||
diesel(belongs_to(crate::source::community::Community))
|
||||
|
|
|
@ -9,7 +9,7 @@ use typed_builder::TypedBuilder;
|
|||
|
||||
#[skip_serializing_none]
|
||||
#[derive(PartialEq, Eq, Debug, Clone, Serialize, Deserialize)]
|
||||
#[cfg_attr(feature = "full", derive(Queryable, Associations, Identifiable, TS))]
|
||||
#[cfg_attr(feature = "full", derive(Queryable, Associations, Identifiable, TS, WithoutId!))]
|
||||
#[cfg_attr(feature = "full", diesel(table_name = custom_emoji))]
|
||||
#[cfg_attr(
|
||||
feature = "full",
|
||||
|
|
|
@ -7,7 +7,7 @@ use ts_rs::TS;
|
|||
use typed_builder::TypedBuilder;
|
||||
|
||||
#[derive(PartialEq, Eq, Debug, Clone, Serialize, Deserialize)]
|
||||
#[cfg_attr(feature = "full", derive(Queryable, Associations, Identifiable, TS))]
|
||||
#[cfg_attr(feature = "full", derive(Queryable, Associations, Identifiable, TS, WithoutId!))]
|
||||
#[cfg_attr(feature = "full", diesel(table_name = custom_emoji_keyword))]
|
||||
#[cfg_attr(
|
||||
feature = "full",
|
||||
|
|
|
@ -13,7 +13,7 @@ use typed_builder::TypedBuilder;
|
|||
|
||||
#[skip_serializing_none]
|
||||
#[derive(PartialEq, Eq, Debug, Clone, Serialize, Deserialize)]
|
||||
#[cfg_attr(feature = "full", derive(Queryable, Identifiable, TS))]
|
||||
#[cfg_attr(feature = "full", derive(Queryable, Identifiable, TS, WithoutId!))]
|
||||
#[cfg_attr(feature = "full", diesel(table_name = local_site))]
|
||||
#[cfg_attr(feature = "full", diesel(belongs_to(crate::source::site::Site)))]
|
||||
#[cfg_attr(feature = "full", ts(export))]
|
||||
|
|
|
@ -9,7 +9,7 @@ use typed_builder::TypedBuilder;
|
|||
|
||||
#[skip_serializing_none]
|
||||
#[derive(PartialEq, Eq, Debug, Clone, Serialize, Deserialize)]
|
||||
#[cfg_attr(feature = "full", derive(Queryable, Identifiable, TS))]
|
||||
#[cfg_attr(feature = "full", derive(Queryable, Identifiable, TS, WithoutId!))]
|
||||
#[cfg_attr(feature = "full", diesel(table_name = local_site_rate_limit))]
|
||||
#[cfg_attr(
|
||||
feature = "full",
|
||||
|
|
|
@ -13,7 +13,7 @@ use typed_builder::TypedBuilder;
|
|||
|
||||
#[skip_serializing_none]
|
||||
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
||||
#[cfg_attr(feature = "full", derive(Queryable, Identifiable, TS))]
|
||||
#[cfg_attr(feature = "full", derive(Queryable, Identifiable, TS, WithoutId!))]
|
||||
#[cfg_attr(feature = "full", diesel(table_name = local_user))]
|
||||
#[cfg_attr(feature = "full", ts(export))]
|
||||
/// A local user.
|
||||
|
|
|
@ -12,7 +12,7 @@ use typed_builder::TypedBuilder;
|
|||
|
||||
#[skip_serializing_none]
|
||||
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
||||
#[cfg_attr(feature = "full", derive(Queryable, Identifiable, TS))]
|
||||
#[cfg_attr(feature = "full", derive(Queryable, Identifiable, TS, WithoutId!))]
|
||||
#[cfg_attr(feature = "full", diesel(table_name = person))]
|
||||
#[cfg_attr(feature = "full", ts(export))]
|
||||
/// A person.
|
||||
|
|
|
@ -6,7 +6,7 @@ use serde::{Deserialize, Serialize};
|
|||
use ts_rs::TS;
|
||||
|
||||
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
||||
#[cfg_attr(feature = "full", derive(Queryable, Associations, Identifiable, TS))]
|
||||
#[cfg_attr(feature = "full", derive(Queryable, Associations, Identifiable, TS, WithoutId!))]
|
||||
#[cfg_attr(feature = "full", diesel(belongs_to(crate::source::comment::Comment)))]
|
||||
#[cfg_attr(feature = "full", diesel(table_name = person_mention))]
|
||||
#[cfg_attr(feature = "full", ts(export))]
|
||||
|
|
|
@ -9,7 +9,7 @@ use typed_builder::TypedBuilder;
|
|||
|
||||
#[skip_serializing_none]
|
||||
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
||||
#[cfg_attr(feature = "full", derive(Queryable, Identifiable, TS))]
|
||||
#[cfg_attr(feature = "full", derive(Queryable, Identifiable, TS, WithoutId!))]
|
||||
#[cfg_attr(feature = "full", diesel(table_name = post))]
|
||||
#[cfg_attr(feature = "full", ts(export))]
|
||||
/// A post.
|
||||
|
|
|
@ -8,7 +8,7 @@ use ts_rs::TS;
|
|||
|
||||
#[skip_serializing_none]
|
||||
#[derive(PartialEq, Eq, Serialize, Deserialize, Debug, Clone)]
|
||||
#[cfg_attr(feature = "full", derive(Identifiable, Queryable, Associations, TS))]
|
||||
#[cfg_attr(feature = "full", derive(Identifiable, Queryable, Associations, TS, WithoutId!))]
|
||||
#[cfg_attr(feature = "full", diesel(belongs_to(crate::source::post::Post)))] // Is this the right assoc?
|
||||
#[cfg_attr(feature = "full", diesel(table_name = post_report))]
|
||||
#[cfg_attr(feature = "full", ts(export))]
|
||||
|
|
|
@ -9,7 +9,7 @@ use typed_builder::TypedBuilder;
|
|||
|
||||
#[skip_serializing_none]
|
||||
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
||||
#[cfg_attr(feature = "full", derive(Queryable, Associations, Identifiable, TS))]
|
||||
#[cfg_attr(feature = "full", derive(Queryable, Associations, Identifiable, TS, WithoutId!))]
|
||||
#[cfg_attr(
|
||||
feature = "full",
|
||||
diesel(belongs_to(crate::source::person::Person, foreign_key = creator_id)
|
||||
|
|
|
@ -8,7 +8,7 @@ use ts_rs::TS;
|
|||
|
||||
#[skip_serializing_none]
|
||||
#[derive(PartialEq, Eq, Serialize, Deserialize, Debug, Clone)]
|
||||
#[cfg_attr(feature = "full", derive(Queryable, Associations, Identifiable, TS))]
|
||||
#[cfg_attr(feature = "full", derive(Queryable, Associations, Identifiable, TS, WithoutId!))]
|
||||
#[cfg_attr(
|
||||
feature = "full",
|
||||
diesel(belongs_to(crate::source::private_message::PrivateMessage))
|
||||
|
|
|
@ -10,7 +10,7 @@ use typed_builder::TypedBuilder;
|
|||
|
||||
#[skip_serializing_none]
|
||||
#[derive(PartialEq, Eq, Debug, Clone, Serialize, Deserialize)]
|
||||
#[cfg_attr(feature = "full", derive(Queryable, Identifiable, TS))]
|
||||
#[cfg_attr(feature = "full", derive(Queryable, Identifiable, TS, WithoutId!))]
|
||||
#[cfg_attr(feature = "full", diesel(table_name = site))]
|
||||
#[cfg_attr(feature = "full", ts(export))]
|
||||
/// The site.
|
||||
|
|
Loading…
Reference in New Issue