From 65609b27c2e629fa39cc5609c3369740b5ab741a Mon Sep 17 00:00:00 2001 From: naskya Date: Sun, 21 Jan 2024 02:13:13 +0900 Subject: [PATCH] fix (native-utils): add js_name to the entities --- Makefile | 8 +++++++- .../native-utils/src/model/entity/abuse_user_report.rs | 2 +- .../backend/native-utils/src/model/entity/access_token.rs | 2 +- packages/backend/native-utils/src/model/entity/ad.rs | 2 +- .../backend/native-utils/src/model/entity/announcement.rs | 2 +- .../native-utils/src/model/entity/announcement_read.rs | 2 +- packages/backend/native-utils/src/model/entity/antenna.rs | 2 +- packages/backend/native-utils/src/model/entity/app.rs | 2 +- .../src/model/entity/attestation_challenge.rs | 2 +- .../backend/native-utils/src/model/entity/auth_session.rs | 2 +- .../backend/native-utils/src/model/entity/blocking.rs | 2 +- packages/backend/native-utils/src/model/entity/channel.rs | 2 +- .../native-utils/src/model/entity/channel_following.rs | 2 +- .../native-utils/src/model/entity/channel_note_pining.rs | 2 +- packages/backend/native-utils/src/model/entity/clip.rs | 2 +- .../backend/native-utils/src/model/entity/clip_note.rs | 2 +- .../backend/native-utils/src/model/entity/drive_file.rs | 2 +- .../backend/native-utils/src/model/entity/drive_folder.rs | 2 +- packages/backend/native-utils/src/model/entity/emoji.rs | 2 +- .../native-utils/src/model/entity/follow_request.rs | 2 +- .../backend/native-utils/src/model/entity/following.rs | 2 +- .../backend/native-utils/src/model/entity/gallery_like.rs | 2 +- .../backend/native-utils/src/model/entity/gallery_post.rs | 2 +- packages/backend/native-utils/src/model/entity/hashtag.rs | 2 +- .../backend/native-utils/src/model/entity/instance.rs | 2 +- .../native-utils/src/model/entity/messaging_message.rs | 2 +- packages/backend/native-utils/src/model/entity/meta.rs | 2 +- .../backend/native-utils/src/model/entity/migrations.rs | 2 +- .../native-utils/src/model/entity/moderation_log.rs | 2 +- .../backend/native-utils/src/model/entity/muted_note.rs | 2 +- packages/backend/native-utils/src/model/entity/muting.rs | 2 +- packages/backend/native-utils/src/model/entity/note.rs | 2 +- .../backend/native-utils/src/model/entity/note_edit.rs | 2 +- .../native-utils/src/model/entity/note_favorite.rs | 2 +- .../native-utils/src/model/entity/note_reaction.rs | 2 +- .../native-utils/src/model/entity/note_thread_muting.rs | 2 +- .../backend/native-utils/src/model/entity/note_unread.rs | 2 +- .../native-utils/src/model/entity/note_watching.rs | 2 +- .../backend/native-utils/src/model/entity/notification.rs | 2 +- packages/backend/native-utils/src/model/entity/page.rs | 2 +- .../backend/native-utils/src/model/entity/page_like.rs | 2 +- .../src/model/entity/password_reset_request.rs | 2 +- packages/backend/native-utils/src/model/entity/poll.rs | 2 +- .../backend/native-utils/src/model/entity/poll_vote.rs | 2 +- .../backend/native-utils/src/model/entity/promo_note.rs | 2 +- .../backend/native-utils/src/model/entity/promo_read.rs | 2 +- .../native-utils/src/model/entity/registration_ticket.rs | 2 +- .../native-utils/src/model/entity/registry_item.rs | 2 +- packages/backend/native-utils/src/model/entity/relay.rs | 2 +- .../native-utils/src/model/entity/renote_muting.rs | 2 +- .../backend/native-utils/src/model/entity/reply_muting.rs | 2 +- packages/backend/native-utils/src/model/entity/signin.rs | 2 +- .../native-utils/src/model/entity/sw_subscription.rs | 2 +- .../native-utils/src/model/entity/used_username.rs | 2 +- packages/backend/native-utils/src/model/entity/user.rs | 2 +- .../backend/native-utils/src/model/entity/user_group.rs | 2 +- .../src/model/entity/user_group_invitation.rs | 2 +- .../native-utils/src/model/entity/user_group_invite.rs | 2 +- .../native-utils/src/model/entity/user_group_joining.rs | 2 +- packages/backend/native-utils/src/model/entity/user_ip.rs | 2 +- .../backend/native-utils/src/model/entity/user_keypair.rs | 2 +- .../backend/native-utils/src/model/entity/user_list.rs | 2 +- .../native-utils/src/model/entity/user_list_joining.rs | 2 +- .../native-utils/src/model/entity/user_note_pining.rs | 2 +- .../backend/native-utils/src/model/entity/user_pending.rs | 2 +- .../backend/native-utils/src/model/entity/user_profile.rs | 2 +- .../native-utils/src/model/entity/user_publickey.rs | 2 +- .../native-utils/src/model/entity/user_security_key.rs | 2 +- packages/backend/native-utils/src/model/entity/webhook.rs | 2 +- 69 files changed, 75 insertions(+), 69 deletions(-) diff --git a/Makefile b/Makefile index 1533c865..63fb38fc 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,13 @@ regenerate-entities: --output-dir='src/model/entity' \ --database-url='postgres://firefish:password@localhost:25432/firefish_db' \ --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]/' \ packages/backend/native-utils/src/model/entity/sea_orm_active_enums.rs diff --git a/packages/backend/native-utils/src/model/entity/abuse_user_report.rs b/packages/backend/native-utils/src/model/entity/abuse_user_report.rs index cdea8b46..67565b23 100644 --- a/packages/backend/native-utils/src/model/entity/abuse_user_report.rs +++ b/packages/backend/native-utils/src/model/entity/abuse_user_report.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "abuse_user_report")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "AbuseUserReport")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/access_token.rs b/packages/backend/native-utils/src/model/entity/access_token.rs index 65bcb211..ba893ee2 100644 --- a/packages/backend/native-utils/src/model/entity/access_token.rs +++ b/packages/backend/native-utils/src/model/entity/access_token.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "access_token")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "AccessToken")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/ad.rs b/packages/backend/native-utils/src/model/entity/ad.rs index cd06ebf0..9251b291 100644 --- a/packages/backend/native-utils/src/model/entity/ad.rs +++ b/packages/backend/native-utils/src/model/entity/ad.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "ad")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "Ad")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/announcement.rs b/packages/backend/native-utils/src/model/entity/announcement.rs index 2fe42835..25cf29d1 100644 --- a/packages/backend/native-utils/src/model/entity/announcement.rs +++ b/packages/backend/native-utils/src/model/entity/announcement.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "announcement")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "Announcement")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/announcement_read.rs b/packages/backend/native-utils/src/model/entity/announcement_read.rs index bb524a0f..ece571b6 100644 --- a/packages/backend/native-utils/src/model/entity/announcement_read.rs +++ b/packages/backend/native-utils/src/model/entity/announcement_read.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "announcement_read")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "AnnouncementRead")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/antenna.rs b/packages/backend/native-utils/src/model/entity/antenna.rs index 1a8d923f..50ac584b 100644 --- a/packages/backend/native-utils/src/model/entity/antenna.rs +++ b/packages/backend/native-utils/src/model/entity/antenna.rs @@ -5,7 +5,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "antenna")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "Antenna")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/app.rs b/packages/backend/native-utils/src/model/entity/app.rs index 3d05eab2..a58d717b 100644 --- a/packages/backend/native-utils/src/model/entity/app.rs +++ b/packages/backend/native-utils/src/model/entity/app.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "app")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "App")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/attestation_challenge.rs b/packages/backend/native-utils/src/model/entity/attestation_challenge.rs index d5242dff..1d994d68 100644 --- a/packages/backend/native-utils/src/model/entity/attestation_challenge.rs +++ b/packages/backend/native-utils/src/model/entity/attestation_challenge.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "attestation_challenge")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "AttestationChallenge")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/auth_session.rs b/packages/backend/native-utils/src/model/entity/auth_session.rs index 9ff792ec..a6a1dba5 100644 --- a/packages/backend/native-utils/src/model/entity/auth_session.rs +++ b/packages/backend/native-utils/src/model/entity/auth_session.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "auth_session")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "AuthSession")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/blocking.rs b/packages/backend/native-utils/src/model/entity/blocking.rs index f10039e7..b77f1d5c 100644 --- a/packages/backend/native-utils/src/model/entity/blocking.rs +++ b/packages/backend/native-utils/src/model/entity/blocking.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "blocking")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "Blocking")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/channel.rs b/packages/backend/native-utils/src/model/entity/channel.rs index 785f0a4d..3d66c411 100644 --- a/packages/backend/native-utils/src/model/entity/channel.rs +++ b/packages/backend/native-utils/src/model/entity/channel.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "channel")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "Channel")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/channel_following.rs b/packages/backend/native-utils/src/model/entity/channel_following.rs index ac1c8d13..ae47c15f 100644 --- a/packages/backend/native-utils/src/model/entity/channel_following.rs +++ b/packages/backend/native-utils/src/model/entity/channel_following.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "channel_following")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "ChannelFollowing")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/channel_note_pining.rs b/packages/backend/native-utils/src/model/entity/channel_note_pining.rs index f885400a..d4ee2b24 100644 --- a/packages/backend/native-utils/src/model/entity/channel_note_pining.rs +++ b/packages/backend/native-utils/src/model/entity/channel_note_pining.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "channel_note_pining")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "ChannelNotePining")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/clip.rs b/packages/backend/native-utils/src/model/entity/clip.rs index 0f285879..3f645fff 100644 --- a/packages/backend/native-utils/src/model/entity/clip.rs +++ b/packages/backend/native-utils/src/model/entity/clip.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "clip")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "Clip")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/clip_note.rs b/packages/backend/native-utils/src/model/entity/clip_note.rs index 29c174f5..099343d4 100644 --- a/packages/backend/native-utils/src/model/entity/clip_note.rs +++ b/packages/backend/native-utils/src/model/entity/clip_note.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "clip_note")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "ClipNote")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/drive_file.rs b/packages/backend/native-utils/src/model/entity/drive_file.rs index 5ce766dc..4d87dc0a 100644 --- a/packages/backend/native-utils/src/model/entity/drive_file.rs +++ b/packages/backend/native-utils/src/model/entity/drive_file.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "drive_file")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "DriveFile")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/drive_folder.rs b/packages/backend/native-utils/src/model/entity/drive_folder.rs index 48d39f2f..dd0b1e21 100644 --- a/packages/backend/native-utils/src/model/entity/drive_folder.rs +++ b/packages/backend/native-utils/src/model/entity/drive_folder.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "drive_folder")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "DriveFolder")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/emoji.rs b/packages/backend/native-utils/src/model/entity/emoji.rs index 87835b30..8def4d3c 100644 --- a/packages/backend/native-utils/src/model/entity/emoji.rs +++ b/packages/backend/native-utils/src/model/entity/emoji.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "emoji")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "Emoji")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/follow_request.rs b/packages/backend/native-utils/src/model/entity/follow_request.rs index 892327ed..5989ebea 100644 --- a/packages/backend/native-utils/src/model/entity/follow_request.rs +++ b/packages/backend/native-utils/src/model/entity/follow_request.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "follow_request")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "FollowRequest")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/following.rs b/packages/backend/native-utils/src/model/entity/following.rs index 015896e8..5eddee4c 100644 --- a/packages/backend/native-utils/src/model/entity/following.rs +++ b/packages/backend/native-utils/src/model/entity/following.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "following")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "Following")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/gallery_like.rs b/packages/backend/native-utils/src/model/entity/gallery_like.rs index 58673dc3..54ea1d3d 100644 --- a/packages/backend/native-utils/src/model/entity/gallery_like.rs +++ b/packages/backend/native-utils/src/model/entity/gallery_like.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "gallery_like")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "GalleryLike")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/gallery_post.rs b/packages/backend/native-utils/src/model/entity/gallery_post.rs index 98ff7a43..ee283df7 100644 --- a/packages/backend/native-utils/src/model/entity/gallery_post.rs +++ b/packages/backend/native-utils/src/model/entity/gallery_post.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "gallery_post")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "GalleryPost")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/hashtag.rs b/packages/backend/native-utils/src/model/entity/hashtag.rs index 71aa49f6..443dd119 100644 --- a/packages/backend/native-utils/src/model/entity/hashtag.rs +++ b/packages/backend/native-utils/src/model/entity/hashtag.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "hashtag")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "Hashtag")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/instance.rs b/packages/backend/native-utils/src/model/entity/instance.rs index 1f550436..c71e0fca 100644 --- a/packages/backend/native-utils/src/model/entity/instance.rs +++ b/packages/backend/native-utils/src/model/entity/instance.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "instance")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "Instance")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/messaging_message.rs b/packages/backend/native-utils/src/model/entity/messaging_message.rs index 02be149c..0998ec28 100644 --- a/packages/backend/native-utils/src/model/entity/messaging_message.rs +++ b/packages/backend/native-utils/src/model/entity/messaging_message.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "messaging_message")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "MessagingMessage")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/meta.rs b/packages/backend/native-utils/src/model/entity/meta.rs index 27a33fdd..2521d681 100644 --- a/packages/backend/native-utils/src/model/entity/meta.rs +++ b/packages/backend/native-utils/src/model/entity/meta.rs @@ -6,7 +6,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "meta")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "Meta")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/migrations.rs b/packages/backend/native-utils/src/model/entity/migrations.rs index 2c591d70..53ee57a5 100644 --- a/packages/backend/native-utils/src/model/entity/migrations.rs +++ b/packages/backend/native-utils/src/model/entity/migrations.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "migrations")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "Migrations")] pub struct Model { #[sea_orm(primary_key)] pub id: i32, diff --git a/packages/backend/native-utils/src/model/entity/moderation_log.rs b/packages/backend/native-utils/src/model/entity/moderation_log.rs index fc642350..1b45aa35 100644 --- a/packages/backend/native-utils/src/model/entity/moderation_log.rs +++ b/packages/backend/native-utils/src/model/entity/moderation_log.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "moderation_log")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "ModerationLog")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/muted_note.rs b/packages/backend/native-utils/src/model/entity/muted_note.rs index 99b648bd..e7132e2f 100644 --- a/packages/backend/native-utils/src/model/entity/muted_note.rs +++ b/packages/backend/native-utils/src/model/entity/muted_note.rs @@ -5,7 +5,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "muted_note")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "MutedNote")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/muting.rs b/packages/backend/native-utils/src/model/entity/muting.rs index 62617bf1..110cb7ef 100644 --- a/packages/backend/native-utils/src/model/entity/muting.rs +++ b/packages/backend/native-utils/src/model/entity/muting.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "muting")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "Muting")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/note.rs b/packages/backend/native-utils/src/model/entity/note.rs index b9292685..5450ae3c 100644 --- a/packages/backend/native-utils/src/model/entity/note.rs +++ b/packages/backend/native-utils/src/model/entity/note.rs @@ -5,7 +5,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "note")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "Note")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/note_edit.rs b/packages/backend/native-utils/src/model/entity/note_edit.rs index b619c069..2946a6bf 100644 --- a/packages/backend/native-utils/src/model/entity/note_edit.rs +++ b/packages/backend/native-utils/src/model/entity/note_edit.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "note_edit")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "NoteEdit")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/note_favorite.rs b/packages/backend/native-utils/src/model/entity/note_favorite.rs index f1e78cac..da914bb1 100644 --- a/packages/backend/native-utils/src/model/entity/note_favorite.rs +++ b/packages/backend/native-utils/src/model/entity/note_favorite.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "note_favorite")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "NoteFavorite")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/note_reaction.rs b/packages/backend/native-utils/src/model/entity/note_reaction.rs index dd1bc266..919c6804 100644 --- a/packages/backend/native-utils/src/model/entity/note_reaction.rs +++ b/packages/backend/native-utils/src/model/entity/note_reaction.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "note_reaction")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "NoteReaction")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/note_thread_muting.rs b/packages/backend/native-utils/src/model/entity/note_thread_muting.rs index 07883afa..d8d17ecd 100644 --- a/packages/backend/native-utils/src/model/entity/note_thread_muting.rs +++ b/packages/backend/native-utils/src/model/entity/note_thread_muting.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "note_thread_muting")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "NoteThreadMuting")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/note_unread.rs b/packages/backend/native-utils/src/model/entity/note_unread.rs index 62a8dbde..43eac1a0 100644 --- a/packages/backend/native-utils/src/model/entity/note_unread.rs +++ b/packages/backend/native-utils/src/model/entity/note_unread.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "note_unread")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "NoteUnread")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/note_watching.rs b/packages/backend/native-utils/src/model/entity/note_watching.rs index aee1c0ea..a68040c1 100644 --- a/packages/backend/native-utils/src/model/entity/note_watching.rs +++ b/packages/backend/native-utils/src/model/entity/note_watching.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "note_watching")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "NoteWatching")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/notification.rs b/packages/backend/native-utils/src/model/entity/notification.rs index 5da963a4..4d9266c4 100644 --- a/packages/backend/native-utils/src/model/entity/notification.rs +++ b/packages/backend/native-utils/src/model/entity/notification.rs @@ -5,7 +5,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "notification")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "Notification")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/page.rs b/packages/backend/native-utils/src/model/entity/page.rs index ea5c4c13..b0dd9ff3 100644 --- a/packages/backend/native-utils/src/model/entity/page.rs +++ b/packages/backend/native-utils/src/model/entity/page.rs @@ -5,7 +5,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "page")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "Page")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/page_like.rs b/packages/backend/native-utils/src/model/entity/page_like.rs index dec0f5bf..bd529a45 100644 --- a/packages/backend/native-utils/src/model/entity/page_like.rs +++ b/packages/backend/native-utils/src/model/entity/page_like.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "page_like")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "PageLike")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/password_reset_request.rs b/packages/backend/native-utils/src/model/entity/password_reset_request.rs index ac95ce67..1af8309a 100644 --- a/packages/backend/native-utils/src/model/entity/password_reset_request.rs +++ b/packages/backend/native-utils/src/model/entity/password_reset_request.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "password_reset_request")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "PasswordResetRequest")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/poll.rs b/packages/backend/native-utils/src/model/entity/poll.rs index eed95473..cff7a017 100644 --- a/packages/backend/native-utils/src/model/entity/poll.rs +++ b/packages/backend/native-utils/src/model/entity/poll.rs @@ -5,7 +5,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "poll")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "Poll")] pub struct Model { #[sea_orm(column_name = "noteId", primary_key, auto_increment = false, unique)] pub note_id: String, diff --git a/packages/backend/native-utils/src/model/entity/poll_vote.rs b/packages/backend/native-utils/src/model/entity/poll_vote.rs index 68040fcf..c0d19195 100644 --- a/packages/backend/native-utils/src/model/entity/poll_vote.rs +++ b/packages/backend/native-utils/src/model/entity/poll_vote.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "poll_vote")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "PollVote")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/promo_note.rs b/packages/backend/native-utils/src/model/entity/promo_note.rs index 6fd235e1..516ca206 100644 --- a/packages/backend/native-utils/src/model/entity/promo_note.rs +++ b/packages/backend/native-utils/src/model/entity/promo_note.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "promo_note")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "PromoNote")] pub struct Model { #[sea_orm(column_name = "noteId", primary_key, auto_increment = false, unique)] pub note_id: String, diff --git a/packages/backend/native-utils/src/model/entity/promo_read.rs b/packages/backend/native-utils/src/model/entity/promo_read.rs index 5a802895..8a3749be 100644 --- a/packages/backend/native-utils/src/model/entity/promo_read.rs +++ b/packages/backend/native-utils/src/model/entity/promo_read.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "promo_read")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "PromoRead")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/registration_ticket.rs b/packages/backend/native-utils/src/model/entity/registration_ticket.rs index c4bf3c68..b73b15c1 100644 --- a/packages/backend/native-utils/src/model/entity/registration_ticket.rs +++ b/packages/backend/native-utils/src/model/entity/registration_ticket.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "registration_ticket")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "RegistrationTicket")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/registry_item.rs b/packages/backend/native-utils/src/model/entity/registry_item.rs index c35fba39..b6358133 100644 --- a/packages/backend/native-utils/src/model/entity/registry_item.rs +++ b/packages/backend/native-utils/src/model/entity/registry_item.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "registry_item")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "RegistryItem")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/relay.rs b/packages/backend/native-utils/src/model/entity/relay.rs index 884cf570..840242a4 100644 --- a/packages/backend/native-utils/src/model/entity/relay.rs +++ b/packages/backend/native-utils/src/model/entity/relay.rs @@ -5,7 +5,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "relay")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "Relay")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/renote_muting.rs b/packages/backend/native-utils/src/model/entity/renote_muting.rs index fab315b8..6fac2021 100644 --- a/packages/backend/native-utils/src/model/entity/renote_muting.rs +++ b/packages/backend/native-utils/src/model/entity/renote_muting.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "renote_muting")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "RenoteMuting")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/reply_muting.rs b/packages/backend/native-utils/src/model/entity/reply_muting.rs index a34d8a61..fe8f390b 100644 --- a/packages/backend/native-utils/src/model/entity/reply_muting.rs +++ b/packages/backend/native-utils/src/model/entity/reply_muting.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "reply_muting")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "ReplyMuting")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/signin.rs b/packages/backend/native-utils/src/model/entity/signin.rs index 85396b5a..889207be 100644 --- a/packages/backend/native-utils/src/model/entity/signin.rs +++ b/packages/backend/native-utils/src/model/entity/signin.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "signin")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "Signin")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/sw_subscription.rs b/packages/backend/native-utils/src/model/entity/sw_subscription.rs index 8899e6ed..7b569fae 100644 --- a/packages/backend/native-utils/src/model/entity/sw_subscription.rs +++ b/packages/backend/native-utils/src/model/entity/sw_subscription.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "sw_subscription")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "SwSubscription")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/used_username.rs b/packages/backend/native-utils/src/model/entity/used_username.rs index f3ffb0f6..188df056 100644 --- a/packages/backend/native-utils/src/model/entity/used_username.rs +++ b/packages/backend/native-utils/src/model/entity/used_username.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "used_username")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "UsedUsername")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub username: String, diff --git a/packages/backend/native-utils/src/model/entity/user.rs b/packages/backend/native-utils/src/model/entity/user.rs index 82a8e676..1028d5eb 100644 --- a/packages/backend/native-utils/src/model/entity/user.rs +++ b/packages/backend/native-utils/src/model/entity/user.rs @@ -5,7 +5,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "user")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "User")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/user_group.rs b/packages/backend/native-utils/src/model/entity/user_group.rs index 6d795886..d9f95e61 100644 --- a/packages/backend/native-utils/src/model/entity/user_group.rs +++ b/packages/backend/native-utils/src/model/entity/user_group.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "user_group")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "UserGroup")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/user_group_invitation.rs b/packages/backend/native-utils/src/model/entity/user_group_invitation.rs index ee7edd8b..01a86c46 100644 --- a/packages/backend/native-utils/src/model/entity/user_group_invitation.rs +++ b/packages/backend/native-utils/src/model/entity/user_group_invitation.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "user_group_invitation")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "UserGroupInvitation")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/user_group_invite.rs b/packages/backend/native-utils/src/model/entity/user_group_invite.rs index f49e40f1..f76e4f52 100644 --- a/packages/backend/native-utils/src/model/entity/user_group_invite.rs +++ b/packages/backend/native-utils/src/model/entity/user_group_invite.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "user_group_invite")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "UserGroupInvite")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/user_group_joining.rs b/packages/backend/native-utils/src/model/entity/user_group_joining.rs index d34a3a6c..a8d6c5ff 100644 --- a/packages/backend/native-utils/src/model/entity/user_group_joining.rs +++ b/packages/backend/native-utils/src/model/entity/user_group_joining.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "user_group_joining")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "UserGroupJoining")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/user_ip.rs b/packages/backend/native-utils/src/model/entity/user_ip.rs index 36ab2f9b..229905a2 100644 --- a/packages/backend/native-utils/src/model/entity/user_ip.rs +++ b/packages/backend/native-utils/src/model/entity/user_ip.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "user_ip")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "UserIp")] pub struct Model { #[sea_orm(primary_key)] pub id: i32, diff --git a/packages/backend/native-utils/src/model/entity/user_keypair.rs b/packages/backend/native-utils/src/model/entity/user_keypair.rs index 454f959a..4d2637eb 100644 --- a/packages/backend/native-utils/src/model/entity/user_keypair.rs +++ b/packages/backend/native-utils/src/model/entity/user_keypair.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "user_keypair")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "UserKeypair")] pub struct Model { #[sea_orm(column_name = "userId", primary_key, auto_increment = false, unique)] pub user_id: String, diff --git a/packages/backend/native-utils/src/model/entity/user_list.rs b/packages/backend/native-utils/src/model/entity/user_list.rs index 0e900ee8..d85201e4 100644 --- a/packages/backend/native-utils/src/model/entity/user_list.rs +++ b/packages/backend/native-utils/src/model/entity/user_list.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "user_list")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "UserList")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/user_list_joining.rs b/packages/backend/native-utils/src/model/entity/user_list_joining.rs index c77ec392..763dce54 100644 --- a/packages/backend/native-utils/src/model/entity/user_list_joining.rs +++ b/packages/backend/native-utils/src/model/entity/user_list_joining.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "user_list_joining")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "UserListJoining")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/user_note_pining.rs b/packages/backend/native-utils/src/model/entity/user_note_pining.rs index c29b5470..633e3142 100644 --- a/packages/backend/native-utils/src/model/entity/user_note_pining.rs +++ b/packages/backend/native-utils/src/model/entity/user_note_pining.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "user_note_pining")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "UserNotePining")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/user_pending.rs b/packages/backend/native-utils/src/model/entity/user_pending.rs index 8a2f1806..235dfc6d 100644 --- a/packages/backend/native-utils/src/model/entity/user_pending.rs +++ b/packages/backend/native-utils/src/model/entity/user_pending.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "user_pending")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "UserPending")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/user_profile.rs b/packages/backend/native-utils/src/model/entity/user_profile.rs index 7ff52bea..09b1d627 100644 --- a/packages/backend/native-utils/src/model/entity/user_profile.rs +++ b/packages/backend/native-utils/src/model/entity/user_profile.rs @@ -6,7 +6,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "user_profile")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "UserProfile")] pub struct Model { #[sea_orm(column_name = "userId", primary_key, auto_increment = false, unique)] pub user_id: String, diff --git a/packages/backend/native-utils/src/model/entity/user_publickey.rs b/packages/backend/native-utils/src/model/entity/user_publickey.rs index 994cfd33..7ebf481f 100644 --- a/packages/backend/native-utils/src/model/entity/user_publickey.rs +++ b/packages/backend/native-utils/src/model/entity/user_publickey.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "user_publickey")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "UserPublickey")] pub struct Model { #[sea_orm(column_name = "userId", primary_key, auto_increment = false, unique)] pub user_id: String, diff --git a/packages/backend/native-utils/src/model/entity/user_security_key.rs b/packages/backend/native-utils/src/model/entity/user_security_key.rs index 67d43843..dc7d5194 100644 --- a/packages/backend/native-utils/src/model/entity/user_security_key.rs +++ b/packages/backend/native-utils/src/model/entity/user_security_key.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "user_security_key")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "UserSecurityKey")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, diff --git a/packages/backend/native-utils/src/model/entity/webhook.rs b/packages/backend/native-utils/src/model/entity/webhook.rs index e4e2b14f..e9235ffb 100644 --- a/packages/backend/native-utils/src/model/entity/webhook.rs +++ b/packages/backend/native-utils/src/model/entity/webhook.rs @@ -4,7 +4,7 @@ use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "webhook")] -#[napi_derive::napi(object)] +#[napi_derive::napi(object, js_name = "Webhook")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String,