chore: regenerate entities
This commit is contained in:
parent
49ce084be4
commit
ede4e436f6
75 changed files with 183 additions and 560 deletions
|
@ -1,6 +1,5 @@
|
||||||
pub mod error;
|
pub mod error;
|
||||||
|
|
||||||
use cfg_if::cfg_if;
|
|
||||||
use error::Error;
|
use error::Error;
|
||||||
use sea_orm::{Database, DbConn};
|
use sea_orm::{Database, DbConn};
|
||||||
|
|
||||||
|
@ -16,17 +15,6 @@ pub fn get_database() -> Result<&'static DbConn, Error> {
|
||||||
DB_CONN.get().ok_or(Error::Uninitialized)
|
DB_CONN.get().ok_or(Error::Uninitialized)
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg_if! {
|
|
||||||
if #[cfg(feature = "napi")] {
|
|
||||||
use napi_derive::napi;
|
|
||||||
|
|
||||||
#[napi]
|
|
||||||
pub async fn native_init_database(conn_uri: String) -> napi::Result<()> {
|
|
||||||
init_database(conn_uri).await.map_err(Into::into)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod unit_test {
|
mod unit_test {
|
||||||
use super::{error::Error, get_database};
|
use super::{error::Error, get_database};
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "abuse_user_report")]
|
#[sea_orm(table_name = "abuse_user_report")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "access_token")]
|
#[sea_orm(table_name = "access_token")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "ad")]
|
#[sea_orm(table_name = "ad")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "announcement")]
|
#[sea_orm(table_name = "announcement")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "announcement_read")]
|
#[sea_orm(table_name = "announcement_read")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use super::sea_orm_active_enums::AntennaSrcEnum;
|
use super::sea_orm_active_enums::AntennaSrcEnum;
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "antenna")]
|
#[sea_orm(table_name = "antenna")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "app")]
|
#[sea_orm(table_name = "app")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "attestation_challenge")]
|
#[sea_orm(table_name = "attestation_challenge")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "auth_session")]
|
#[sea_orm(table_name = "auth_session")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "blocking")]
|
#[sea_orm(table_name = "blocking")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "channel")]
|
#[sea_orm(table_name = "channel")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "channel_following")]
|
#[sea_orm(table_name = "channel_following")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "channel_note_pining")]
|
#[sea_orm(table_name = "channel_note_pining")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "clip")]
|
#[sea_orm(table_name = "clip")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "clip_note")]
|
#[sea_orm(table_name = "clip_note")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "drive_file")]
|
#[sea_orm(table_name = "drive_file")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "drive_folder")]
|
#[sea_orm(table_name = "drive_folder")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "emoji")]
|
#[sea_orm(table_name = "emoji")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "follow_request")]
|
#[sea_orm(table_name = "follow_request")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "following")]
|
#[sea_orm(table_name = "following")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "gallery_like")]
|
#[sea_orm(table_name = "gallery_like")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "gallery_post")]
|
#[sea_orm(table_name = "gallery_post")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "hashtag")]
|
#[sea_orm(table_name = "hashtag")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "instance")]
|
#[sea_orm(table_name = "instance")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "messaging_message")]
|
#[sea_orm(table_name = "messaging_message")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use super::sea_orm_active_enums::MetaSensitivemediadetectionEnum;
|
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::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "meta")]
|
#[sea_orm(table_name = "meta")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
@ -191,6 +191,8 @@ pub struct Model {
|
||||||
pub enable_server_machine_stats: bool,
|
pub enable_server_machine_stats: bool,
|
||||||
#[sea_orm(column_name = "enableIdenticonGeneration")]
|
#[sea_orm(column_name = "enableIdenticonGeneration")]
|
||||||
pub enable_identicon_generation: bool,
|
pub enable_identicon_generation: bool,
|
||||||
|
#[sea_orm(column_name = "donationLink")]
|
||||||
|
pub donation_link: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "migrations")]
|
#[sea_orm(table_name = "migrations")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key)]
|
#[sea_orm(primary_key)]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
pub mod prelude;
|
pub mod prelude;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "moderation_log")]
|
#[sea_orm(table_name = "moderation_log")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use super::sea_orm_active_enums::MutedNoteReasonEnum;
|
use super::sea_orm_active_enums::MutedNoteReasonEnum;
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "muted_note")]
|
#[sea_orm(table_name = "muted_note")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "muting")]
|
#[sea_orm(table_name = "muting")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use super::sea_orm_active_enums::NoteVisibilityEnum;
|
use super::sea_orm_active_enums::NoteVisibilityEnum;
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "note")]
|
#[sea_orm(table_name = "note")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "note_edit")]
|
#[sea_orm(table_name = "note_edit")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "note_favorite")]
|
#[sea_orm(table_name = "note_favorite")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "note_reaction")]
|
#[sea_orm(table_name = "note_reaction")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "note_thread_muting")]
|
#[sea_orm(table_name = "note_thread_muting")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "note_unread")]
|
#[sea_orm(table_name = "note_unread")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "note_watching")]
|
#[sea_orm(table_name = "note_watching")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use super::sea_orm_active_enums::NotificationTypeEnum;
|
use super::sea_orm_active_enums::NotificationTypeEnum;
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "notification")]
|
#[sea_orm(table_name = "notification")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use super::sea_orm_active_enums::PageVisibilityEnum;
|
use super::sea_orm_active_enums::PageVisibilityEnum;
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "page")]
|
#[sea_orm(table_name = "page")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "page_like")]
|
#[sea_orm(table_name = "page_like")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "password_reset_request")]
|
#[sea_orm(table_name = "password_reset_request")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use super::sea_orm_active_enums::PollNotevisibilityEnum;
|
use super::sea_orm_active_enums::PollNotevisibilityEnum;
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "poll")]
|
#[sea_orm(table_name = "poll")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(column_name = "noteId", primary_key, auto_increment = false, unique)]
|
#[sea_orm(column_name = "noteId", primary_key, auto_increment = false, unique)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "poll_vote")]
|
#[sea_orm(table_name = "poll_vote")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
pub use super::abuse_user_report::Entity as AbuseUserReport;
|
pub use super::abuse_user_report::Entity as AbuseUserReport;
|
||||||
pub use super::access_token::Entity as AccessToken;
|
pub use super::access_token::Entity as AccessToken;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "promo_note")]
|
#[sea_orm(table_name = "promo_note")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(column_name = "noteId", primary_key, auto_increment = false, unique)]
|
#[sea_orm(column_name = "noteId", primary_key, auto_increment = false, unique)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "promo_read")]
|
#[sea_orm(table_name = "promo_read")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "registration_ticket")]
|
#[sea_orm(table_name = "registration_ticket")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "registry_item")]
|
#[sea_orm(table_name = "registry_item")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use super::sea_orm_active_enums::RelayStatusEnum;
|
use super::sea_orm_active_enums::RelayStatusEnum;
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "relay")]
|
#[sea_orm(table_name = "relay")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "renote_muting")]
|
#[sea_orm(table_name = "renote_muting")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,14 +1,10 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
use parse_display::Display;
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Default, Display)]
|
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum)]
|
||||||
#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "antenna_src_enum")]
|
#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "antenna_src_enum")]
|
||||||
#[display(style = "camelCase")]
|
|
||||||
#[display("'{}'")]
|
|
||||||
pub enum AntennaSrcEnum {
|
pub enum AntennaSrcEnum {
|
||||||
#[default]
|
|
||||||
#[sea_orm(string_value = "all")]
|
#[sea_orm(string_value = "all")]
|
||||||
All,
|
All,
|
||||||
#[sea_orm(string_value = "group")]
|
#[sea_orm(string_value = "group")]
|
||||||
|
@ -22,14 +18,13 @@ pub enum AntennaSrcEnum {
|
||||||
#[sea_orm(string_value = "users")]
|
#[sea_orm(string_value = "users")]
|
||||||
Users,
|
Users,
|
||||||
}
|
}
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Default)]
|
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum)]
|
||||||
#[sea_orm(
|
#[sea_orm(
|
||||||
rs_type = "String",
|
rs_type = "String",
|
||||||
db_type = "Enum",
|
db_type = "Enum",
|
||||||
enum_name = "meta_sensitivemediadetection_enum"
|
enum_name = "meta_sensitivemediadetection_enum"
|
||||||
)]
|
)]
|
||||||
pub enum MetaSensitivemediadetectionEnum {
|
pub enum MetaSensitivemediadetectionEnum {
|
||||||
#[default]
|
|
||||||
#[sea_orm(string_value = "all")]
|
#[sea_orm(string_value = "all")]
|
||||||
All,
|
All,
|
||||||
#[sea_orm(string_value = "local")]
|
#[sea_orm(string_value = "local")]
|
||||||
|
@ -39,7 +34,7 @@ pub enum MetaSensitivemediadetectionEnum {
|
||||||
#[sea_orm(string_value = "remote")]
|
#[sea_orm(string_value = "remote")]
|
||||||
Remote,
|
Remote,
|
||||||
}
|
}
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Default)]
|
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum)]
|
||||||
#[sea_orm(
|
#[sea_orm(
|
||||||
rs_type = "String",
|
rs_type = "String",
|
||||||
db_type = "Enum",
|
db_type = "Enum",
|
||||||
|
@ -50,7 +45,6 @@ pub enum MetaSensitivemediadetectionsensitivityEnum {
|
||||||
High,
|
High,
|
||||||
#[sea_orm(string_value = "low")]
|
#[sea_orm(string_value = "low")]
|
||||||
Low,
|
Low,
|
||||||
#[default]
|
|
||||||
#[sea_orm(string_value = "medium")]
|
#[sea_orm(string_value = "medium")]
|
||||||
Medium,
|
Medium,
|
||||||
#[sea_orm(string_value = "veryHigh")]
|
#[sea_orm(string_value = "veryHigh")]
|
||||||
|
@ -58,14 +52,13 @@ pub enum MetaSensitivemediadetectionsensitivityEnum {
|
||||||
#[sea_orm(string_value = "veryLow")]
|
#[sea_orm(string_value = "veryLow")]
|
||||||
VeryLow,
|
VeryLow,
|
||||||
}
|
}
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Default)]
|
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum)]
|
||||||
#[sea_orm(
|
#[sea_orm(
|
||||||
rs_type = "String",
|
rs_type = "String",
|
||||||
db_type = "Enum",
|
db_type = "Enum",
|
||||||
enum_name = "muted_note_reason_enum"
|
enum_name = "muted_note_reason_enum"
|
||||||
)]
|
)]
|
||||||
pub enum MutedNoteReasonEnum {
|
pub enum MutedNoteReasonEnum {
|
||||||
#[default]
|
|
||||||
#[sea_orm(string_value = "manual")]
|
#[sea_orm(string_value = "manual")]
|
||||||
Manual,
|
Manual,
|
||||||
#[sea_orm(string_value = "other")]
|
#[sea_orm(string_value = "other")]
|
||||||
|
@ -75,7 +68,7 @@ pub enum MutedNoteReasonEnum {
|
||||||
#[sea_orm(string_value = "word")]
|
#[sea_orm(string_value = "word")]
|
||||||
Word,
|
Word,
|
||||||
}
|
}
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Default)]
|
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum)]
|
||||||
#[sea_orm(
|
#[sea_orm(
|
||||||
rs_type = "String",
|
rs_type = "String",
|
||||||
db_type = "Enum",
|
db_type = "Enum",
|
||||||
|
@ -88,13 +81,12 @@ pub enum NoteVisibilityEnum {
|
||||||
Hidden,
|
Hidden,
|
||||||
#[sea_orm(string_value = "home")]
|
#[sea_orm(string_value = "home")]
|
||||||
Home,
|
Home,
|
||||||
#[default]
|
|
||||||
#[sea_orm(string_value = "public")]
|
#[sea_orm(string_value = "public")]
|
||||||
Public,
|
Public,
|
||||||
#[sea_orm(string_value = "specified")]
|
#[sea_orm(string_value = "specified")]
|
||||||
Specified,
|
Specified,
|
||||||
}
|
}
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Default)]
|
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum)]
|
||||||
#[sea_orm(
|
#[sea_orm(
|
||||||
rs_type = "String",
|
rs_type = "String",
|
||||||
db_type = "Enum",
|
db_type = "Enum",
|
||||||
|
@ -123,11 +115,10 @@ pub enum NotificationTypeEnum {
|
||||||
ReceiveFollowRequest,
|
ReceiveFollowRequest,
|
||||||
#[sea_orm(string_value = "renote")]
|
#[sea_orm(string_value = "renote")]
|
||||||
Renote,
|
Renote,
|
||||||
#[default]
|
|
||||||
#[sea_orm(string_value = "reply")]
|
#[sea_orm(string_value = "reply")]
|
||||||
Reply,
|
Reply,
|
||||||
}
|
}
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Default)]
|
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum)]
|
||||||
#[sea_orm(
|
#[sea_orm(
|
||||||
rs_type = "String",
|
rs_type = "String",
|
||||||
db_type = "Enum",
|
db_type = "Enum",
|
||||||
|
@ -136,13 +127,12 @@ pub enum NotificationTypeEnum {
|
||||||
pub enum PageVisibilityEnum {
|
pub enum PageVisibilityEnum {
|
||||||
#[sea_orm(string_value = "followers")]
|
#[sea_orm(string_value = "followers")]
|
||||||
Followers,
|
Followers,
|
||||||
#[default]
|
|
||||||
#[sea_orm(string_value = "public")]
|
#[sea_orm(string_value = "public")]
|
||||||
Public,
|
Public,
|
||||||
#[sea_orm(string_value = "specified")]
|
#[sea_orm(string_value = "specified")]
|
||||||
Specified,
|
Specified,
|
||||||
}
|
}
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Default)]
|
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum)]
|
||||||
#[sea_orm(
|
#[sea_orm(
|
||||||
rs_type = "String",
|
rs_type = "String",
|
||||||
db_type = "Enum",
|
db_type = "Enum",
|
||||||
|
@ -153,24 +143,22 @@ pub enum PollNotevisibilityEnum {
|
||||||
Followers,
|
Followers,
|
||||||
#[sea_orm(string_value = "home")]
|
#[sea_orm(string_value = "home")]
|
||||||
Home,
|
Home,
|
||||||
#[default]
|
|
||||||
#[sea_orm(string_value = "public")]
|
#[sea_orm(string_value = "public")]
|
||||||
Public,
|
Public,
|
||||||
#[sea_orm(string_value = "specified")]
|
#[sea_orm(string_value = "specified")]
|
||||||
Specified,
|
Specified,
|
||||||
}
|
}
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Default)]
|
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum)]
|
||||||
#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "relay_status_enum")]
|
#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "relay_status_enum")]
|
||||||
pub enum RelayStatusEnum {
|
pub enum RelayStatusEnum {
|
||||||
#[sea_orm(string_value = "accepted")]
|
#[sea_orm(string_value = "accepted")]
|
||||||
Accepted,
|
Accepted,
|
||||||
#[sea_orm(string_value = "rejected")]
|
#[sea_orm(string_value = "rejected")]
|
||||||
Rejected,
|
Rejected,
|
||||||
#[default]
|
|
||||||
#[sea_orm(string_value = "requesting")]
|
#[sea_orm(string_value = "requesting")]
|
||||||
Requesting,
|
Requesting,
|
||||||
}
|
}
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Default)]
|
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum)]
|
||||||
#[sea_orm(
|
#[sea_orm(
|
||||||
rs_type = "String",
|
rs_type = "String",
|
||||||
db_type = "Enum",
|
db_type = "Enum",
|
||||||
|
@ -181,7 +169,38 @@ pub enum UserProfileFfvisibilityEnum {
|
||||||
Followers,
|
Followers,
|
||||||
#[sea_orm(string_value = "private")]
|
#[sea_orm(string_value = "private")]
|
||||||
Private,
|
Private,
|
||||||
#[default]
|
|
||||||
#[sea_orm(string_value = "public")]
|
#[sea_orm(string_value = "public")]
|
||||||
Public,
|
Public,
|
||||||
}
|
}
|
||||||
|
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum)]
|
||||||
|
#[sea_orm(
|
||||||
|
rs_type = "String",
|
||||||
|
db_type = "Enum",
|
||||||
|
enum_name = "user_profile_mutingnotificationtypes_enum"
|
||||||
|
)]
|
||||||
|
pub enum UserProfileMutingnotificationtypesEnum {
|
||||||
|
#[sea_orm(string_value = "app")]
|
||||||
|
App,
|
||||||
|
#[sea_orm(string_value = "follow")]
|
||||||
|
Follow,
|
||||||
|
#[sea_orm(string_value = "followRequestAccepted")]
|
||||||
|
FollowRequestAccepted,
|
||||||
|
#[sea_orm(string_value = "groupInvited")]
|
||||||
|
GroupInvited,
|
||||||
|
#[sea_orm(string_value = "mention")]
|
||||||
|
Mention,
|
||||||
|
#[sea_orm(string_value = "pollEnded")]
|
||||||
|
PollEnded,
|
||||||
|
#[sea_orm(string_value = "pollVote")]
|
||||||
|
PollVote,
|
||||||
|
#[sea_orm(string_value = "quote")]
|
||||||
|
Quote,
|
||||||
|
#[sea_orm(string_value = "reaction")]
|
||||||
|
Reaction,
|
||||||
|
#[sea_orm(string_value = "receiveFollowRequest")]
|
||||||
|
ReceiveFollowRequest,
|
||||||
|
#[sea_orm(string_value = "renote")]
|
||||||
|
Renote,
|
||||||
|
#[sea_orm(string_value = "reply")]
|
||||||
|
Reply,
|
||||||
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "signin")]
|
#[sea_orm(table_name = "signin")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "sw_subscription")]
|
#[sea_orm(table_name = "sw_subscription")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "used_username")]
|
#[sea_orm(table_name = "used_username")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "user")]
|
#[sea_orm(table_name = "user")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "user_group")]
|
#[sea_orm(table_name = "user_group")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "user_group_invitation")]
|
#[sea_orm(table_name = "user_group_invitation")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "user_group_invite")]
|
#[sea_orm(table_name = "user_group_invite")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "user_group_joining")]
|
#[sea_orm(table_name = "user_group_joining")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "user_ip")]
|
#[sea_orm(table_name = "user_ip")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key)]
|
#[sea_orm(primary_key)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "user_keypair")]
|
#[sea_orm(table_name = "user_keypair")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(column_name = "userId", primary_key, auto_increment = false, unique)]
|
#[sea_orm(column_name = "userId", primary_key, auto_increment = false, unique)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "user_list")]
|
#[sea_orm(table_name = "user_list")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "user_list_joining")]
|
#[sea_orm(table_name = "user_list_joining")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "user_note_pining")]
|
#[sea_orm(table_name = "user_note_pining")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "user_pending")]
|
#[sea_orm(table_name = "user_pending")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use super::sea_orm_active_enums::UserProfileFfvisibilityEnum;
|
use super::sea_orm_active_enums::UserProfileFfvisibilityEnum;
|
||||||
|
use super::sea_orm_active_enums::UserProfileMutingnotificationtypesEnum;
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "user_profile")]
|
#[sea_orm(table_name = "user_profile")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(column_name = "userId", primary_key, auto_increment = false, unique)]
|
#[sea_orm(column_name = "userId", primary_key, auto_increment = false, unique)]
|
||||||
|
@ -53,7 +54,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: Vec<UserProfileMutingnotificationtypesEnum>,
|
||||||
#[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")]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "user_publickey")]
|
#[sea_orm(table_name = "user_publickey")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(column_name = "userId", primary_key, auto_increment = false, unique)]
|
#[sea_orm(column_name = "userId", primary_key, auto_increment = false, unique)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "user_security_key")]
|
#[sea_orm(table_name = "user_security_key")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.2
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
#[sea_orm(table_name = "webhook")]
|
#[sea_orm(table_name = "webhook")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
pub mod antenna;
|
|
||||||
pub mod app;
|
|
||||||
|
|
||||||
use cfg_if::cfg_if;
|
|
||||||
use jsonschema::JSONSchema;
|
use jsonschema::JSONSchema;
|
||||||
use schemars::{schema_for, JsonSchema};
|
use schemars::{schema_for, JsonSchema};
|
||||||
|
|
||||||
|
@ -20,16 +16,3 @@ pub trait Schema<T: JsonSchema> {
|
||||||
.expect("Unable to compile schema")
|
.expect("Unable to compile schema")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg_if! {
|
|
||||||
if #[cfg(feature = "napi")] {
|
|
||||||
// Will be disabled once we completely migrate to rust
|
|
||||||
pub use antenna::NativeAntennaSchema as Antenna;
|
|
||||||
pub use antenna::NativeAntennaSrc as AntennaSrc;
|
|
||||||
} else {
|
|
||||||
pub use antenna::Antenna;
|
|
||||||
pub use antenna::AntennaSrc;
|
|
||||||
pub use app::App;
|
|
||||||
pub use app::AppPermission;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,217 +0,0 @@
|
||||||
use cfg_if::cfg_if;
|
|
||||||
use jsonschema::JSONSchema;
|
|
||||||
use once_cell::sync::Lazy;
|
|
||||||
use parse_display::FromStr;
|
|
||||||
use schemars::JsonSchema;
|
|
||||||
use utoipa::ToSchema;
|
|
||||||
|
|
||||||
use super::Schema;
|
|
||||||
use crate::model;
|
|
||||||
use crate::model::entity::sea_orm_active_enums::AntennaSrcEnum;
|
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, Eq, JsonSchema, ToSchema)]
|
|
||||||
#[serde(rename_all = "camelCase")]
|
|
||||||
pub struct Antenna {
|
|
||||||
pub id: String,
|
|
||||||
pub created_at: chrono::DateTime<chrono::Utc>,
|
|
||||||
pub name: String,
|
|
||||||
pub keywords: Vec<Vec<String>>,
|
|
||||||
pub exclude_keywords: Vec<Vec<String>>,
|
|
||||||
#[schema(inline)]
|
|
||||||
pub src: AntennaSrc,
|
|
||||||
pub user_list_id: Option<String>,
|
|
||||||
pub user_group_id: Option<String>,
|
|
||||||
pub users: Vec<String>,
|
|
||||||
pub instances: Vec<String>,
|
|
||||||
#[serde(default)]
|
|
||||||
pub case_sensitive: bool,
|
|
||||||
#[serde(default)]
|
|
||||||
pub notify: bool,
|
|
||||||
#[serde(default)]
|
|
||||||
pub with_replies: bool,
|
|
||||||
#[serde(default)]
|
|
||||||
pub with_file: bool,
|
|
||||||
#[serde(default)]
|
|
||||||
pub has_unread_note: bool,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Clone, Debug, FromStr, PartialEq, Eq, JsonSchema, ToSchema)]
|
|
||||||
#[serde(rename_all = "camelCase")]
|
|
||||||
#[display(style = "camelCase")]
|
|
||||||
#[display("'{}'")]
|
|
||||||
pub enum AntennaSrc {
|
|
||||||
Home,
|
|
||||||
All,
|
|
||||||
Users,
|
|
||||||
List,
|
|
||||||
Group,
|
|
||||||
Instances,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl TryFrom<AntennaSrcEnum> for super::AntennaSrc {
|
|
||||||
type Error = model::error::Error;
|
|
||||||
|
|
||||||
fn try_from(value: AntennaSrcEnum) -> Result<Self, Self::Error> {
|
|
||||||
value.to_string().parse().map_err(model::error::Error::from)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---- TODO: could be macro
|
|
||||||
impl Schema<Self> for super::Antenna {}
|
|
||||||
pub static VALIDATOR: Lazy<JSONSchema> = Lazy::new(super::Antenna::validator);
|
|
||||||
// ----
|
|
||||||
|
|
||||||
cfg_if! {
|
|
||||||
if #[cfg(feature = "napi")] {
|
|
||||||
use napi::bindgen_prelude::{FromNapiValue, ToNapiValue};
|
|
||||||
use napi_derive::napi;
|
|
||||||
|
|
||||||
use crate::model::entity::antenna;
|
|
||||||
use crate::model::repository::Repository;
|
|
||||||
|
|
||||||
/// For NAPI because [chrono] is not supported.
|
|
||||||
#[napi(object)]
|
|
||||||
#[derive(Clone, Debug, PartialEq, Eq, JsonSchema, ToSchema)]
|
|
||||||
#[serde(rename_all = "camelCase")]
|
|
||||||
pub struct NativeAntennaSchema {
|
|
||||||
pub id: String,
|
|
||||||
pub created_at: String,
|
|
||||||
pub name: String,
|
|
||||||
pub keywords: Vec<Vec<String>>,
|
|
||||||
pub exclude_keywords: Vec<Vec<String>>,
|
|
||||||
#[schema(inline)]
|
|
||||||
pub src: NativeAntennaSrc,
|
|
||||||
pub user_list_id: Option<String>,
|
|
||||||
pub user_group_id: Option<String>,
|
|
||||||
pub users: Vec<String>,
|
|
||||||
pub instances: Vec<String>,
|
|
||||||
#[serde(default)]
|
|
||||||
pub case_sensitive: bool,
|
|
||||||
#[serde(default)]
|
|
||||||
pub notify: bool,
|
|
||||||
#[serde(default)]
|
|
||||||
pub with_replies: bool,
|
|
||||||
#[serde(default)]
|
|
||||||
pub with_file: bool,
|
|
||||||
#[serde(default)]
|
|
||||||
pub has_unread_note: bool,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[napi(string_enum)]
|
|
||||||
#[derive(Debug, FromStr, PartialEq, Eq, JsonSchema, ToSchema)]
|
|
||||||
#[display("'{}'")]
|
|
||||||
#[allow(non_camel_case_types)]
|
|
||||||
pub enum NativeAntennaSrc {
|
|
||||||
home,
|
|
||||||
all,
|
|
||||||
users,
|
|
||||||
list,
|
|
||||||
group,
|
|
||||||
instances,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[napi]
|
|
||||||
pub async fn native_pack_antenna_by_id(id: String) -> napi::Result<NativeAntennaSchema> {
|
|
||||||
antenna::Model::pack_by_id(id).await.map_err(Into::into)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
mod unit_test {
|
|
||||||
use cfg_if::cfg_if;
|
|
||||||
use pretty_assertions::assert_eq;
|
|
||||||
use serde_json::json;
|
|
||||||
|
|
||||||
use crate::model::{entity::sea_orm_active_enums::AntennaSrcEnum, schema::AntennaSrc};
|
|
||||||
|
|
||||||
use super::VALIDATOR;
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn src_from_active_enum() {
|
|
||||||
let src = AntennaSrc::try_from(AntennaSrcEnum::All).unwrap();
|
|
||||||
cfg_if! {
|
|
||||||
if #[cfg(feature = "napi")] {
|
|
||||||
assert_eq!(src, AntennaSrc::all);
|
|
||||||
} else {
|
|
||||||
assert_eq!(src, AntennaSrc::All);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn antenna_valid() {
|
|
||||||
let instance = json!({
|
|
||||||
"id": "9fil64s6g7cskdrb",
|
|
||||||
"createdAt": "2023-05-24T06:56:14.323Z",
|
|
||||||
"name": "Valid Antenna",
|
|
||||||
"keywords": [["first", "keyword"], ["second"]],
|
|
||||||
"excludeKeywords": [["excluding", "keywrods"], ["from", "antenna"]],
|
|
||||||
"src": "users",
|
|
||||||
// "userListId" and "userGroupId" can be null or be omitted
|
|
||||||
"userListId": null,
|
|
||||||
"users": ["9fil64s6g7cskdrb", "9fil66brl1udxau2"],
|
|
||||||
"instances": [],
|
|
||||||
// "caseSensitive", "notify", "withReplies", "withFile", and
|
|
||||||
// "hasUnreadNote" are false if ommited
|
|
||||||
"notify": false,
|
|
||||||
"withReplies": false,
|
|
||||||
"withFile": false,
|
|
||||||
"hasUnreadNote": false,
|
|
||||||
});
|
|
||||||
|
|
||||||
assert!(VALIDATOR.is_valid(&instance));
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn antenna_invalid() {
|
|
||||||
let instance = json!({
|
|
||||||
// "id" is required
|
|
||||||
"id": null,
|
|
||||||
// trailing "Z" is missing
|
|
||||||
"createdAt": "2023-05-24T07:36:34.389",
|
|
||||||
// "name" is required
|
|
||||||
// "keywords" must be an array
|
|
||||||
"keywords": "invalid keyword",
|
|
||||||
// "excludeKeywords" is required
|
|
||||||
"excludeKeywords": null,
|
|
||||||
// "src" must be one of "home", "all", "users", "list", "group", and
|
|
||||||
// "instances"
|
|
||||||
"src": "invalid_src",
|
|
||||||
// "userListId" is string
|
|
||||||
"userListId": ["9f4ziiqfxw"],
|
|
||||||
// "users" must be an array of strings
|
|
||||||
"users": [1, "9fil64s6g7cskdrb"],
|
|
||||||
"instances": ["9fil65jzhtjpi3xn"],
|
|
||||||
// "caseSensitive" is boolean
|
|
||||||
"caseSensitive": 0,
|
|
||||||
"notify": true,
|
|
||||||
"withReplies": true,
|
|
||||||
"withFile": true,
|
|
||||||
"hasUnreadNote": true,
|
|
||||||
});
|
|
||||||
|
|
||||||
let result = VALIDATOR
|
|
||||||
.validate(&instance)
|
|
||||||
.expect_err("validation must fail");
|
|
||||||
let mut paths: Vec<String> = result
|
|
||||||
.map(|e| e.instance_path.to_string())
|
|
||||||
.filter(|e| !e.is_empty())
|
|
||||||
.collect();
|
|
||||||
paths.sort();
|
|
||||||
assert_eq!(
|
|
||||||
paths,
|
|
||||||
vec![
|
|
||||||
"/caseSensitive",
|
|
||||||
#[cfg(not(feature = "napi"))]
|
|
||||||
"/createdAt",
|
|
||||||
"/excludeKeywords",
|
|
||||||
"/id",
|
|
||||||
"/keywords",
|
|
||||||
"/src",
|
|
||||||
"/userListId",
|
|
||||||
"/users/0"
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,147 +0,0 @@
|
||||||
use jsonschema::JSONSchema;
|
|
||||||
use once_cell::sync::Lazy;
|
|
||||||
use schemars::JsonSchema;
|
|
||||||
use utoipa::ToSchema;
|
|
||||||
|
|
||||||
use super::Schema;
|
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, Eq, JsonSchema, ToSchema)]
|
|
||||||
#[serde(rename_all = "camelCase")]
|
|
||||||
pub struct App {
|
|
||||||
pub id: String,
|
|
||||||
pub name: String,
|
|
||||||
#[schemars(url)]
|
|
||||||
pub callback_url: Option<String>,
|
|
||||||
#[schema(inline)]
|
|
||||||
pub permission: Vec<AppPermission>,
|
|
||||||
pub secret: Option<String>,
|
|
||||||
pub is_authorized: Option<bool>,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// This represents `permissions` in `packages/firefish-js/src/consts.ts`.
|
|
||||||
#[derive(Clone, Debug, PartialEq, Eq, JsonSchema, ToSchema)]
|
|
||||||
pub enum AppPermission {
|
|
||||||
#[serde(rename = "read:account")]
|
|
||||||
ReadAccount,
|
|
||||||
#[serde(rename = "write:account")]
|
|
||||||
WriteAccount,
|
|
||||||
#[serde(rename = "read:blocks")]
|
|
||||||
ReadBlocks,
|
|
||||||
#[serde(rename = "write:blocks")]
|
|
||||||
WriteBlocks,
|
|
||||||
#[serde(rename = "read:drive")]
|
|
||||||
ReadDrive,
|
|
||||||
#[serde(rename = "write:drive")]
|
|
||||||
WriteDrive,
|
|
||||||
#[serde(rename = "read:favorites")]
|
|
||||||
ReadFavorites,
|
|
||||||
#[serde(rename = "write:favorites")]
|
|
||||||
WriteFavorites,
|
|
||||||
#[serde(rename = "read:following")]
|
|
||||||
ReadFollowing,
|
|
||||||
#[serde(rename = "write:following")]
|
|
||||||
WriteFollowing,
|
|
||||||
#[serde(rename = "read:messaging")]
|
|
||||||
ReadMessaging,
|
|
||||||
#[serde(rename = "write:messaging")]
|
|
||||||
WriteMessaging,
|
|
||||||
#[serde(rename = "read:mutes")]
|
|
||||||
ReadMutes,
|
|
||||||
#[serde(rename = "write:mutes")]
|
|
||||||
WriteMutes,
|
|
||||||
#[serde(rename = "read:notes")]
|
|
||||||
ReadNotes,
|
|
||||||
#[serde(rename = "write:notes")]
|
|
||||||
WriteNotes,
|
|
||||||
#[serde(rename = "read:notifications")]
|
|
||||||
ReadNotifications,
|
|
||||||
#[serde(rename = "write:notifications")]
|
|
||||||
WriteNotifications,
|
|
||||||
#[serde(rename = "read:reactions")]
|
|
||||||
ReadReactions,
|
|
||||||
#[serde(rename = "write:reactions")]
|
|
||||||
WriteReactions,
|
|
||||||
#[serde(rename = "write:votes")]
|
|
||||||
WriteVotes,
|
|
||||||
#[serde(rename = "read:pages")]
|
|
||||||
ReadPages,
|
|
||||||
#[serde(rename = "write:pages")]
|
|
||||||
WritePages,
|
|
||||||
#[serde(rename = "read:page-likes")]
|
|
||||||
ReadPageLikes,
|
|
||||||
#[serde(rename = "write:page-likes")]
|
|
||||||
WritePageLikes,
|
|
||||||
#[serde(rename = "read:user-groups")]
|
|
||||||
ReadUserGroups,
|
|
||||||
#[serde(rename = "write:user-groups")]
|
|
||||||
WriteUserGroups,
|
|
||||||
#[serde(rename = "read:channels")]
|
|
||||||
ReadChannels,
|
|
||||||
#[serde(rename = "write:channels")]
|
|
||||||
WriteChannels,
|
|
||||||
#[serde(rename = "read:gallery")]
|
|
||||||
ReadGallery,
|
|
||||||
#[serde(rename = "write:gallery")]
|
|
||||||
WriteGallery,
|
|
||||||
#[serde(rename = "read:gallery-likes")]
|
|
||||||
ReadGalleryLikes,
|
|
||||||
#[serde(rename = "write:gallery-likes")]
|
|
||||||
WriteGalleryLikes,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Schema<Self> for App {}
|
|
||||||
|
|
||||||
pub static VALIDATOR: Lazy<JSONSchema> = Lazy::new(App::validator);
|
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
mod unit_test {
|
|
||||||
use pretty_assertions::assert_eq;
|
|
||||||
use serde_json::json;
|
|
||||||
|
|
||||||
use crate::util::id::{create_id, init_id};
|
|
||||||
use crate::util::random::gen_string;
|
|
||||||
|
|
||||||
use super::VALIDATOR;
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn app_valid() {
|
|
||||||
init_id(16, "");
|
|
||||||
let instance = json!({
|
|
||||||
"id": create_id(0).unwrap(),
|
|
||||||
"name": "Test App",
|
|
||||||
"secret": gen_string(24),
|
|
||||||
"callbackUrl": "urn:ietf:wg:oauth:2.0:oob",
|
|
||||||
"permission": ["read:account", "write:account", "read:notes"],
|
|
||||||
});
|
|
||||||
|
|
||||||
assert!(VALIDATOR.is_valid(&instance));
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn app_invalid() {
|
|
||||||
init_id(16, "");
|
|
||||||
let instance = json!({
|
|
||||||
"id": create_id(0).unwrap(),
|
|
||||||
// "name" is required
|
|
||||||
"name": null,
|
|
||||||
// "permission" must be one of the app permissions
|
|
||||||
"permission": ["write:invalid_perm", "write:notes"],
|
|
||||||
// "secret" is a nullable string
|
|
||||||
"secret": 123,
|
|
||||||
// "is_authorized" is a nullable boolean
|
|
||||||
"isAuthorized": "true-ish",
|
|
||||||
});
|
|
||||||
let result = VALIDATOR
|
|
||||||
.validate(&instance)
|
|
||||||
.expect_err("validation must fail");
|
|
||||||
let mut paths: Vec<String> = result
|
|
||||||
.map(|e| e.instance_path.to_string())
|
|
||||||
.filter(|e| !e.is_empty())
|
|
||||||
.collect();
|
|
||||||
paths.sort();
|
|
||||||
assert_eq!(
|
|
||||||
paths,
|
|
||||||
vec!["/isAuthorized", "/name", "/permission/0", "/secret"]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -76,7 +76,6 @@ import { NoteEdit } from "@/models/entities/note-edit.js";
|
||||||
import { entities as charts } from "@/services/chart/entities.js";
|
import { entities as charts } from "@/services/chart/entities.js";
|
||||||
import { dbLogger } from "./logger.js";
|
import { dbLogger } from "./logger.js";
|
||||||
import { redisClient } from "./redis.js";
|
import { redisClient } from "./redis.js";
|
||||||
import { nativeInitDatabase } from "native-utils/built/index.js";
|
|
||||||
|
|
||||||
const sqlLogger = dbLogger.createSubLogger("sql", "gray", false);
|
const sqlLogger = dbLogger.createSubLogger("sql", "gray", false);
|
||||||
|
|
||||||
|
@ -220,11 +219,6 @@ export const db = new DataSource({
|
||||||
});
|
});
|
||||||
|
|
||||||
export async function initDb(force = false) {
|
export async function initDb(force = false) {
|
||||||
await nativeInitDatabase(
|
|
||||||
`postgres://${config.db.user}:${encodeURIComponent(config.db.pass)}@${
|
|
||||||
config.db.host
|
|
||||||
}:${config.db.port}/${config.db.db}`,
|
|
||||||
);
|
|
||||||
if (force) {
|
if (force) {
|
||||||
if (db.isInitialized) {
|
if (db.isInitialized) {
|
||||||
await db.destroy();
|
await db.destroy();
|
||||||
|
|
Loading…
Reference in a new issue