chore: regenerate SeaORM entities

This commit is contained in:
naskya 2024-01-13 22:52:32 +09:00
parent 7c93e1a91a
commit 69cf9b42e0
Signed by: naskya
GPG key ID: 712D413B3A9FED5C
5 changed files with 23 additions and 50 deletions

View file

@ -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<super::antenna::Entity> for Entity {
fn to() -> RelationDef {
Relation::Antenna.def()
}
}
impl Related<super::note::Entity> for Entity {
fn to() -> RelationDef {
Relation::Note.def()
}
}
impl ActiveModelBehavior for ActiveModel {}

View file

@ -51,6 +51,7 @@ pub mod registration_ticket;
pub mod registry_item; pub mod registry_item;
pub mod relay; pub mod relay;
pub mod renote_muting; pub mod renote_muting;
pub mod reply_muting;
pub mod sea_orm_active_enums; pub mod sea_orm_active_enums;
pub mod signin; pub mod signin;
pub mod sw_subscription; pub mod sw_subscription;

View file

@ -61,7 +61,6 @@ pub struct Model {
pub thread_id: Option<String>, pub thread_id: Option<String>,
#[sea_orm(column_name = "updatedAt")] #[sea_orm(column_name = "updatedAt")]
pub updated_at: Option<DateTimeWithTimeZone>, pub updated_at: Option<DateTimeWithTimeZone>,
#[sea_orm(column_name = "lang")]
pub lang: Option<String>, pub lang: Option<String>,
} }

View file

@ -49,6 +49,7 @@ pub use super::registration_ticket::Entity as RegistrationTicket;
pub use super::registry_item::Entity as RegistryItem; pub use super::registry_item::Entity as RegistryItem;
pub use super::relay::Entity as Relay; pub use super::relay::Entity as Relay;
pub use super::renote_muting::Entity as RenoteMuting; 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::signin::Entity as Signin;
pub use super::sw_subscription::Entity as SwSubscription; pub use super::sw_subscription::Entity as SwSubscription;
pub use super::used_username::Entity as UsedUsername; pub use super::used_username::Entity as UsedUsername;

View file

@ -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 {}