chore: update auto-generated files

This commit is contained in:
naskya 2024-05-19 20:01:31 +09:00
parent fdc46bcee7
commit 196f8c13ec
No known key found for this signature in database
GPG Key ID: 712D413B3A9FED5C
6 changed files with 79 additions and 0 deletions

View File

@ -901,6 +901,12 @@ export interface ReplyMuting {
muteeId: string
muterId: string
}
export interface ScheduledNote {
id: string
noteId: string
userId: string
scheduledAt: DateTimeWithTimeZone
}
export enum AntennaSrcEnum {
All = 'all',
Group = 'group',

View File

@ -53,6 +53,7 @@ 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;

View File

@ -124,6 +124,8 @@ 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",
@ -226,6 +228,12 @@ impl Related<super::promo_read::Entity> for Entity {
}
}
impl Related<super::scheduled_note::Entity> for Entity {
fn to() -> RelationDef {
Relation::ScheduledNote.def()
}
}
impl Related<super::user::Entity> for Entity {
fn to() -> RelationDef {
Relation::User.def()

View File

@ -51,6 +51,7 @@ 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;

View File

@ -0,0 +1,55 @@
//! `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<super::note::Entity> for Entity {
fn to() -> RelationDef {
Relation::Note.def()
}
}
impl Related<super::user::Entity> for Entity {
fn to() -> RelationDef {
Relation::User.def()
}
}
impl ActiveModelBehavior for ActiveModel {}

View File

@ -153,6 +153,8 @@ 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")]
@ -345,6 +347,12 @@ impl Related<super::registry_item::Entity> for Entity {
}
}
impl Related<super::scheduled_note::Entity> for Entity {
fn to() -> RelationDef {
Relation::ScheduledNote.def()
}
}
impl Related<super::signin::Entity> for Entity {
fn to() -> RelationDef {
Relation::Signin.def()