use vec newtype
This commit is contained in:
parent
6178593e22
commit
745384ff58
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
|
use super::newtype::StringVec;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "access_token")]
|
#[sea_orm(table_name = "access_token")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
@ -22,7 +24,7 @@ pub struct Model {
|
|||||||
pub description: Option<String>,
|
pub description: Option<String>,
|
||||||
#[sea_orm(column_name = "iconUrl")]
|
#[sea_orm(column_name = "iconUrl")]
|
||||||
pub icon_url: Option<String>,
|
pub icon_url: Option<String>,
|
||||||
pub permission: Vec<String>,
|
pub permission: StringVec,
|
||||||
pub fetched: bool,
|
pub fetched: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
|
use super::newtype::StringVec;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "app")]
|
#[sea_orm(table_name = "app")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
@ -14,7 +16,7 @@ pub struct Model {
|
|||||||
pub secret: String,
|
pub secret: String,
|
||||||
pub name: String,
|
pub name: String,
|
||||||
pub description: String,
|
pub description: String,
|
||||||
pub permission: Vec<String>,
|
pub permission: StringVec,
|
||||||
#[sea_orm(column_name = "callbackUrl")]
|
#[sea_orm(column_name = "callbackUrl")]
|
||||||
pub callback_url: Option<String>,
|
pub callback_url: Option<String>,
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
|
use super::newtype::StringVec;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "emoji")]
|
#[sea_orm(table_name = "emoji")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
@ -15,7 +17,7 @@ pub struct Model {
|
|||||||
pub original_url: String,
|
pub original_url: String,
|
||||||
pub uri: Option<String>,
|
pub uri: Option<String>,
|
||||||
pub r#type: Option<String>,
|
pub r#type: Option<String>,
|
||||||
pub aliases: Vec<String>,
|
pub aliases: StringVec,
|
||||||
pub category: Option<String>,
|
pub category: Option<String>,
|
||||||
#[sea_orm(column_name = "publicUrl")]
|
#[sea_orm(column_name = "publicUrl")]
|
||||||
pub public_url: String,
|
pub public_url: String,
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
|
use super::newtype::StringVec;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "gallery_post")]
|
#[sea_orm(table_name = "gallery_post")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
@ -16,12 +18,12 @@ pub struct Model {
|
|||||||
#[sea_orm(column_name = "userId")]
|
#[sea_orm(column_name = "userId")]
|
||||||
pub user_id: String,
|
pub user_id: String,
|
||||||
#[sea_orm(column_name = "fileIds")]
|
#[sea_orm(column_name = "fileIds")]
|
||||||
pub file_ids: Vec<String>,
|
pub file_ids: StringVec,
|
||||||
#[sea_orm(column_name = "isSensitive")]
|
#[sea_orm(column_name = "isSensitive")]
|
||||||
pub is_sensitive: bool,
|
pub is_sensitive: bool,
|
||||||
#[sea_orm(column_name = "likedCount")]
|
#[sea_orm(column_name = "likedCount")]
|
||||||
pub liked_count: i32,
|
pub liked_count: i32,
|
||||||
pub tags: Vec<String>,
|
pub tags: StringVec,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
|
use super::newtype::StringVec;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "hashtag")]
|
#[sea_orm(table_name = "hashtag")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
@ -9,27 +11,27 @@ pub struct Model {
|
|||||||
pub id: String,
|
pub id: String,
|
||||||
pub name: String,
|
pub name: String,
|
||||||
#[sea_orm(column_name = "mentionedUserIds")]
|
#[sea_orm(column_name = "mentionedUserIds")]
|
||||||
pub mentioned_user_ids: Vec<String>,
|
pub mentioned_user_ids: StringVec,
|
||||||
#[sea_orm(column_name = "mentionedUsersCount")]
|
#[sea_orm(column_name = "mentionedUsersCount")]
|
||||||
pub mentioned_users_count: i32,
|
pub mentioned_users_count: i32,
|
||||||
#[sea_orm(column_name = "mentionedLocalUserIds")]
|
#[sea_orm(column_name = "mentionedLocalUserIds")]
|
||||||
pub mentioned_local_user_ids: Vec<String>,
|
pub mentioned_local_user_ids: StringVec,
|
||||||
#[sea_orm(column_name = "mentionedLocalUsersCount")]
|
#[sea_orm(column_name = "mentionedLocalUsersCount")]
|
||||||
pub mentioned_local_users_count: i32,
|
pub mentioned_local_users_count: i32,
|
||||||
#[sea_orm(column_name = "mentionedRemoteUserIds")]
|
#[sea_orm(column_name = "mentionedRemoteUserIds")]
|
||||||
pub mentioned_remote_user_ids: Vec<String>,
|
pub mentioned_remote_user_ids: StringVec,
|
||||||
#[sea_orm(column_name = "mentionedRemoteUsersCount")]
|
#[sea_orm(column_name = "mentionedRemoteUsersCount")]
|
||||||
pub mentioned_remote_users_count: i32,
|
pub mentioned_remote_users_count: i32,
|
||||||
#[sea_orm(column_name = "attachedUserIds")]
|
#[sea_orm(column_name = "attachedUserIds")]
|
||||||
pub attached_user_ids: Vec<String>,
|
pub attached_user_ids: StringVec,
|
||||||
#[sea_orm(column_name = "attachedUsersCount")]
|
#[sea_orm(column_name = "attachedUsersCount")]
|
||||||
pub attached_users_count: i32,
|
pub attached_users_count: i32,
|
||||||
#[sea_orm(column_name = "attachedLocalUserIds")]
|
#[sea_orm(column_name = "attachedLocalUserIds")]
|
||||||
pub attached_local_user_ids: Vec<String>,
|
pub attached_local_user_ids: StringVec,
|
||||||
#[sea_orm(column_name = "attachedLocalUsersCount")]
|
#[sea_orm(column_name = "attachedLocalUsersCount")]
|
||||||
pub attached_local_users_count: i32,
|
pub attached_local_users_count: i32,
|
||||||
#[sea_orm(column_name = "attachedRemoteUserIds")]
|
#[sea_orm(column_name = "attachedRemoteUserIds")]
|
||||||
pub attached_remote_user_ids: Vec<String>,
|
pub attached_remote_user_ids: StringVec,
|
||||||
#[sea_orm(column_name = "attachedRemoteUsersCount")]
|
#[sea_orm(column_name = "attachedRemoteUsersCount")]
|
||||||
pub attached_remote_users_count: i32,
|
pub attached_remote_users_count: i32,
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
|
use super::newtype::StringVec;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "messaging_message")]
|
#[sea_orm(table_name = "messaging_message")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
@ -20,7 +22,7 @@ pub struct Model {
|
|||||||
pub file_id: Option<String>,
|
pub file_id: Option<String>,
|
||||||
#[sea_orm(column_name = "groupId")]
|
#[sea_orm(column_name = "groupId")]
|
||||||
pub group_id: Option<String>,
|
pub group_id: Option<String>,
|
||||||
pub reads: Vec<String>,
|
pub reads: StringVec,
|
||||||
pub uri: Option<String>,
|
pub uri: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,6 +4,8 @@ use super::sea_orm_active_enums::MetaSensitivemediadetectionEnum;
|
|||||||
use super::sea_orm_active_enums::MetaSensitivemediadetectionsensitivityEnum;
|
use super::sea_orm_active_enums::MetaSensitivemediadetectionsensitivityEnum;
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
|
use super::newtype::StringVec;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "meta")]
|
#[sea_orm(table_name = "meta")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
@ -23,11 +25,11 @@ pub struct Model {
|
|||||||
pub disable_global_timeline: bool,
|
pub disable_global_timeline: bool,
|
||||||
#[sea_orm(column_name = "useStarForReactionFallback")]
|
#[sea_orm(column_name = "useStarForReactionFallback")]
|
||||||
pub use_star_for_reaction_fallback: bool,
|
pub use_star_for_reaction_fallback: bool,
|
||||||
pub langs: Vec<String>,
|
pub langs: StringVec,
|
||||||
#[sea_orm(column_name = "hiddenTags")]
|
#[sea_orm(column_name = "hiddenTags")]
|
||||||
pub hidden_tags: Vec<String>,
|
pub hidden_tags: StringVec,
|
||||||
#[sea_orm(column_name = "blockedHosts")]
|
#[sea_orm(column_name = "blockedHosts")]
|
||||||
pub blocked_hosts: Vec<String>,
|
pub blocked_hosts: StringVec,
|
||||||
#[sea_orm(column_name = "mascotImageUrl")]
|
#[sea_orm(column_name = "mascotImageUrl")]
|
||||||
pub mascot_image_url: Option<String>,
|
pub mascot_image_url: Option<String>,
|
||||||
#[sea_orm(column_name = "bannerUrl")]
|
#[sea_orm(column_name = "bannerUrl")]
|
||||||
@ -88,7 +90,7 @@ pub struct Model {
|
|||||||
#[sea_orm(column_name = "discordClientSecret")]
|
#[sea_orm(column_name = "discordClientSecret")]
|
||||||
pub discord_client_secret: Option<String>,
|
pub discord_client_secret: Option<String>,
|
||||||
#[sea_orm(column_name = "pinnedUsers")]
|
#[sea_orm(column_name = "pinnedUsers")]
|
||||||
pub pinned_users: Vec<String>,
|
pub pinned_users: StringVec,
|
||||||
#[sea_orm(column_name = "ToSUrl")]
|
#[sea_orm(column_name = "ToSUrl")]
|
||||||
pub to_s_url: Option<String>,
|
pub to_s_url: Option<String>,
|
||||||
#[sea_orm(column_name = "repositoryUrl")]
|
#[sea_orm(column_name = "repositoryUrl")]
|
||||||
@ -128,7 +130,7 @@ pub struct Model {
|
|||||||
#[sea_orm(column_name = "objectStorageSetPublicRead")]
|
#[sea_orm(column_name = "objectStorageSetPublicRead")]
|
||||||
pub object_storage_set_public_read: bool,
|
pub object_storage_set_public_read: bool,
|
||||||
#[sea_orm(column_name = "pinnedPages")]
|
#[sea_orm(column_name = "pinnedPages")]
|
||||||
pub pinned_pages: Vec<String>,
|
pub pinned_pages: StringVec,
|
||||||
#[sea_orm(column_name = "backgroundImageUrl")]
|
#[sea_orm(column_name = "backgroundImageUrl")]
|
||||||
pub background_image_url: Option<String>,
|
pub background_image_url: Option<String>,
|
||||||
#[sea_orm(column_name = "logoImageUrl")]
|
#[sea_orm(column_name = "logoImageUrl")]
|
||||||
@ -138,7 +140,7 @@ pub struct Model {
|
|||||||
#[sea_orm(column_name = "objectStorageS3ForcePathStyle")]
|
#[sea_orm(column_name = "objectStorageS3ForcePathStyle")]
|
||||||
pub object_storage_s3_force_path_style: bool,
|
pub object_storage_s3_force_path_style: bool,
|
||||||
#[sea_orm(column_name = "allowedHosts")]
|
#[sea_orm(column_name = "allowedHosts")]
|
||||||
pub allowed_hosts: Option<Vec<String>>,
|
pub allowed_hosts: Option<StringVec>,
|
||||||
#[sea_orm(column_name = "secureMode")]
|
#[sea_orm(column_name = "secureMode")]
|
||||||
pub secure_mode: Option<bool>,
|
pub secure_mode: Option<bool>,
|
||||||
#[sea_orm(column_name = "privateMode")]
|
#[sea_orm(column_name = "privateMode")]
|
||||||
@ -168,13 +170,13 @@ pub struct Model {
|
|||||||
#[sea_orm(column_name = "enableActiveEmailValidation")]
|
#[sea_orm(column_name = "enableActiveEmailValidation")]
|
||||||
pub enable_active_email_validation: bool,
|
pub enable_active_email_validation: bool,
|
||||||
#[sea_orm(column_name = "customMOTD")]
|
#[sea_orm(column_name = "customMOTD")]
|
||||||
pub custom_motd: Vec<String>,
|
pub custom_motd: StringVec,
|
||||||
#[sea_orm(column_name = "customSplashIcons")]
|
#[sea_orm(column_name = "customSplashIcons")]
|
||||||
pub custom_splash_icons: Vec<String>,
|
pub custom_splash_icons: StringVec,
|
||||||
#[sea_orm(column_name = "disableRecommendedTimeline")]
|
#[sea_orm(column_name = "disableRecommendedTimeline")]
|
||||||
pub disable_recommended_timeline: bool,
|
pub disable_recommended_timeline: bool,
|
||||||
#[sea_orm(column_name = "recommendedInstances")]
|
#[sea_orm(column_name = "recommendedInstances")]
|
||||||
pub recommended_instances: Vec<String>,
|
pub recommended_instances: StringVec,
|
||||||
#[sea_orm(column_name = "enableGuestTimeline")]
|
#[sea_orm(column_name = "enableGuestTimeline")]
|
||||||
pub enable_guest_timeline: bool,
|
pub enable_guest_timeline: bool,
|
||||||
#[sea_orm(column_name = "defaultReaction")]
|
#[sea_orm(column_name = "defaultReaction")]
|
||||||
@ -184,7 +186,7 @@ pub struct Model {
|
|||||||
#[sea_orm(column_name = "libreTranslateApiKey")]
|
#[sea_orm(column_name = "libreTranslateApiKey")]
|
||||||
pub libre_translate_api_key: Option<String>,
|
pub libre_translate_api_key: Option<String>,
|
||||||
#[sea_orm(column_name = "silencedHosts")]
|
#[sea_orm(column_name = "silencedHosts")]
|
||||||
pub silenced_hosts: Vec<String>,
|
pub silenced_hosts: StringVec,
|
||||||
#[sea_orm(column_name = "experimentalFeatures", column_type = "JsonBinary")]
|
#[sea_orm(column_name = "experimentalFeatures", column_type = "JsonBinary")]
|
||||||
pub experimental_features: Json,
|
pub experimental_features: Json,
|
||||||
}
|
}
|
||||||
|
@ -15,10 +15,16 @@ impl_json_newtype!(JsonKeyword);
|
|||||||
pub struct JsonStringVec(pub Vec<String>);
|
pub struct JsonStringVec(pub Vec<String>);
|
||||||
impl_json_newtype!(JsonStringVec);
|
impl_json_newtype!(JsonStringVec);
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, From, Into)]
|
||||||
|
pub struct JsonI32Vec(pub Vec<i32>);
|
||||||
|
impl_json_newtype!(JsonI32Vec);
|
||||||
|
|
||||||
cfg_if! {
|
cfg_if! {
|
||||||
if #[cfg(feature = "legacy")] {
|
if #[cfg(feature = "legacy")] {
|
||||||
pub type StringVec = Vec<String>;
|
pub type StringVec = Vec<String>;
|
||||||
|
pub type I32Vec = Vec<i32>;
|
||||||
} else {
|
} else {
|
||||||
pub type StringVec = JsonStringVec;
|
pub type StringVec = JsonStringVec;
|
||||||
|
pub type I32Vec = JsonI32Vec;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
use super::sea_orm_active_enums::NoteVisibilityEnum;
|
use super::sea_orm_active_enums::NoteVisibilityEnum;
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
|
use super::newtype::StringVec;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "note")]
|
#[sea_orm(table_name = "note")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
@ -32,16 +34,16 @@ pub struct Model {
|
|||||||
pub uri: Option<String>,
|
pub uri: Option<String>,
|
||||||
pub score: i32,
|
pub score: i32,
|
||||||
#[sea_orm(column_name = "fileIds")]
|
#[sea_orm(column_name = "fileIds")]
|
||||||
pub file_ids: Vec<String>,
|
pub file_ids: StringVec,
|
||||||
#[sea_orm(column_name = "attachedFileTypes")]
|
#[sea_orm(column_name = "attachedFileTypes")]
|
||||||
pub attached_file_types: Vec<String>,
|
pub attached_file_types: StringVec,
|
||||||
#[sea_orm(column_name = "visibleUserIds")]
|
#[sea_orm(column_name = "visibleUserIds")]
|
||||||
pub visible_user_ids: Vec<String>,
|
pub visible_user_ids: StringVec,
|
||||||
pub mentions: Vec<String>,
|
pub mentions: StringVec,
|
||||||
#[sea_orm(column_name = "mentionedRemoteUsers", column_type = "Text")]
|
#[sea_orm(column_name = "mentionedRemoteUsers", column_type = "Text")]
|
||||||
pub mentioned_remote_users: String,
|
pub mentioned_remote_users: String,
|
||||||
pub emojis: Vec<String>,
|
pub emojis: StringVec,
|
||||||
pub tags: Vec<String>,
|
pub tags: StringVec,
|
||||||
#[sea_orm(column_name = "hasPoll")]
|
#[sea_orm(column_name = "hasPoll")]
|
||||||
pub has_poll: bool,
|
pub has_poll: bool,
|
||||||
#[sea_orm(column_name = "userHost")]
|
#[sea_orm(column_name = "userHost")]
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
|
use super::newtype::StringVec;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "note_edit")]
|
#[sea_orm(table_name = "note_edit")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
@ -13,7 +15,7 @@ pub struct Model {
|
|||||||
pub text: Option<String>,
|
pub text: Option<String>,
|
||||||
pub cw: Option<String>,
|
pub cw: Option<String>,
|
||||||
#[sea_orm(column_name = "fileIds")]
|
#[sea_orm(column_name = "fileIds")]
|
||||||
pub file_ids: Vec<String>,
|
pub file_ids: StringVec,
|
||||||
#[sea_orm(column_name = "updatedAt")]
|
#[sea_orm(column_name = "updatedAt")]
|
||||||
pub updated_at: DateTimeWithTimeZone,
|
pub updated_at: DateTimeWithTimeZone,
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
use super::sea_orm_active_enums::PageVisibilityEnum;
|
use super::sea_orm_active_enums::PageVisibilityEnum;
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
|
use super::newtype::StringVec;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "page")]
|
#[sea_orm(table_name = "page")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
@ -28,7 +30,7 @@ pub struct Model {
|
|||||||
pub variables: Json,
|
pub variables: Json,
|
||||||
pub visibility: PageVisibilityEnum,
|
pub visibility: PageVisibilityEnum,
|
||||||
#[sea_orm(column_name = "visibleUserIds")]
|
#[sea_orm(column_name = "visibleUserIds")]
|
||||||
pub visible_user_ids: Vec<String>,
|
pub visible_user_ids: StringVec,
|
||||||
#[sea_orm(column_name = "likedCount")]
|
#[sea_orm(column_name = "likedCount")]
|
||||||
pub liked_count: i32,
|
pub liked_count: i32,
|
||||||
#[sea_orm(column_name = "hideTitleWhenPinned")]
|
#[sea_orm(column_name = "hideTitleWhenPinned")]
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
use super::sea_orm_active_enums::PollNotevisibilityEnum;
|
use super::sea_orm_active_enums::PollNotevisibilityEnum;
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
|
use super::newtype::{I32Vec, StringVec};
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "poll")]
|
#[sea_orm(table_name = "poll")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
@ -11,8 +13,8 @@ pub struct Model {
|
|||||||
#[sea_orm(column_name = "expiresAt")]
|
#[sea_orm(column_name = "expiresAt")]
|
||||||
pub expires_at: Option<DateTimeWithTimeZone>,
|
pub expires_at: Option<DateTimeWithTimeZone>,
|
||||||
pub multiple: bool,
|
pub multiple: bool,
|
||||||
pub choices: Vec<String>,
|
pub choices: StringVec,
|
||||||
pub votes: Vec<i32>,
|
pub votes: I32Vec,
|
||||||
#[sea_orm(column_name = "noteVisibility")]
|
#[sea_orm(column_name = "noteVisibility")]
|
||||||
pub note_visibility: PollNotevisibilityEnum,
|
pub note_visibility: PollNotevisibilityEnum,
|
||||||
#[sea_orm(column_name = "userId")]
|
#[sea_orm(column_name = "userId")]
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
|
use super::newtype::StringVec;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "registry_item")]
|
#[sea_orm(table_name = "registry_item")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
@ -14,7 +16,7 @@ pub struct Model {
|
|||||||
#[sea_orm(column_name = "userId")]
|
#[sea_orm(column_name = "userId")]
|
||||||
pub user_id: String,
|
pub user_id: String,
|
||||||
pub key: String,
|
pub key: String,
|
||||||
pub scope: Vec<String>,
|
pub scope: StringVec,
|
||||||
pub domain: Option<String>,
|
pub domain: Option<String>,
|
||||||
#[sea_orm(column_type = "JsonBinary", nullable)]
|
#[sea_orm(column_type = "JsonBinary", nullable)]
|
||||||
pub value: Option<Json>,
|
pub value: Option<Json>,
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
|
use super::newtype::StringVec;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "reversi_game")]
|
#[sea_orm(table_name = "reversi_game")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
@ -29,7 +31,7 @@ pub struct Model {
|
|||||||
pub surrendered: Option<String>,
|
pub surrendered: Option<String>,
|
||||||
#[sea_orm(column_type = "JsonBinary")]
|
#[sea_orm(column_type = "JsonBinary")]
|
||||||
pub logs: Json,
|
pub logs: Json,
|
||||||
pub map: Vec<String>,
|
pub map: StringVec,
|
||||||
pub bw: String,
|
pub bw: String,
|
||||||
#[sea_orm(column_name = "isLlotheo")]
|
#[sea_orm(column_name = "isLlotheo")]
|
||||||
pub is_llotheo: bool,
|
pub is_llotheo: bool,
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
|
use super::newtype::StringVec;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "user")]
|
#[sea_orm(table_name = "user")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
@ -27,7 +29,7 @@ pub struct Model {
|
|||||||
pub avatar_id: Option<String>,
|
pub avatar_id: Option<String>,
|
||||||
#[sea_orm(column_name = "bannerId", unique)]
|
#[sea_orm(column_name = "bannerId", unique)]
|
||||||
pub banner_id: Option<String>,
|
pub banner_id: Option<String>,
|
||||||
pub tags: Vec<String>,
|
pub tags: StringVec,
|
||||||
#[sea_orm(column_name = "isSuspended")]
|
#[sea_orm(column_name = "isSuspended")]
|
||||||
pub is_suspended: bool,
|
pub is_suspended: bool,
|
||||||
#[sea_orm(column_name = "isSilenced")]
|
#[sea_orm(column_name = "isSilenced")]
|
||||||
@ -42,7 +44,7 @@ pub struct Model {
|
|||||||
pub is_admin: bool,
|
pub is_admin: bool,
|
||||||
#[sea_orm(column_name = "isModerator")]
|
#[sea_orm(column_name = "isModerator")]
|
||||||
pub is_moderator: bool,
|
pub is_moderator: bool,
|
||||||
pub emojis: Vec<String>,
|
pub emojis: StringVec,
|
||||||
pub host: Option<String>,
|
pub host: Option<String>,
|
||||||
pub inbox: Option<String>,
|
pub inbox: Option<String>,
|
||||||
#[sea_orm(column_name = "sharedInbox")]
|
#[sea_orm(column_name = "sharedInbox")]
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
use super::sea_orm_active_enums::UserProfileFfvisibilityEnum;
|
use super::sea_orm_active_enums::UserProfileFfvisibilityEnum;
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
|
use super::newtype::StringVec;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "user_profile")]
|
#[sea_orm(table_name = "user_profile")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
@ -53,7 +55,7 @@ pub struct Model {
|
|||||||
#[sea_orm(column_name = "mutedWords", column_type = "JsonBinary")]
|
#[sea_orm(column_name = "mutedWords", column_type = "JsonBinary")]
|
||||||
pub muted_words: Json,
|
pub muted_words: Json,
|
||||||
#[sea_orm(column_name = "mutingNotificationTypes")]
|
#[sea_orm(column_name = "mutingNotificationTypes")]
|
||||||
pub muting_notification_types: Vec<String>,
|
pub muting_notification_types: StringVec,
|
||||||
#[sea_orm(column_name = "noCrawle")]
|
#[sea_orm(column_name = "noCrawle")]
|
||||||
pub no_crawle: bool,
|
pub no_crawle: bool,
|
||||||
#[sea_orm(column_name = "receiveAnnouncementEmail")]
|
#[sea_orm(column_name = "receiveAnnouncementEmail")]
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
|
use super::newtype::StringVec;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "webhook")]
|
#[sea_orm(table_name = "webhook")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
@ -12,7 +14,7 @@ pub struct Model {
|
|||||||
#[sea_orm(column_name = "userId")]
|
#[sea_orm(column_name = "userId")]
|
||||||
pub user_id: String,
|
pub user_id: String,
|
||||||
pub name: String,
|
pub name: String,
|
||||||
pub on: Vec<String>,
|
pub on: StringVec,
|
||||||
pub url: String,
|
pub url: String,
|
||||||
pub secret: String,
|
pub secret: String,
|
||||||
pub active: bool,
|
pub active: bool,
|
||||||
|
Loading…
Reference in New Issue
Block a user