From 75f4905f7181855aa0985f4edb1cf3badd225a35 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 1533c8659..63fb38fc7 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 cdea8b461..67565b238 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 65bcb2117..ba893ee21 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 cd06ebf0f..9251b2917 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 2fe428350..25cf29d1c 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 bb524a0fb..ece571b6c 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 1a8d923ff..50ac584bf 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 3d05eab29..a58d717b2 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 d5242dff2..1d994d68b 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 9ff792eca..a6a1dba5b 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 f10039e77..b77f1d5c8 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 785f0a4d4..3d66c4115 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 ac1c8d139..ae47c15f6 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 f885400a9..d4ee2b242 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 0f2858796..3f645fff4 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 29c174f5c..099343d47 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 5ce766dc0..4d87dc0ab 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 48d39f2f4..dd0b1e216 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 87835b305..8def4d3cc 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 892327edc..5989ebeaa 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 015896e80..5eddee4c4 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 58673dc30..54ea1d3de 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 98ff7a437..ee283df73 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 71aa49f63..443dd1190 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 1f550436c..c71e0fca0 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 02be149cf..0998ec28d 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 27a33fddf..2521d6814 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 2c591d70e..53ee57a52 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 fc642350d..1b45aa35c 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 99b648bdd..e7132e2f1 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 62617bf1c..110cb7ef7 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 b92926859..5450ae3c8 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 b619c069a..2946a6bf0 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 f1e78cac1..da914bb10 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 dd1bc2661..919c6804e 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 07883afaf..d8d17ecd2 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 62a8dbde0..43eac1a0b 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 aee1c0eaf..a68040c18 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 5da963a4f..4d9266c48 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 ea5c4c138..b0dd9ff36 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 dec0f5bf1..bd529a45c 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 ac95ce672..1af8309af 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 eed954736..cff7a0178 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 68040fcfe..c0d19195a 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 6fd235e1b..516ca206c 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 5a8028959..8a3749be6 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 c4bf3c68d..b73b15c1d 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 c35fba391..b6358133e 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 884cf570f..840242a4b 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 fab315b84..6fac20212 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 a34d8a61f..fe8f390b0 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 85396b5aa..889207be5 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 8899e6ed2..7b569fae1 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 f3ffb0f67..188df056e 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 82a8e676a..1028d5eb6 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 6d7958864..d9f95e618 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 ee7edd8b8..01a86c460 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 f49e40f11..f76e4f52b 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 d34a3a6c3..a8d6c5ffe 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 36ab2f9b0..229905a2f 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 454f959a2..4d2637eb0 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 0e900ee88..d85201e42 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 c77ec392b..763dce547 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 c29b54709..633e31424 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 8a2f1806b..235dfc6d3 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 7ff52bea6..09b1d6276 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 994cfd336..7ebf481f4 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 67d43843b..dc7d51948 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 e4e2b14f9..e9235ffb8 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,