1
0
Fork 1
mirror of https://example.com synced 2024-11-22 11:16:38 +09:00

fix (native-utils): add js_name to the entities

This commit is contained in:
naskya 2024-01-21 02:13:13 +09:00
parent 78d48ed021
commit 65609b27c2
Signed by: naskya
GPG key ID: 712D413B3A9FED5C
69 changed files with 75 additions and 69 deletions

View file

@ -33,7 +33,13 @@ regenerate-entities:
--output-dir='src/model/entity' \ --output-dir='src/model/entity' \
--database-url='postgres://firefish:password@localhost:25432/firefish_db' \ --database-url='postgres://firefish:password@localhost:25432/firefish_db' \
--date-time-crate='chrono' \ --date-time-crate='chrono' \
--model-extra-attributes='napi_derive::napi(object)' --model-extra-attributes='NAPI_EXTRA_ATTR_PLACEHOLDER' && \
for file in src/model/entity/*; do \
base=$$(basename -- "$${file}"); \
jsname=$$(printf '%s\n' "$${base%.*}" | perl -pe 's/(^|_)./uc($$&)/ge;s/_//g'); \
attribute=$$(printf 'napi_derive::napi(object, js_name = "%s")' "$${jsname}"); \
sed -i "s/NAPI_EXTRA_ATTR_PLACEHOLDER/$${attribute}/" "$${file}"; \
done
sed -i 's/#\[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum)\]/#[derive(Debug, PartialEq, Eq, EnumIter, DeriveActiveEnum)]\n#[napi_derive::napi]/' \ sed -i 's/#\[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum)\]/#[derive(Debug, PartialEq, Eq, EnumIter, DeriveActiveEnum)]\n#[napi_derive::napi]/' \
packages/backend/native-utils/src/model/entity/sea_orm_active_enums.rs packages/backend/native-utils/src/model/entity/sea_orm_active_enums.rs

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "abuse_user_report")] #[sea_orm(table_name = "abuse_user_report")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "AbuseUserReport")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "access_token")] #[sea_orm(table_name = "access_token")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "AccessToken")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "ad")] #[sea_orm(table_name = "ad")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "Ad")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "announcement")] #[sea_orm(table_name = "announcement")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "Announcement")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "announcement_read")] #[sea_orm(table_name = "announcement_read")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "AnnouncementRead")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -5,7 +5,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "antenna")] #[sea_orm(table_name = "antenna")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "Antenna")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "app")] #[sea_orm(table_name = "app")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "App")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "attestation_challenge")] #[sea_orm(table_name = "attestation_challenge")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "AttestationChallenge")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "auth_session")] #[sea_orm(table_name = "auth_session")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "AuthSession")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "blocking")] #[sea_orm(table_name = "blocking")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "Blocking")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "channel")] #[sea_orm(table_name = "channel")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "Channel")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "channel_following")] #[sea_orm(table_name = "channel_following")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "ChannelFollowing")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "channel_note_pining")] #[sea_orm(table_name = "channel_note_pining")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "ChannelNotePining")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "clip")] #[sea_orm(table_name = "clip")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "Clip")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "clip_note")] #[sea_orm(table_name = "clip_note")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "ClipNote")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "drive_file")] #[sea_orm(table_name = "drive_file")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "DriveFile")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "drive_folder")] #[sea_orm(table_name = "drive_folder")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "DriveFolder")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "emoji")] #[sea_orm(table_name = "emoji")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "Emoji")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "follow_request")] #[sea_orm(table_name = "follow_request")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "FollowRequest")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "following")] #[sea_orm(table_name = "following")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "Following")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "gallery_like")] #[sea_orm(table_name = "gallery_like")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "GalleryLike")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "gallery_post")] #[sea_orm(table_name = "gallery_post")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "GalleryPost")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "hashtag")] #[sea_orm(table_name = "hashtag")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "Hashtag")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "instance")] #[sea_orm(table_name = "instance")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "Instance")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "messaging_message")] #[sea_orm(table_name = "messaging_message")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "MessagingMessage")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -6,7 +6,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "meta")] #[sea_orm(table_name = "meta")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "Meta")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "migrations")] #[sea_orm(table_name = "migrations")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "Migrations")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key)] #[sea_orm(primary_key)]
pub id: i32, pub id: i32,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "moderation_log")] #[sea_orm(table_name = "moderation_log")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "ModerationLog")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -5,7 +5,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "muted_note")] #[sea_orm(table_name = "muted_note")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "MutedNote")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "muting")] #[sea_orm(table_name = "muting")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "Muting")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -5,7 +5,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "note")] #[sea_orm(table_name = "note")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "Note")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "note_edit")] #[sea_orm(table_name = "note_edit")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "NoteEdit")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "note_favorite")] #[sea_orm(table_name = "note_favorite")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "NoteFavorite")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "note_reaction")] #[sea_orm(table_name = "note_reaction")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "NoteReaction")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "note_thread_muting")] #[sea_orm(table_name = "note_thread_muting")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "NoteThreadMuting")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "note_unread")] #[sea_orm(table_name = "note_unread")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "NoteUnread")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "note_watching")] #[sea_orm(table_name = "note_watching")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "NoteWatching")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -5,7 +5,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "notification")] #[sea_orm(table_name = "notification")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "Notification")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -5,7 +5,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "page")] #[sea_orm(table_name = "page")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "Page")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "page_like")] #[sea_orm(table_name = "page_like")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "PageLike")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "password_reset_request")] #[sea_orm(table_name = "password_reset_request")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "PasswordResetRequest")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -5,7 +5,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "poll")] #[sea_orm(table_name = "poll")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_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)]
pub note_id: String, pub note_id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "poll_vote")] #[sea_orm(table_name = "poll_vote")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "PollVote")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "promo_note")] #[sea_orm(table_name = "promo_note")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "PromoNote")]
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)]
pub note_id: String, pub note_id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "promo_read")] #[sea_orm(table_name = "promo_read")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "PromoRead")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "registration_ticket")] #[sea_orm(table_name = "registration_ticket")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "RegistrationTicket")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "registry_item")] #[sea_orm(table_name = "registry_item")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "RegistryItem")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -5,7 +5,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "relay")] #[sea_orm(table_name = "relay")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "Relay")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "renote_muting")] #[sea_orm(table_name = "renote_muting")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "RenoteMuting")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "reply_muting")] #[sea_orm(table_name = "reply_muting")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "ReplyMuting")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "signin")] #[sea_orm(table_name = "signin")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "Signin")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "sw_subscription")] #[sea_orm(table_name = "sw_subscription")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "SwSubscription")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "used_username")] #[sea_orm(table_name = "used_username")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "UsedUsername")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub username: String, pub username: String,

View file

@ -5,7 +5,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "user")] #[sea_orm(table_name = "user")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "User")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "user_group")] #[sea_orm(table_name = "user_group")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "UserGroup")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "user_group_invitation")] #[sea_orm(table_name = "user_group_invitation")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "UserGroupInvitation")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "user_group_invite")] #[sea_orm(table_name = "user_group_invite")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "UserGroupInvite")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "user_group_joining")] #[sea_orm(table_name = "user_group_joining")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "UserGroupJoining")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "user_ip")] #[sea_orm(table_name = "user_ip")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "UserIp")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key)] #[sea_orm(primary_key)]
pub id: i32, pub id: i32,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "user_keypair")] #[sea_orm(table_name = "user_keypair")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "UserKeypair")]
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)]
pub user_id: String, pub user_id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "user_list")] #[sea_orm(table_name = "user_list")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "UserList")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "user_list_joining")] #[sea_orm(table_name = "user_list_joining")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "UserListJoining")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "user_note_pining")] #[sea_orm(table_name = "user_note_pining")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "UserNotePining")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "user_pending")] #[sea_orm(table_name = "user_pending")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "UserPending")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -6,7 +6,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "user_profile")] #[sea_orm(table_name = "user_profile")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "UserProfile")]
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)]
pub user_id: String, pub user_id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "user_publickey")] #[sea_orm(table_name = "user_publickey")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "UserPublickey")]
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)]
pub user_id: String, pub user_id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "user_security_key")] #[sea_orm(table_name = "user_security_key")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "UserSecurityKey")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,

View file

@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "webhook")] #[sea_orm(table_name = "webhook")]
#[napi_derive::napi(object)] #[napi_derive::napi(object, js_name = "Webhook")]
pub struct Model { pub struct Model {
#[sea_orm(primary_key, auto_increment = false)] #[sea_orm(primary_key, auto_increment = false)]
pub id: String, pub id: String,