From 69cf9b42e0fe523202d11059e47e6ab0c6f78170 Mon Sep 17 00:00:00 2001 From: naskya Date: Sat, 13 Jan 2024 22:52:32 +0900 Subject: [PATCH] chore: regenerate SeaORM entities --- .../src/model/entity/antenna_note.rs | 49 ------------------- .../native-utils/src/model/entity/mod.rs | 1 + .../native-utils/src/model/entity/note.rs | 1 - .../native-utils/src/model/entity/prelude.rs | 1 + .../src/model/entity/reply_muting.rs | 21 ++++++++ 5 files changed, 23 insertions(+), 50 deletions(-) delete mode 100644 packages/backend/native-utils/src/model/entity/antenna_note.rs create mode 100644 packages/backend/native-utils/src/model/entity/reply_muting.rs diff --git a/packages/backend/native-utils/src/model/entity/antenna_note.rs b/packages/backend/native-utils/src/model/entity/antenna_note.rs deleted file mode 100644 index c86fb349d..000000000 --- a/packages/backend/native-utils/src/model/entity/antenna_note.rs +++ /dev/null @@ -1,49 +0,0 @@ -//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3 - -use sea_orm::entity::prelude::*; - -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)] -#[sea_orm(table_name = "antenna_note")] -pub struct Model { - #[sea_orm(primary_key, auto_increment = false)] - pub id: String, - #[sea_orm(column_name = "noteId")] - pub note_id: String, - #[sea_orm(column_name = "antennaId")] - pub antenna_id: String, - pub read: bool, -} - -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation { - #[sea_orm( - belongs_to = "super::antenna::Entity", - from = "Column::AntennaId", - to = "super::antenna::Column::Id", - on_update = "NoAction", - on_delete = "Cascade" - )] - Antenna, - #[sea_orm( - belongs_to = "super::note::Entity", - from = "Column::NoteId", - to = "super::note::Column::Id", - on_update = "NoAction", - on_delete = "Cascade" - )] - Note, -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::Antenna.def() - } -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::Note.def() - } -} - -impl ActiveModelBehavior for ActiveModel {} diff --git a/packages/backend/native-utils/src/model/entity/mod.rs b/packages/backend/native-utils/src/model/entity/mod.rs index 0721c06f0..777f9df10 100644 --- a/packages/backend/native-utils/src/model/entity/mod.rs +++ b/packages/backend/native-utils/src/model/entity/mod.rs @@ -51,6 +51,7 @@ pub mod registration_ticket; pub mod registry_item; pub mod relay; pub mod renote_muting; +pub mod reply_muting; pub mod sea_orm_active_enums; pub mod signin; pub mod sw_subscription; diff --git a/packages/backend/native-utils/src/model/entity/note.rs b/packages/backend/native-utils/src/model/entity/note.rs index b7fef5943..8c5f3c380 100644 --- a/packages/backend/native-utils/src/model/entity/note.rs +++ b/packages/backend/native-utils/src/model/entity/note.rs @@ -61,7 +61,6 @@ pub struct Model { pub thread_id: Option, #[sea_orm(column_name = "updatedAt")] pub updated_at: Option, - #[sea_orm(column_name = "lang")] pub lang: Option, } diff --git a/packages/backend/native-utils/src/model/entity/prelude.rs b/packages/backend/native-utils/src/model/entity/prelude.rs index a4c9c18b9..94123d56a 100644 --- a/packages/backend/native-utils/src/model/entity/prelude.rs +++ b/packages/backend/native-utils/src/model/entity/prelude.rs @@ -49,6 +49,7 @@ pub use super::registration_ticket::Entity as RegistrationTicket; pub use super::registry_item::Entity as RegistryItem; pub use super::relay::Entity as Relay; pub use super::renote_muting::Entity as RenoteMuting; +pub use super::reply_muting::Entity as ReplyMuting; pub use super::signin::Entity as Signin; pub use super::sw_subscription::Entity as SwSubscription; pub use super::used_username::Entity as UsedUsername; diff --git a/packages/backend/native-utils/src/model/entity/reply_muting.rs b/packages/backend/native-utils/src/model/entity/reply_muting.rs new file mode 100644 index 000000000..5d4a87712 --- /dev/null +++ b/packages/backend/native-utils/src/model/entity/reply_muting.rs @@ -0,0 +1,21 @@ +//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.10 + +use sea_orm::entity::prelude::*; + +#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] +#[sea_orm(table_name = "reply_muting")] +pub struct Model { + #[sea_orm(primary_key, auto_increment = false)] + pub id: String, + #[sea_orm(column_name = "createdAt")] + pub created_at: DateTimeWithTimeZone, + #[sea_orm(column_name = "muteeId")] + pub mutee_id: String, + #[sea_orm(column_name = "muterId")] + pub muter_id: String, +} + +#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] +pub enum Relation {} + +impl ActiveModelBehavior for ActiveModel {}