diff --git a/packages/backend-rs/index.d.ts b/packages/backend-rs/index.d.ts index 7be4b269e6..57e2ae8ed8 100644 --- a/packages/backend-rs/index.d.ts +++ b/packages/backend-rs/index.d.ts @@ -749,6 +749,7 @@ export interface Note { threadId: string | null updatedAt: DateTimeWithTimeZone | null lang: string | null + scheduledAt: DateTimeWithTimeZone | null } export interface NoteEdit { id: string @@ -908,12 +909,6 @@ export interface ReplyMuting { muteeId: string muterId: string } -export interface ScheduledNote { - id: string - noteId: string - userId: string - scheduledAt: DateTimeWithTimeZone -} export enum AntennaSrc { All = 'all', Group = 'group', diff --git a/packages/backend-rs/src/model/entity/mod.rs b/packages/backend-rs/src/model/entity/mod.rs index 7f8d16f1ae..ffb21352d2 100644 --- a/packages/backend-rs/src/model/entity/mod.rs +++ b/packages/backend-rs/src/model/entity/mod.rs @@ -53,7 +53,6 @@ pub mod registry_item; pub mod relay; pub mod renote_muting; pub mod reply_muting; -pub mod scheduled_note; pub mod sea_orm_active_enums; pub mod signin; pub mod sw_subscription; diff --git a/packages/backend-rs/src/model/entity/note.rs b/packages/backend-rs/src/model/entity/note.rs index 37cbd54862..4733e85d26 100644 --- a/packages/backend-rs/src/model/entity/note.rs +++ b/packages/backend-rs/src/model/entity/note.rs @@ -68,6 +68,8 @@ pub struct Model { #[sea_orm(column_name = "updatedAt")] pub updated_at: Option, pub lang: Option, + #[sea_orm(column_name = "scheduledAt")] + pub scheduled_at: Option, } #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] @@ -124,8 +126,6 @@ pub enum Relation { PromoNote, #[sea_orm(has_many = "super::promo_read::Entity")] PromoRead, - #[sea_orm(has_many = "super::scheduled_note::Entity")] - ScheduledNote, #[sea_orm( belongs_to = "super::user::Entity", from = "Column::UserId", @@ -228,12 +228,6 @@ impl Related for Entity { } } -impl Related for Entity { - fn to() -> RelationDef { - Relation::ScheduledNote.def() - } -} - impl Related for Entity { fn to() -> RelationDef { Relation::User.def() diff --git a/packages/backend-rs/src/model/entity/prelude.rs b/packages/backend-rs/src/model/entity/prelude.rs index 9da0c02506..57fff023db 100644 --- a/packages/backend-rs/src/model/entity/prelude.rs +++ b/packages/backend-rs/src/model/entity/prelude.rs @@ -51,7 +51,6 @@ 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::scheduled_note::Entity as ScheduledNote; 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-rs/src/model/entity/scheduled_note.rs b/packages/backend-rs/src/model/entity/scheduled_note.rs deleted file mode 100644 index f4c5b0b4c4..0000000000 --- a/packages/backend-rs/src/model/entity/scheduled_note.rs +++ /dev/null @@ -1,55 +0,0 @@ -//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.15 - -use sea_orm::entity::prelude::*; - -#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, serde::Serialize, serde::Deserialize)] -#[serde(rename_all = "camelCase")] -#[sea_orm(table_name = "scheduled_note")] -#[cfg_attr( - feature = "napi", - napi_derive::napi(object, js_name = "ScheduledNote", use_nullable = true) -)] -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 = "userId")] - pub user_id: String, - #[sea_orm(column_name = "scheduledAt")] - pub scheduled_at: DateTimeWithTimeZone, -} - -#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] -pub enum Relation { - #[sea_orm( - belongs_to = "super::note::Entity", - from = "Column::NoteId", - to = "super::note::Column::Id", - on_update = "NoAction", - on_delete = "Cascade" - )] - Note, - #[sea_orm( - belongs_to = "super::user::Entity", - from = "Column::UserId", - to = "super::user::Column::Id", - on_update = "NoAction", - on_delete = "Cascade" - )] - User, -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::Note.def() - } -} - -impl Related for Entity { - fn to() -> RelationDef { - Relation::User.def() - } -} - -impl ActiveModelBehavior for ActiveModel {} diff --git a/packages/backend-rs/src/model/entity/user.rs b/packages/backend-rs/src/model/entity/user.rs index 974ba2890c..309410b0b6 100644 --- a/packages/backend-rs/src/model/entity/user.rs +++ b/packages/backend-rs/src/model/entity/user.rs @@ -153,8 +153,6 @@ pub enum Relation { PromoRead, #[sea_orm(has_many = "super::registry_item::Entity")] RegistryItem, - #[sea_orm(has_many = "super::scheduled_note::Entity")] - ScheduledNote, #[sea_orm(has_many = "super::signin::Entity")] Signin, #[sea_orm(has_many = "super::sw_subscription::Entity")] @@ -347,12 +345,6 @@ impl Related for Entity { } } -impl Related for Entity { - fn to() -> RelationDef { - Relation::ScheduledNote.def() - } -} - impl Related for Entity { fn to() -> RelationDef { Relation::Signin.def()