diff --git a/Dockerfile b/Dockerfile
index 654af605dc..d397fe01cd 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -63,6 +63,7 @@ ARG GID="991"
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ffmpeg tini curl libjemalloc-dev libjemalloc2 \
+ && ln -s /usr/lib/$(uname -m)-linux-gnu/libjemalloc.so.2 /usr/local/lib/libjemalloc.so \
&& corepack enable \
&& groupadd -g "${GID}" misskey \
&& useradd -l -u "${UID}" -g "${GID}" -m -d /misskey misskey \
@@ -81,7 +82,7 @@ COPY --chown=misskey:misskey --from=native-builder /misskey/packages/backend/bui
COPY --chown=misskey:misskey --from=native-builder /misskey/fluent-emojis /misskey/fluent-emojis
COPY --chown=misskey:misskey . ./
-ENV LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2
+ENV LD_PRELOAD=/usr/local/lib/libjemalloc.so
ENV NODE_ENV=production
HEALTHCHECK --interval=5s --retries=20 CMD ["/bin/bash", "/misskey/healthcheck.sh"]
ENTRYPOINT ["/usr/bin/tini", "--"]
diff --git a/locales/de-DE.yml b/locales/de-DE.yml
index bba4566a54..16f210202b 100644
--- a/locales/de-DE.yml
+++ b/locales/de-DE.yml
@@ -1108,7 +1108,10 @@ pastAnnouncements: "Alte Ankündigungen"
youHaveUnreadAnnouncements: "Es gibt neue Ankündigungen."
useSecurityKey: "Folge bitten den Anweisungen deines Browsers bzw. Gerätes und verwende deinen Hardware-Sicherheitsschlüssel oder Passkey."
replies: "Antworten"
-renotes: "Renote"
+renotes: "Renotes"
+loadReplies: "Antworten anzeigen"
+loadConversation: "Unterhaltung anzeigen"
+pinnedList: "Angeheftete Liste"
_announcement:
forExistingUsers: "Nur für existierende Nutzer"
forExistingUsersDescription: "Ist diese Option aktiviert, wird diese Ankündigung nur Nutzern angezeigt, die zum Zeitpunkt der Ankündigung bereits registriert sind. Ist sie deaktiviert, wird sie auch Nutzern, die sich nach dessen Veröffentlichung registrieren, angezeigt."
diff --git a/locales/en-US.yml b/locales/en-US.yml
index 772e6f35da..d8d6855d62 100644
--- a/locales/en-US.yml
+++ b/locales/en-US.yml
@@ -1111,7 +1111,10 @@ pastAnnouncements: "Past announcements"
youHaveUnreadAnnouncements: "There are unread announcements."
useSecurityKey: "Please follow your browser's or device's instructions to use your security- or passkey."
replies: "Reply"
-renotes: "Renote"
+renotes: "Renotes"
+loadReplies: "Show replies"
+loadConversation: "Show conversation"
+pinnedList: "Pinned list"
_announcement:
forExistingUsers: "Existing users only"
forExistingUsersDescription: "This announcement will only be shown to users existing at the point of publishment if enabled. If disabled, those newly signing up after it has been posted will also see it."
diff --git a/locales/index.d.ts b/locales/index.d.ts
index 32df226912..59295664cb 100644
--- a/locales/index.d.ts
+++ b/locales/index.d.ts
@@ -1117,6 +1117,8 @@ export interface Locale {
"renotes": string;
"loadReplies": string;
"loadConversation": string;
+ "pinnedList": string;
+ "keepScreenOn": string;
"_announcement": {
"forExistingUsers": string;
"forExistingUsersDescription": string;
diff --git a/locales/it-IT.yml b/locales/it-IT.yml
index b073cdcdd7..d8455c3d81 100644
--- a/locales/it-IT.yml
+++ b/locales/it-IT.yml
@@ -1109,6 +1109,9 @@ youHaveUnreadAnnouncements: "Ci sono Annunci non letti"
useSecurityKey: "Per utilizzare la chiave di sicurezza o la passkey, segui le indicazioni del dispositivo"
replies: "Rispondi"
renotes: "Rinota"
+loadReplies: "Leggi le risposte"
+loadConversation: "Leggi la conversazione"
+pinnedList: "Elenco in primo piano"
_announcement:
forExistingUsers: "Solo ai profili attuali"
forExistingUsersDescription: "L'annuncio sarà visibile solo ai profili esistenti in questo momento. Se disabilitato, sarà visibile anche ai profili che verranno creati dopo la pubblicazione di questo annuncio."
@@ -1137,6 +1140,11 @@ _serverRules:
description: "In Europa è necessario mostrare l'informativa sul trattamento dei dati personali, prima della registrazione al servizio."
_serverSettings:
iconUrl: "URL dell'icona"
+ appIconDescription: "Indicare l'icona da usare quando {host} viene salvata come App."
+ appIconUsageExample: "Ad esempio quando si aggiunge il segnalibro alla PWA (Progressive Web App), oppure alla schermata iniziale del dispositivo mobile "
+ appIconStyleRecommendation: "Poiché l'icona potrebbe essere ritagliata in un quadrato o in un cerchio, si raccomanda che abbia un margine colorato."
+ appIconResolutionMustBe: "La risoluzione minima è {resolution}"
+ manifestJsonOverride: "Sostituire il file manifest.json"
_accountMigration:
moveFrom: "Migra un altro profilo dentro a questo"
moveFromSub: "Crea un alias verso un altro profilo remoto"
diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml
index 7cad2361bf..a9c11bbba2 100644
--- a/locales/ja-JP.yml
+++ b/locales/ja-JP.yml
@@ -1114,6 +1114,8 @@ replies: "返信"
renotes: "リノート"
loadReplies: "返信を見る"
loadConversation: "会話を見る"
+pinnedList: "ピン留めされたリスト"
+keepScreenOn: "デバイスの画面を常にオンにする"
_announcement:
forExistingUsers: "既存ユーザーのみ"
diff --git a/locales/ja-KS.yml b/locales/ja-KS.yml
index 7e07138b1f..936f6ebb7b 100644
--- a/locales/ja-KS.yml
+++ b/locales/ja-KS.yml
@@ -1102,6 +1102,7 @@ forYou: "あんたへ"
currentAnnouncements: "現在のお知らせやで"
pastAnnouncements: "過去のお知らせやで"
youHaveUnreadAnnouncements: "あんたまだこのお知らせ読んどらんやろ。"
+useSecurityKey: "ブラウザまたはデバイスの言う通りに、セキュリティキーまたはパスキーを使ってや。"
replies: "返事"
renotes: "Renote"
_announcement:
diff --git a/locales/th-TH.yml b/locales/th-TH.yml
index 6a1cfd505a..852e341648 100644
--- a/locales/th-TH.yml
+++ b/locales/th-TH.yml
@@ -1102,6 +1102,8 @@ icon: "ไอคอน"
forYou: "สำหรับคุณ"
replies: "ตอบกลับ"
renotes: "รีโน้ต"
+loadReplies: "แสดงการตอบกลับ"
+loadConversation: "แสดงบทสนทนา"
_announcement:
forExistingUsersDescription: "การประกาศนี้จะแสดงต่อผู้ใช้ที่มีอยู่ ณ จุดที่เผยแพร่นั้นๆถ้าหากเปิดใช้งาน ถ้าหากปิดใช้งานผู้ที่กำลังสมัครใหม่หลังจากโพสต์แล้วนั้นก็จะเห็นเช่นกัน"
needConfirmationToReadDescription: "ข้อความแจ้งแยก ถ้าหากต้องการเพื่อยืนยันว่ากำลังทำเครื่องหมายประกาศนี้ว่าอ่านแล้วจะแสดงขึ้นถ้าหากเปิดใช้งาน การประกาศนั้นจะไม่รวมอยู่ในฟังก์ชั่นว่า \"ทำเครื่องหมายทั้งหมดว่าอ่านแล้ว\""
@@ -1382,6 +1384,8 @@ _achievements:
title: "Brain Diver"
description: "โพสต์ลิงก์ไปยัง Brain Diver"
flavor: "Misskey-Misskey La-Tu-Ma"
+ _smashTestNotificationButton:
+ title: "ทดสอบโอเวอร์โฟลว์"
_role:
new: "บทบาทใหม่"
edit: "แก้ไขบทบาท"
@@ -1986,6 +1990,10 @@ _notification:
unreadAntennaNote: "เสาอากาศ {name}"
emptyPushNotificationMessage: "การแจ้งเตือนแบบพุชได้รับการอัพเดทแล้ว"
achievementEarned: "รับความสำเร็จ"
+ testNotification: "ทดสอบการแจ้งเตือน"
+ checkNotificationBehavior: "ตรวจสอบลักษณะที่ปรากฏการแจ้งเตือน"
+ sendTestNotification: "ส่งทดสอบการแจ้งเตือน"
+ notificationWillBeDisplayedLikeThis: "การแจ้งเตือนมีลักษณะแบบนี้"
_types:
all: "ทั้งหมด"
follow: "กำลังติดตาม"
diff --git a/locales/vi-VN.yml b/locales/vi-VN.yml
index 2187d36807..7b74e9714f 100644
--- a/locales/vi-VN.yml
+++ b/locales/vi-VN.yml
@@ -1,5 +1,5 @@
---
-_lang_: "Tiếng Việt"
+_lang_: "Tiếng Nhật"
headlineMisskey: "Mạng xã hội liên hợp"
introMisskey: "Xin chào! Misskey là một nền tảng tiểu blog phi tập trung mã nguồn mở.\nViết \"tút\" để chia sẻ những suy nghĩ của bạn 📡\nBằng \"biểu cảm\", bạn có thể bày tỏ nhanh chóng cảm xúc của bạn với các tút 👍\nHãy khám phá một thế giới mới! 🚀"
poweredByMisskeyDescription: "{name} là một trong những chủ máy của Misskey là nền tảng mã nguồn mở"
@@ -45,6 +45,7 @@ pin: "Ghim"
unpin: "Bỏ ghim"
copyContent: "Chép nội dung"
copyLink: "Chép liên kết"
+copyLinkRenote: "Sao chép liên kết ghi chú"
delete: "Xóa"
deleteAndEdit: "Sửa"
deleteAndEditConfirm: "Bạn có chắc muốn sửa tút này? Những biểu cảm, lượt trả lời và đăng lại sẽ bị mất."
@@ -156,6 +157,7 @@ addEmoji: "Thêm emoji"
settingGuide: "Cài đặt đề xuất"
cacheRemoteFiles: "Tập tin cache từ xa"
cacheRemoteFilesDescription: "Khi tùy chọn này bị tắt, các tập tin từ xa sẽ được tải trực tiếp từ máy chủ khác. Điều này sẽ giúp giảm dung lượng lưu trữ nhưng lại tăng lưu lượng truy cập, vì hình thu nhỏ sẽ không được tạo."
+youCanCleanRemoteFilesCache: "Bạn có thể xoá bộ nhớ đệm bằng cách nhấn vào nút🗑️ở trong phần quản lý tệp."
cacheRemoteSensitiveFiles: "Lưu các tập tin nhạy cảm vào bộ nhớ tạm từ xa"
cacheRemoteSensitiveFilesDescription: "Khi bạn tắt tính năng này, các tệp nhạy cảm sẽ được tải trực tiếp từ máy chủ và không được lưu vào bộ nhớ tạm"
flagAsBot: "Đánh dấu đây là tài khoản bot"
@@ -409,10 +411,13 @@ aboutMisskey: "Về Misskey"
administrator: "Quản trị viên"
token: "Token"
2fa: "Xác thực 2 yếu tố"
+setupOf2fa: "Thiết lập xác thực 2 yếu tố"
totp: "Ứng dụng xác thực"
totpDescription: "Nhắn mã OTP bằng ứng dụng xác thực"
moderator: "Kiểm duyệt viên"
moderation: "Kiểm duyệt"
+moderationNote: "Ghi chú kiểm duyệt"
+addModerationNote: "Thêm ghi chú kiểm duyệt"
nUsersMentioned: "Dùng bởi {n} người"
securityKeyAndPasskey: "Mã bảo mật・Passkey"
securityKey: "Khóa bảo mật"
@@ -988,11 +993,71 @@ copyErrorInfo: "Sao chép thông tin lỗi"
joinThisServer: "Đăng ký trên chủ máy này"
exploreOtherServers: "Tìm chủ máy khác"
letsLookAtTimeline: "Thử xem Timeline"
+emailNotSupported: "Máy chủ này không hỗ trợ gửi email"
+postToTheChannel: "Đăng lên kênh"
+cannotBeChangedLater: "Không thể thay đổi sau này."
+rolesAssignedToMe: "Vai trò được giao cho tôi"
+resetPasswordConfirm: "Bạn thực sự muốn đặt lại mật khẩu?"
+sensitiveWords: "Các từ nhạy cảm"
+license: "Giấy phép"
+unfavoriteConfirm: "Bạn thực sự muốn xoá khỏi mục yêu thích?"
+retryAllQueuesConfirmText: "Điều này sẽ tạm thời làm tăng mức độ tải của máy chủ."
+enableChartsForRemoteUser: "Tạo biểu đồ người dùng từ xa"
+video: "Video"
+videos: "Các video"
+dataSaver: "Tiết kiệm dung lượng"
+accountMigration: "Gộp chung tài khoản"
+accountMoved: "Người dùng này đã chuyển sang một tài khoản mới:"
+accountMovedShort: "Tài khoản này đã được gộp"
+operationForbidden: "Thao tác này không thể thực hiện"
+forceShowAds: "Luôn hiện quảng cáo"
+notificationDisplay: "Thông báo"
+leftTop: "Phía trên bên tráí"
+rightTop: "Phía trên bên phải"
+leftBottom: "Phía dưới bên trái"
+rightBottom: "Phía dưới bên phải"
+stackAxis: "Hướng chồng"
+vertical: "Dọc"
horizontal: "Thanh bên"
+position: "Vị trí"
+serverRules: "Luật của máy chủ"
youFollowing: "Đang theo dõi"
+later: "Để sau"
+goToMisskey: "Tới Misskey"
+installed: "Đã tải xuống"
+branding: "Thương hiệu"
+turnOffToImprovePerformance: "Tắt mục này có thể cải thiện hiệu năng."
+expirationDate: "Ngày hết hạn"
+noExpirationDate: "Vô thời hạn"
+waitingForMailAuth: "Đang chờ xác nhận email"
+unused: "Chưa được sử dụng"
+used: "Đã được sử dụng"
+expired: "Đã hết hạn"
+doYouAgree: "Đồng ý?"
+iHaveReadXCarefullyAndAgree: "Tôi đã đọc và đồng ý với \"x\"."
+dialog: "Hộp thoại"
icon: "Ảnh đại diện"
+forYou: "Dành cho bạn"
+currentAnnouncements: "Thông báo hiện tại"
+pastAnnouncements: "Thông báo trước đó"
+youHaveUnreadAnnouncements: "Có thông báo chưa đọc."
replies: "Trả lời"
renotes: "Đăng lại"
+loadReplies: "Hiển thị các trả lời"
+pinnedList: "Các mục đã được ghim"
+keepScreenOn: "Giữ màn hình luôn bật"
+_announcement:
+ forExistingUsers: "Chỉ những người dùng đã tồn tại"
+ end: "Lưu trữ thông báo"
+ readConfirmTitle: "Đánh dấu là đã đọc?"
+ readConfirmText: "Điều này sẽ đánh dấu nội dung của \"{title}\" là đã đọc."
+_initialAccountSetting:
+ accountCreated: "Tài khoản của bạn đã được tạo thành công!"
+ letsStartAccountSetup: "Để bắt đầu, hãy cùng thiết lập tài khoản nhé."
+ letsFillYourProfile: "Đầu tiên, hãy thiết lập hồ sơ của bạn."
+ profileSetting: "Thiết lập hồ sơ"
+_accountMigration:
+ movedTo: "Tài khoản mới:"
_achievements:
earnedAt: "Ngày thu nhận"
_types:
diff --git a/locales/zh-CN.yml b/locales/zh-CN.yml
index 28ac486900..ef32d1aa23 100644
--- a/locales/zh-CN.yml
+++ b/locales/zh-CN.yml
@@ -1109,6 +1109,10 @@ youHaveUnreadAnnouncements: "您有未读的公告"
useSecurityKey: "请根据浏览器或设备的提示,使用安全密钥或通行密钥。"
replies: "回复"
renotes: "转发"
+loadReplies: "查看回复"
+loadConversation: "查看对话"
+pinnedList: "已置顶的列表"
+keepScreenOn: "保持设备屏幕开启"
_announcement:
forExistingUsers: "仅限现有用户"
forExistingUsersDescription: "若启用,该公告将仅对创建此公告时存在的用户可见。 如果禁用,则在创建此公告后注册的用户也可以看到该公告。"
@@ -1137,9 +1141,11 @@ _serverRules:
description: "在新用户注册前显示服务器的简单规则。推荐显示服务条款的主要内容。"
_serverSettings:
iconUrl: "图标 URL"
- appIconUsageExample: "例如:PWA和新增至手机主屏幕的书签。"
- appIconStyleRecommendation: "因为可能会被裁切为圆形或者圆角图形,所以建议将背景用单色填充。"
- appIconResolutionMustBe: "分辨率必须符合{resolution}。"
+ appIconDescription: "指定当 {host} 显示为 app 时的图标。"
+ appIconUsageExample: "例如:作为书签添加到 PWA 或手机主屏幕的时候"
+ appIconStyleRecommendation: "因为有可能会被裁切为圆形或者圆角矩形,建议使用边缘带有留白背景的图标。"
+ appIconResolutionMustBe: "分辨率必须为 {resolution}。"
+ manifestJsonOverride: "覆盖 mainfest.json"
_accountMigration:
moveFrom: "从别的账号迁移到此账户"
moveFromSub: "为另一个账户建立别名"
diff --git a/locales/zh-TW.yml b/locales/zh-TW.yml
index 6d3881a0fd..39f2f2ff29 100644
--- a/locales/zh-TW.yml
+++ b/locales/zh-TW.yml
@@ -1111,6 +1111,7 @@ replies: "回覆"
renotes: "轉發"
loadReplies: "閱覽回覆"
loadConversation: "閱覽對話"
+pinnedList: "已置頂的清單"
_announcement:
forExistingUsers: "僅限既有的使用者"
forExistingUsersDescription: "啟用代表僅向現存使用者顯示;停用代表張貼後註冊的新使用者也會看到。"
diff --git a/package.json b/package.json
index 33f8066c94..ed4ef25abb 100644
--- a/package.json
+++ b/package.json
@@ -1,12 +1,12 @@
{
"name": "misskey",
- "version": "2023.9.0-beta.8-prismisskey.1",
+ "version": "2023.9.0-beta.9",
"codename": "nasubi",
"repository": {
"type": "git",
- "url": "https://github.com/mattyatea/misskey.git"
+ "url": "https://github.com/misskey-dev/misskey.git"
},
- "packageManager": "pnpm@8.7.5",
+ "packageManager": "pnpm@8.7.6",
"workspaces": [
"packages/frontend",
"packages/backend",
@@ -46,13 +46,13 @@
"execa": "8.0.1",
"cssnano": "6.0.1",
"js-yaml": "4.1.0",
- "postcss": "8.4.29",
+ "postcss": "8.4.30",
"terser": "5.19.4",
"typescript": "5.2.2"
},
"devDependencies": {
- "@typescript-eslint/eslint-plugin": "6.7.0",
- "@typescript-eslint/parser": "6.7.0",
+ "@typescript-eslint/eslint-plugin": "6.7.2",
+ "@typescript-eslint/parser": "6.7.2",
"cross-env": "7.0.3",
"cypress": "13.2.0",
"eslint": "8.49.0",
diff --git a/packages/backend/package.json b/packages/backend/package.json
index a710034d83..3a6fba8482 100644
--- a/packages/backend/package.json
+++ b/packages/backend/package.json
@@ -58,19 +58,19 @@
"dependencies": {
"@aws-sdk/client-s3": "3.412.0",
"@aws-sdk/lib-storage": "3.412.0",
- "@smithy/node-http-handler": "2.1.3",
- "@bull-board/api": "5.8.3",
- "@bull-board/fastify": "5.8.3",
- "@bull-board/ui": "5.8.3",
+ "@smithy/node-http-handler": "2.1.5",
+ "@bull-board/api": "5.8.4",
+ "@bull-board/fastify": "5.8.4",
+ "@bull-board/ui": "5.8.4",
"@discordapp/twemoji": "14.1.2",
"@fastify/accepts": "4.2.0",
"@fastify/cookie": "9.0.4",
- "@fastify/cors": "8.3.0",
+ "@fastify/cors": "8.4.0",
"@fastify/express": "2.3.0",
"@fastify/http-proxy": "9.2.1",
"@fastify/multipart": "7.7.3",
- "@fastify/static": "6.11.1",
- "@fastify/view": "8.1.0",
+ "@fastify/static": "6.11.2",
+ "@fastify/view": "8.2.0",
"@nestjs/common": "10.2.5",
"@nestjs/core": "10.2.5",
"@nestjs/testing": "10.2.5",
@@ -78,7 +78,7 @@
"@simplewebauthn/server": "8.1.1",
"@sinonjs/fake-timers": "11.1.0",
"@swc/cli": "0.1.62",
- "@swc/core": "1.3.84",
+ "@swc/core": "1.3.86",
"accepts": "1.3.8",
"ajv": "8.12.0",
"archiver": "6.0.1",
@@ -86,7 +86,7 @@
"bcryptjs": "2.4.3",
"blurhash": "2.0.5",
"body-parser": "1.20.2",
- "bullmq": "4.10.0",
+ "bullmq": "4.11.1",
"cacheable-lookup": "7.0.0",
"cbor": "9.0.1",
"chalk": "5.3.0",
@@ -149,13 +149,13 @@
"rss-parser": "3.13.0",
"rxjs": "7.8.1",
"sanitize-html": "2.11.0",
- "sharp": "0.32.5",
+ "sharp": "0.32.6",
"sharp-read-bmp": "github:misskey-dev/sharp-read-bmp",
"slacc": "0.0.10",
"strict-event-emitter-types": "2.0.0",
"stringz": "2.1.0",
"summaly": "github:misskey-dev/summaly",
- "systeminformation": "5.21.5",
+ "systeminformation": "5.21.8",
"tinycolor2": "1.6.0",
"tmp": "0.2.1",
"tsc-alias": "1.8.7",
@@ -166,7 +166,7 @@
"ulid": "2.3.0",
"vary": "1.1.2",
"web-push": "3.6.6",
- "ws": "8.14.1",
+ "ws": "8.14.2",
"xev": "3.0.2"
},
"devDependencies": {
@@ -175,21 +175,21 @@
"@swc/jest": "0.2.29",
"@types/accepts": "1.3.5",
"@types/archiver": "5.3.2",
- "@types/bcryptjs": "2.4.3",
- "@types/body-parser": "1.19.2",
+ "@types/bcryptjs": "2.4.4",
+ "@types/body-parser": "1.19.3",
"@types/cbor": "6.0.0",
"@types/color-convert": "2.0.1",
"@types/content-disposition": "0.5.6",
"@types/fluent-ffmpeg": "2.1.22",
"@types/http-link-header": "1.0.3",
- "@types/jest": "29.5.4",
- "@types/js-yaml": "4.0.5",
- "@types/jsdom": "21.1.2",
- "@types/jsonld": "1.5.9",
- "@types/jsrsasign": "10.5.8",
+ "@types/jest": "29.5.5",
+ "@types/js-yaml": "4.0.6",
+ "@types/jsdom": "21.1.3",
+ "@types/jsonld": "1.5.10",
+ "@types/jsrsasign": "10.5.9",
"@types/mime-types": "2.1.1",
"@types/ms": "0.7.31",
- "@types/node": "20.6.0",
+ "@types/node": "20.6.3",
"@types/node-fetch": "3.0.3",
"@types/nodemailer": "6.4.10",
"@types/oauth": "0.9.2",
@@ -212,8 +212,8 @@
"@types/vary": "1.1.0",
"@types/web-push": "3.6.0",
"@types/ws": "8.5.5",
- "@typescript-eslint/eslint-plugin": "6.7.0",
- "@typescript-eslint/parser": "6.7.0",
+ "@typescript-eslint/eslint-plugin": "6.7.2",
+ "@typescript-eslint/parser": "6.7.2",
"aws-sdk-client-mock": "3.0.0",
"cross-env": "7.0.3",
"eslint": "8.49.0",
diff --git a/packages/backend/src/core/AccountMoveService.ts b/packages/backend/src/core/AccountMoveService.ts
index c19f0427e0..ec1d013922 100644
--- a/packages/backend/src/core/AccountMoveService.ts
+++ b/packages/backend/src/core/AccountMoveService.ts
@@ -8,7 +8,7 @@ import { IsNull, In, MoreThan, Not } from 'typeorm';
import { bindThis } from '@/decorators.js';
import { DI } from '@/di-symbols.js';
-import type { MiLocalUser, MiRemoteUser, MiUser } from '@/models/entities/User.js';
+import type { MiLocalUser, MiRemoteUser, MiUser } from '@/models/User.js';
import type { BlockingsRepository, FollowingsRepository, InstancesRepository, MutingsRepository, UserListJoiningsRepository, UsersRepository } from '@/models/_.js';
import type { RelationshipJobData, ThinUser } from '@/queue/types.js';
diff --git a/packages/backend/src/core/AccountUpdateService.ts b/packages/backend/src/core/AccountUpdateService.ts
index 5a571c66cd..664700ea6b 100644
--- a/packages/backend/src/core/AccountUpdateService.ts
+++ b/packages/backend/src/core/AccountUpdateService.ts
@@ -6,7 +6,7 @@
import { Inject, Injectable } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import type { UsersRepository } from '@/models/_.js';
-import type { MiUser } from '@/models/entities/User.js';
+import type { MiUser } from '@/models/User.js';
import { ApRendererService } from '@/core/activitypub/ApRendererService.js';
import { RelayService } from '@/core/RelayService.js';
import { ApDeliverManagerService } from '@/core/activitypub/ApDeliverManagerService.js';
diff --git a/packages/backend/src/core/AchievementService.ts b/packages/backend/src/core/AchievementService.ts
index 87cc12bad0..1b8718335b 100644
--- a/packages/backend/src/core/AchievementService.ts
+++ b/packages/backend/src/core/AchievementService.ts
@@ -5,7 +5,7 @@
import { Inject, Injectable } from '@nestjs/common';
import type { UserProfilesRepository } from '@/models/_.js';
-import type { MiUser } from '@/models/entities/User.js';
+import type { MiUser } from '@/models/User.js';
import { DI } from '@/di-symbols.js';
import { bindThis } from '@/decorators.js';
import { NotificationService } from '@/core/NotificationService.js';
diff --git a/packages/backend/src/core/AnnouncementService.ts b/packages/backend/src/core/AnnouncementService.ts
index fbe073cb76..70f37516a4 100644
--- a/packages/backend/src/core/AnnouncementService.ts
+++ b/packages/backend/src/core/AnnouncementService.ts
@@ -6,7 +6,7 @@
import { Inject, Injectable } from '@nestjs/common';
import { Brackets } from 'typeorm';
import { DI } from '@/di-symbols.js';
-import type { MiUser } from '@/models/entities/User.js';
+import type { MiUser } from '@/models/User.js';
import type { AnnouncementReadsRepository, AnnouncementsRepository, MiAnnouncement, MiAnnouncementRead } from '@/models/_.js';
import { bindThis } from '@/decorators.js';
import { Packed } from '@/misc/json-schema.js';
diff --git a/packages/backend/src/core/AntennaService.ts b/packages/backend/src/core/AntennaService.ts
index 03715a4a84..a7e74eeef0 100644
--- a/packages/backend/src/core/AntennaService.ts
+++ b/packages/backend/src/core/AntennaService.ts
@@ -5,9 +5,9 @@
import { Inject, Injectable } from '@nestjs/common';
import * as Redis from 'ioredis';
-import type { MiAntenna } from '@/models/entities/Antenna.js';
-import type { MiNote } from '@/models/entities/Note.js';
-import type { MiUser } from '@/models/entities/User.js';
+import type { MiAntenna } from '@/models/Antenna.js';
+import type { MiNote } from '@/models/Note.js';
+import type { MiUser } from '@/models/User.js';
import { GlobalEventService } from '@/core/GlobalEventService.js';
import * as Acct from '@/misc/acct.js';
import type { Packed } from '@/misc/json-schema.js';
diff --git a/packages/backend/src/core/CacheService.ts b/packages/backend/src/core/CacheService.ts
index 7073667211..6ca684d53c 100644
--- a/packages/backend/src/core/CacheService.ts
+++ b/packages/backend/src/core/CacheService.ts
@@ -7,7 +7,7 @@ import { Inject, Injectable } from '@nestjs/common';
import * as Redis from 'ioredis';
import type { BlockingsRepository, ChannelFollowingsRepository, FollowingsRepository, MutingsRepository, RenoteMutingsRepository, MiUserProfile, UserProfilesRepository, UsersRepository } from '@/models/_.js';
import { MemoryKVCache, RedisKVCache } from '@/misc/cache.js';
-import type { MiLocalUser, MiUser } from '@/models/entities/User.js';
+import type { MiLocalUser, MiUser } from '@/models/User.js';
import { DI } from '@/di-symbols.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { bindThis } from '@/decorators.js';
diff --git a/packages/backend/src/core/ClipService.ts b/packages/backend/src/core/ClipService.ts
new file mode 100644
index 0000000000..3d9982e80f
--- /dev/null
+++ b/packages/backend/src/core/ClipService.ts
@@ -0,0 +1,159 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
+import { Inject, Injectable } from '@nestjs/common';
+import { QueryFailedError } from 'typeorm';
+import { DI } from '@/di-symbols.js';
+import type { ClipsRepository, MiNote, MiClip, ClipNotesRepository, NotesRepository } from '@/models/_.js';
+import { bindThis } from '@/decorators.js';
+import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error.js';
+import { RoleService } from '@/core/RoleService.js';
+import { IdService } from '@/core/IdService.js';
+import type { MiLocalUser } from '@/models/User.js';
+
+@Injectable()
+export class ClipService {
+ public static NoSuchNoteError = class extends Error {};
+ public static NoSuchClipError = class extends Error {};
+ public static AlreadyAddedError = class extends Error {};
+ public static TooManyClipNotesError = class extends Error {};
+ public static TooManyClipsError = class extends Error {};
+
+ constructor(
+ @Inject(DI.clipsRepository)
+ private clipsRepository: ClipsRepository,
+
+ @Inject(DI.clipNotesRepository)
+ private clipNotesRepository: ClipNotesRepository,
+
+ @Inject(DI.notesRepository)
+ private notesRepository: NotesRepository,
+
+ private roleService: RoleService,
+ private idService: IdService,
+ ) {
+ }
+
+ @bindThis
+ public async create(me: MiLocalUser, name: string, isPublic: boolean, description: string | null): Promise {
+ const currentCount = await this.clipsRepository.countBy({
+ userId: me.id,
+ });
+ if (currentCount > (await this.roleService.getUserPolicies(me.id)).clipLimit) {
+ throw new ClipService.TooManyClipsError();
+ }
+
+ const clip = await this.clipsRepository.insert({
+ id: this.idService.genId(),
+ createdAt: new Date(),
+ userId: me.id,
+ name: name,
+ isPublic: isPublic,
+ description: description,
+ }).then(x => this.clipsRepository.findOneByOrFail(x.identifiers[0]));
+
+ return clip;
+ }
+
+ @bindThis
+ public async update(me: MiLocalUser, clipId: MiClip['id'], name: string | undefined, isPublic: boolean | undefined, description: string | null | undefined): Promise {
+ const clip = await this.clipsRepository.findOneBy({
+ id: clipId,
+ userId: me.id,
+ });
+
+ if (clip == null) {
+ throw new ClipService.NoSuchClipError();
+ }
+
+ await this.clipsRepository.update(clip.id, {
+ name: name,
+ description: description,
+ isPublic: isPublic,
+ });
+ }
+
+ @bindThis
+ public async delete(me: MiLocalUser, clipId: MiClip['id']): Promise {
+ const clip = await this.clipsRepository.findOneBy({
+ id: clipId,
+ userId: me.id,
+ });
+
+ if (clip == null) {
+ throw new ClipService.NoSuchClipError();
+ }
+
+ await this.clipsRepository.delete(clip.id);
+ }
+
+ @bindThis
+ public async addNote(me: MiLocalUser, clipId: MiClip['id'], noteId: MiNote['id']): Promise {
+ const clip = await this.clipsRepository.findOneBy({
+ id: clipId,
+ userId: me.id,
+ });
+
+ if (clip == null) {
+ throw new ClipService.NoSuchClipError();
+ }
+
+ const currentCount = await this.clipNotesRepository.countBy({
+ clipId: clip.id,
+ });
+ if (currentCount > (await this.roleService.getUserPolicies(me.id)).noteEachClipsLimit) {
+ throw new ClipService.TooManyClipNotesError();
+ }
+
+ try {
+ await this.clipNotesRepository.insert({
+ id: this.idService.genId(),
+ noteId: noteId,
+ clipId: clip.id,
+ });
+ } catch (e: unknown) {
+ if (e instanceof QueryFailedError) {
+ if (isDuplicateKeyValueError(e)) {
+ throw new ClipService.AlreadyAddedError();
+ } else if (e.driverError.detail.includes('is not present in table "note".')) {
+ throw new ClipService.NoSuchNoteError();
+ }
+ }
+
+ throw e;
+ }
+
+ this.clipsRepository.update(clip.id, {
+ lastClippedAt: new Date(),
+ });
+
+ this.notesRepository.increment({ id: noteId }, 'clippedCount', 1);
+ }
+
+ @bindThis
+ public async removeNote(me: MiLocalUser, clipId: MiClip['id'], noteId: MiNote['id']): Promise {
+ const clip = await this.clipsRepository.findOneBy({
+ id: clipId,
+ userId: me.id,
+ });
+
+ if (clip == null) {
+ throw new ClipService.NoSuchClipError();
+ }
+
+ const note = await this.notesRepository.findOneBy({ id: noteId });
+
+ if (note == null) {
+ throw new ClipService.NoSuchNoteError();
+ }
+
+ await this.clipNotesRepository.delete({
+ noteId: noteId,
+ clipId: clip.id,
+ });
+
+ this.notesRepository.decrement({ id: noteId }, 'clippedCount', 1);
+ }
+}
diff --git a/packages/backend/src/core/CoreModule.ts b/packages/backend/src/core/CoreModule.ts
index 863f1a2fd5..18271ee346 100644
--- a/packages/backend/src/core/CoreModule.ts
+++ b/packages/backend/src/core/CoreModule.ts
@@ -57,6 +57,7 @@ import { ProxyAccountService } from './ProxyAccountService.js';
import { UtilityService } from './UtilityService.js';
import { FileInfoService } from './FileInfoService.js';
import { SearchService } from './SearchService.js';
+import { ClipService } from './ClipService.js';
import { ChartLoggerService } from './chart/ChartLoggerService.js';
import FederationChart from './chart/charts/federation.js';
import NotesChart from './chart/charts/notes.js';
@@ -181,6 +182,7 @@ const $WebhookService: Provider = { provide: 'WebhookService', useExisting: Webh
const $UtilityService: Provider = { provide: 'UtilityService', useExisting: UtilityService };
const $FileInfoService: Provider = { provide: 'FileInfoService', useExisting: FileInfoService };
const $SearchService: Provider = { provide: 'SearchService', useExisting: SearchService };
+const $ClipService: Provider = { provide: 'ClipService', useExisting: ClipService };
const $ChartLoggerService: Provider = { provide: 'ChartLoggerService', useExisting: ChartLoggerService };
const $FederationChart: Provider = { provide: 'FederationChart', useExisting: FederationChart };
@@ -309,6 +311,7 @@ const $ApQuestionService: Provider = { provide: 'ApQuestionService', useExisting
UtilityService,
FileInfoService,
SearchService,
+ ClipService,
ChartLoggerService,
FederationChart,
NotesChart,
@@ -430,6 +433,7 @@ const $ApQuestionService: Provider = { provide: 'ApQuestionService', useExisting
$UtilityService,
$FileInfoService,
$SearchService,
+ $ClipService,
$ChartLoggerService,
$FederationChart,
$NotesChart,
@@ -552,6 +556,7 @@ const $ApQuestionService: Provider = { provide: 'ApQuestionService', useExisting
UtilityService,
FileInfoService,
SearchService,
+ ClipService,
FederationChart,
NotesChart,
UsersChart,
@@ -672,6 +677,7 @@ const $ApQuestionService: Provider = { provide: 'ApQuestionService', useExisting
$UtilityService,
$FileInfoService,
$SearchService,
+ $ClipService,
$FederationChart,
$NotesChart,
$UsersChart,
diff --git a/packages/backend/src/core/CreateSystemUserService.ts b/packages/backend/src/core/CreateSystemUserService.ts
index 7f57128bae..3419d0b497 100644
--- a/packages/backend/src/core/CreateSystemUserService.ts
+++ b/packages/backend/src/core/CreateSystemUserService.ts
@@ -8,11 +8,11 @@ import { Inject, Injectable } from '@nestjs/common';
import bcrypt from 'bcryptjs';
import { IsNull, DataSource } from 'typeorm';
import { genRsaKeyPair } from '@/misc/gen-key-pair.js';
-import { MiUser } from '@/models/entities/User.js';
-import { MiUserProfile } from '@/models/entities/UserProfile.js';
+import { MiUser } from '@/models/User.js';
+import { MiUserProfile } from '@/models/UserProfile.js';
import { IdService } from '@/core/IdService.js';
-import { MiUserKeypair } from '@/models/entities/UserKeypair.js';
-import { MiUsedUsername } from '@/models/entities/UsedUsername.js';
+import { MiUserKeypair } from '@/models/UserKeypair.js';
+import { MiUsedUsername } from '@/models/UsedUsername.js';
import { DI } from '@/di-symbols.js';
import generateNativeUserToken from '@/misc/generate-native-user-token.js';
import { bindThis } from '@/decorators.js';
diff --git a/packages/backend/src/core/CustomEmojiService.ts b/packages/backend/src/core/CustomEmojiService.ts
index df5368272a..aa5490eba7 100644
--- a/packages/backend/src/core/CustomEmojiService.ts
+++ b/packages/backend/src/core/CustomEmojiService.ts
@@ -10,8 +10,8 @@ import { DI } from '@/di-symbols.js';
import { IdService } from '@/core/IdService.js';
import { EmojiEntityService } from '@/core/entities/EmojiEntityService.js';
import { GlobalEventService } from '@/core/GlobalEventService.js';
-import type { MiDriveFile } from '@/models/entities/DriveFile.js';
-import type { MiEmoji } from '@/models/entities/Emoji.js';
+import type { MiDriveFile } from '@/models/DriveFile.js';
+import type { MiEmoji } from '@/models/Emoji.js';
import type { EmojisRepository, MiRole } from '@/models/_.js';
import { bindThis } from '@/decorators.js';
import { MemoryKVCache, RedisSingleCache } from '@/misc/cache.js';
diff --git a/packages/backend/src/core/DriveService.ts b/packages/backend/src/core/DriveService.ts
index cdd3f78ca3..e015d3dc41 100644
--- a/packages/backend/src/core/DriveService.ts
+++ b/packages/backend/src/core/DriveService.ts
@@ -14,9 +14,9 @@ import { DI } from '@/di-symbols.js';
import type { DriveFilesRepository, UsersRepository, DriveFoldersRepository, UserProfilesRepository } from '@/models/_.js';
import type { Config } from '@/config.js';
import Logger from '@/logger.js';
-import type { MiRemoteUser, MiUser } from '@/models/entities/User.js';
+import type { MiRemoteUser, MiUser } from '@/models/User.js';
import { MetaService } from '@/core/MetaService.js';
-import { MiDriveFile } from '@/models/entities/DriveFile.js';
+import { MiDriveFile } from '@/models/DriveFile.js';
import { IdService } from '@/core/IdService.js';
import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error.js';
import { FILE_TYPE_BROWSERSAFE } from '@/const.js';
@@ -27,7 +27,7 @@ import { VideoProcessingService } from '@/core/VideoProcessingService.js';
import { ImageProcessingService } from '@/core/ImageProcessingService.js';
import type { IImage } from '@/core/ImageProcessingService.js';
import { QueueService } from '@/core/QueueService.js';
-import type { MiDriveFolder } from '@/models/entities/DriveFolder.js';
+import type { MiDriveFolder } from '@/models/DriveFolder.js';
import { createTemp } from '@/misc/create-temp.js';
import DriveChart from '@/core/chart/charts/drive.js';
import PerUserDriveChart from '@/core/chart/charts/per-user-drive.js';
diff --git a/packages/backend/src/core/FederatedInstanceService.ts b/packages/backend/src/core/FederatedInstanceService.ts
index ce75f48007..61806583c6 100644
--- a/packages/backend/src/core/FederatedInstanceService.ts
+++ b/packages/backend/src/core/FederatedInstanceService.ts
@@ -6,7 +6,7 @@
import { Inject, Injectable, OnApplicationShutdown } from '@nestjs/common';
import * as Redis from 'ioredis';
import type { InstancesRepository } from '@/models/_.js';
-import type { MiInstance } from '@/models/entities/Instance.js';
+import type { MiInstance } from '@/models/Instance.js';
import { MemoryKVCache, RedisKVCache } from '@/misc/cache.js';
import { IdService } from '@/core/IdService.js';
import { DI } from '@/di-symbols.js';
diff --git a/packages/backend/src/core/FetchInstanceMetadataService.ts b/packages/backend/src/core/FetchInstanceMetadataService.ts
index 4563006f68..682acef15b 100644
--- a/packages/backend/src/core/FetchInstanceMetadataService.ts
+++ b/packages/backend/src/core/FetchInstanceMetadataService.ts
@@ -8,7 +8,7 @@ import { Inject, Injectable } from '@nestjs/common';
import { JSDOM } from 'jsdom';
import tinycolor from 'tinycolor2';
import * as Redis from 'ioredis';
-import type { MiInstance } from '@/models/entities/Instance.js';
+import type { MiInstance } from '@/models/Instance.js';
import type Logger from '@/logger.js';
import { DI } from '@/di-symbols.js';
import { LoggerService } from '@/core/LoggerService.js';
diff --git a/packages/backend/src/core/GlobalEventService.ts b/packages/backend/src/core/GlobalEventService.ts
index 7c811b7ae9..4bc4f54c21 100644
--- a/packages/backend/src/core/GlobalEventService.ts
+++ b/packages/backend/src/core/GlobalEventService.ts
@@ -5,10 +5,10 @@
import { Inject, Injectable } from '@nestjs/common';
import * as Redis from 'ioredis';
-import type { MiUser } from '@/models/entities/User.js';
-import type { MiNote } from '@/models/entities/Note.js';
-import type { MiUserList } from '@/models/entities/UserList.js';
-import type { MiAntenna } from '@/models/entities/Antenna.js';
+import type { MiUser } from '@/models/User.js';
+import type { MiNote } from '@/models/Note.js';
+import type { MiUserList } from '@/models/UserList.js';
+import type { MiAntenna } from '@/models/Antenna.js';
import type {
StreamChannels,
AdminStreamTypes,
diff --git a/packages/backend/src/core/HashtagService.ts b/packages/backend/src/core/HashtagService.ts
index 4e8763935a..c72c7460ff 100644
--- a/packages/backend/src/core/HashtagService.ts
+++ b/packages/backend/src/core/HashtagService.ts
@@ -5,10 +5,10 @@
import { Inject, Injectable } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
-import type { MiUser } from '@/models/entities/User.js';
+import type { MiUser } from '@/models/User.js';
import { normalizeForSearch } from '@/misc/normalize-for-search.js';
import { IdService } from '@/core/IdService.js';
-import type { MiHashtag } from '@/models/entities/Hashtag.js';
+import type { MiHashtag } from '@/models/Hashtag.js';
import type { HashtagsRepository } from '@/models/_.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { bindThis } from '@/decorators.js';
diff --git a/packages/backend/src/core/InstanceActorService.ts b/packages/backend/src/core/InstanceActorService.ts
index 3f237f14e4..b40fd46291 100644
--- a/packages/backend/src/core/InstanceActorService.ts
+++ b/packages/backend/src/core/InstanceActorService.ts
@@ -5,7 +5,7 @@
import { Inject, Injectable } from '@nestjs/common';
import { IsNull } from 'typeorm';
-import type { MiLocalUser } from '@/models/entities/User.js';
+import type { MiLocalUser } from '@/models/User.js';
import type { UsersRepository } from '@/models/_.js';
import { MemorySingleCache } from '@/misc/cache.js';
import { DI } from '@/di-symbols.js';
diff --git a/packages/backend/src/core/MetaService.ts b/packages/backend/src/core/MetaService.ts
index 42ce4de432..00e1e3c1fc 100644
--- a/packages/backend/src/core/MetaService.ts
+++ b/packages/backend/src/core/MetaService.ts
@@ -7,7 +7,7 @@ import { Inject, Injectable } from '@nestjs/common';
import { DataSource } from 'typeorm';
import * as Redis from 'ioredis';
import { DI } from '@/di-symbols.js';
-import { MiMeta } from '@/models/entities/Meta.js';
+import { MiMeta } from '@/models/Meta.js';
import { GlobalEventService } from '@/core/GlobalEventService.js';
import { bindThis } from '@/decorators.js';
import { StreamMessages } from '@/server/api/stream/types.js';
diff --git a/packages/backend/src/core/MfmService.ts b/packages/backend/src/core/MfmService.ts
index b6f84da475..b275d1b142 100644
--- a/packages/backend/src/core/MfmService.ts
+++ b/packages/backend/src/core/MfmService.ts
@@ -10,7 +10,7 @@ import { Window } from 'happy-dom';
import { DI } from '@/di-symbols.js';
import type { Config } from '@/config.js';
import { intersperse } from '@/misc/prelude/array.js';
-import type { IMentionedRemoteUsers } from '@/models/entities/Note.js';
+import type { IMentionedRemoteUsers } from '@/models/Note.js';
import { bindThis } from '@/decorators.js';
import * as TreeAdapter from '../../node_modules/parse5/dist/tree-adapters/default.js';
import type * as mfm from 'mfm-js';
diff --git a/packages/backend/src/core/ModerationLogService.ts b/packages/backend/src/core/ModerationLogService.ts
index 4ec88041b8..b0e5b794d0 100644
--- a/packages/backend/src/core/ModerationLogService.ts
+++ b/packages/backend/src/core/ModerationLogService.ts
@@ -6,7 +6,7 @@
import { Inject, Injectable } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import type { ModerationLogsRepository } from '@/models/_.js';
-import type { MiUser } from '@/models/entities/User.js';
+import type { MiUser } from '@/models/User.js';
import { IdService } from '@/core/IdService.js';
import { bindThis } from '@/decorators.js';
diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts
index dbba602d0d..4b0d818862 100644
--- a/packages/backend/src/core/NoteCreateService.ts
+++ b/packages/backend/src/core/NoteCreateService.ts
@@ -12,22 +12,22 @@ import RE2 from 're2';
import { extractMentions } from '@/misc/extract-mentions.js';
import { extractCustomEmojisFromMfm } from '@/misc/extract-custom-emojis-from-mfm.js';
import { extractHashtags } from '@/misc/extract-hashtags.js';
-import type { IMentionedRemoteUsers } from '@/models/entities/Note.js';
-import { MiNote } from '@/models/entities/Note.js';
+import type { IMentionedRemoteUsers } from '@/models/Note.js';
+import { MiNote } from '@/models/Note.js';
import type { ChannelsRepository, InstancesRepository, MutedNotesRepository, MutingsRepository, NotesRepository, NoteThreadMutingsRepository, UserProfilesRepository, UsersRepository } from '@/models/_.js';
-import type { MiDriveFile } from '@/models/entities/DriveFile.js';
-import type { MiApp } from '@/models/entities/App.js';
+import type { MiDriveFile } from '@/models/DriveFile.js';
+import type { MiApp } from '@/models/App.js';
import { concat } from '@/misc/prelude/array.js';
import { IdService } from '@/core/IdService.js';
-import type { MiUser, MiLocalUser, MiRemoteUser } from '@/models/entities/User.js';
-import type { IPoll } from '@/models/entities/Poll.js';
-import { MiPoll } from '@/models/entities/Poll.js';
+import type { MiUser, MiLocalUser, MiRemoteUser } from '@/models/User.js';
+import type { IPoll } from '@/models/Poll.js';
+import { MiPoll } from '@/models/Poll.js';
import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error.js';
import { checkWordMute } from '@/misc/check-word-mute.js';
-import type { MiChannel } from '@/models/entities/Channel.js';
+import type { MiChannel } from '@/models/Channel.js';
import { normalizeForSearch } from '@/misc/normalize-for-search.js';
import { MemorySingleCache } from '@/misc/cache.js';
-import type { MiUserProfile } from '@/models/entities/UserProfile.js';
+import type { MiUserProfile } from '@/models/UserProfile.js';
import { RelayService } from '@/core/RelayService.js';
import { FederatedInstanceService } from '@/core/FederatedInstanceService.js';
import { DI } from '@/di-symbols.js';
diff --git a/packages/backend/src/core/NoteDeleteService.ts b/packages/backend/src/core/NoteDeleteService.ts
index 2b51aa76f8..69fff36a02 100644
--- a/packages/backend/src/core/NoteDeleteService.ts
+++ b/packages/backend/src/core/NoteDeleteService.ts
@@ -5,8 +5,8 @@
import { Brackets, In } from 'typeorm';
import { Injectable, Inject } from '@nestjs/common';
-import type { MiUser, MiLocalUser, MiRemoteUser } from '@/models/entities/User.js';
-import type { MiNote, IMentionedRemoteUsers } from '@/models/entities/Note.js';
+import type { MiUser, MiLocalUser, MiRemoteUser } from '@/models/User.js';
+import type { MiNote, IMentionedRemoteUsers } from '@/models/Note.js';
import type { InstancesRepository, NotesRepository, UsersRepository } from '@/models/_.js';
import { RelayService } from '@/core/RelayService.js';
import { FederatedInstanceService } from '@/core/FederatedInstanceService.js';
diff --git a/packages/backend/src/core/NotePiningService.ts b/packages/backend/src/core/NotePiningService.ts
index a7646e9968..147554ee9a 100644
--- a/packages/backend/src/core/NotePiningService.ts
+++ b/packages/backend/src/core/NotePiningService.ts
@@ -7,10 +7,10 @@ import { Inject, Injectable } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import type { NotesRepository, UserNotePiningsRepository, UsersRepository } from '@/models/_.js';
import { IdentifiableError } from '@/misc/identifiable-error.js';
-import type { MiUser } from '@/models/entities/User.js';
-import type { MiNote } from '@/models/entities/Note.js';
+import type { MiUser } from '@/models/User.js';
+import type { MiNote } from '@/models/Note.js';
import { IdService } from '@/core/IdService.js';
-import type { MiUserNotePining } from '@/models/entities/UserNotePining.js';
+import type { MiUserNotePining } from '@/models/UserNotePining.js';
import { RelayService } from '@/core/RelayService.js';
import type { Config } from '@/config.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
diff --git a/packages/backend/src/core/NoteReadService.ts b/packages/backend/src/core/NoteReadService.ts
index f99aa20970..422e0192cf 100644
--- a/packages/backend/src/core/NoteReadService.ts
+++ b/packages/backend/src/core/NoteReadService.ts
@@ -7,9 +7,9 @@ import { setTimeout } from 'node:timers/promises';
import { Inject, Injectable, OnApplicationShutdown } from '@nestjs/common';
import { In } from 'typeorm';
import { DI } from '@/di-symbols.js';
-import type { MiUser } from '@/models/entities/User.js';
+import type { MiUser } from '@/models/User.js';
import type { Packed } from '@/misc/json-schema.js';
-import type { MiNote } from '@/models/entities/Note.js';
+import type { MiNote } from '@/models/Note.js';
import { IdService } from '@/core/IdService.js';
import { GlobalEventService } from '@/core/GlobalEventService.js';
import type { NoteUnreadsRepository, MutingsRepository, NoteThreadMutingsRepository } from '@/models/_.js';
diff --git a/packages/backend/src/core/NotificationService.ts b/packages/backend/src/core/NotificationService.ts
index d82ebe0092..258ae44f7d 100644
--- a/packages/backend/src/core/NotificationService.ts
+++ b/packages/backend/src/core/NotificationService.ts
@@ -9,8 +9,8 @@ import { Inject, Injectable, OnApplicationShutdown } from '@nestjs/common';
import { In } from 'typeorm';
import { DI } from '@/di-symbols.js';
import type { UsersRepository } from '@/models/_.js';
-import type { MiUser } from '@/models/entities/User.js';
-import type { MiNotification } from '@/models/entities/Notification.js';
+import type { MiUser } from '@/models/User.js';
+import type { MiNotification } from '@/models/Notification.js';
import { bindThis } from '@/decorators.js';
import { GlobalEventService } from '@/core/GlobalEventService.js';
import { PushNotificationService } from '@/core/PushNotificationService.js';
diff --git a/packages/backend/src/core/PollService.ts b/packages/backend/src/core/PollService.ts
index d5e9ab9723..940aa98347 100644
--- a/packages/backend/src/core/PollService.ts
+++ b/packages/backend/src/core/PollService.ts
@@ -6,7 +6,7 @@
import { Inject, Injectable } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import type { NotesRepository, UsersRepository, PollsRepository, PollVotesRepository, MiUser } from '@/models/_.js';
-import type { MiNote } from '@/models/entities/Note.js';
+import type { MiNote } from '@/models/Note.js';
import { RelayService } from '@/core/RelayService.js';
import { IdService } from '@/core/IdService.js';
import { GlobalEventService } from '@/core/GlobalEventService.js';
diff --git a/packages/backend/src/core/ProxyAccountService.ts b/packages/backend/src/core/ProxyAccountService.ts
index dfe546b54c..b1bc60701b 100644
--- a/packages/backend/src/core/ProxyAccountService.ts
+++ b/packages/backend/src/core/ProxyAccountService.ts
@@ -5,7 +5,7 @@
import { Inject, Injectable } from '@nestjs/common';
import type { UsersRepository } from '@/models/_.js';
-import type { MiLocalUser } from '@/models/entities/User.js';
+import type { MiLocalUser } from '@/models/User.js';
import { DI } from '@/di-symbols.js';
import { MetaService } from '@/core/MetaService.js';
import { bindThis } from '@/decorators.js';
diff --git a/packages/backend/src/core/QueryService.ts b/packages/backend/src/core/QueryService.ts
index c064732c7d..9145726f86 100644
--- a/packages/backend/src/core/QueryService.ts
+++ b/packages/backend/src/core/QueryService.ts
@@ -6,7 +6,7 @@
import { Inject, Injectable } from '@nestjs/common';
import { Brackets, ObjectLiteral } from 'typeorm';
import { DI } from '@/di-symbols.js';
-import type { MiUser } from '@/models/entities/User.js';
+import type { MiUser } from '@/models/User.js';
import type { UserProfilesRepository, FollowingsRepository, ChannelFollowingsRepository, MutedNotesRepository, BlockingsRepository, NoteThreadMutingsRepository, MutingsRepository, RenoteMutingsRepository } from '@/models/_.js';
import { bindThis } from '@/decorators.js';
import type { SelectQueryBuilder } from 'typeorm';
diff --git a/packages/backend/src/core/QueueService.ts b/packages/backend/src/core/QueueService.ts
index 310d5e5d9c..d8c7250034 100644
--- a/packages/backend/src/core/QueueService.ts
+++ b/packages/backend/src/core/QueueService.ts
@@ -6,8 +6,8 @@
import { randomUUID } from 'node:crypto';
import { Inject, Injectable } from '@nestjs/common';
import type { IActivity } from '@/core/activitypub/type.js';
-import type { MiDriveFile } from '@/models/entities/DriveFile.js';
-import type { MiWebhook, webhookEventTypes } from '@/models/entities/Webhook.js';
+import type { MiDriveFile } from '@/models/DriveFile.js';
+import type { MiWebhook, webhookEventTypes } from '@/models/Webhook.js';
import type { Config } from '@/config.js';
import { DI } from '@/di-symbols.js';
import { bindThis } from '@/decorators.js';
diff --git a/packages/backend/src/core/ReactionService.ts b/packages/backend/src/core/ReactionService.ts
index 04c58b9773..d9bde502c8 100644
--- a/packages/backend/src/core/ReactionService.ts
+++ b/packages/backend/src/core/ReactionService.ts
@@ -7,10 +7,10 @@ import { Inject, Injectable } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import type { EmojisRepository, NoteReactionsRepository, UsersRepository, NotesRepository } from '@/models/_.js';
import { IdentifiableError } from '@/misc/identifiable-error.js';
-import type { MiRemoteUser, MiUser } from '@/models/entities/User.js';
-import type { MiNote } from '@/models/entities/Note.js';
+import type { MiRemoteUser, MiUser } from '@/models/User.js';
+import type { MiNote } from '@/models/Note.js';
import { IdService } from '@/core/IdService.js';
-import type { MiNoteReaction } from '@/models/entities/NoteReaction.js';
+import type { MiNoteReaction } from '@/models/NoteReaction.js';
import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error.js';
import { GlobalEventService } from '@/core/GlobalEventService.js';
import { NotificationService } from '@/core/NotificationService.js';
diff --git a/packages/backend/src/core/RelayService.ts b/packages/backend/src/core/RelayService.ts
index 12a477a3b9..7171bf84c5 100644
--- a/packages/backend/src/core/RelayService.ts
+++ b/packages/backend/src/core/RelayService.ts
@@ -5,11 +5,11 @@
import { Inject, Injectable } from '@nestjs/common';
import { IsNull } from 'typeorm';
-import type { MiLocalUser, MiUser } from '@/models/entities/User.js';
+import type { MiLocalUser, MiUser } from '@/models/User.js';
import type { RelaysRepository, UsersRepository } from '@/models/_.js';
import { IdService } from '@/core/IdService.js';
import { MemorySingleCache } from '@/misc/cache.js';
-import type { MiRelay } from '@/models/entities/Relay.js';
+import type { MiRelay } from '@/models/Relay.js';
import { QueueService } from '@/core/QueueService.js';
import { CreateSystemUserService } from '@/core/CreateSystemUserService.js';
import { ApRendererService } from '@/core/activitypub/ApRendererService.js';
diff --git a/packages/backend/src/core/RemoteUserResolveService.ts b/packages/backend/src/core/RemoteUserResolveService.ts
index 4d90c075b0..75c5f14aa4 100644
--- a/packages/backend/src/core/RemoteUserResolveService.ts
+++ b/packages/backend/src/core/RemoteUserResolveService.ts
@@ -9,7 +9,7 @@ import chalk from 'chalk';
import { IsNull } from 'typeorm';
import { DI } from '@/di-symbols.js';
import type { UsersRepository } from '@/models/_.js';
-import type { MiLocalUser, MiRemoteUser } from '@/models/entities/User.js';
+import type { MiLocalUser, MiRemoteUser } from '@/models/User.js';
import type { Config } from '@/config.js';
import type Logger from '@/logger.js';
import { UtilityService } from '@/core/UtilityService.js';
diff --git a/packages/backend/src/core/RoleService.ts b/packages/backend/src/core/RoleService.ts
index aeb2a7e64d..518f283695 100644
--- a/packages/backend/src/core/RoleService.ts
+++ b/packages/backend/src/core/RoleService.ts
@@ -8,12 +8,12 @@ import * as Redis from 'ioredis';
import { In } from 'typeorm';
import type { MiRole, MiRoleAssignment, RoleAssignmentsRepository, RolesRepository, UsersRepository } from '@/models/_.js';
import { MemoryKVCache, MemorySingleCache } from '@/misc/cache.js';
-import type { MiUser } from '@/models/entities/User.js';
+import type { MiUser } from '@/models/User.js';
import { DI } from '@/di-symbols.js';
import { bindThis } from '@/decorators.js';
import { MetaService } from '@/core/MetaService.js';
import { CacheService } from '@/core/CacheService.js';
-import type { RoleCondFormulaValue } from '@/models/entities/Role.js';
+import type { RoleCondFormulaValue } from '@/models/Role.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { StreamMessages } from '@/server/api/stream/types.js';
import { IdService } from '@/core/IdService.js';
diff --git a/packages/backend/src/core/S3Service.ts b/packages/backend/src/core/S3Service.ts
index 4cd81b1b71..df0991539d 100644
--- a/packages/backend/src/core/S3Service.ts
+++ b/packages/backend/src/core/S3Service.ts
@@ -10,7 +10,7 @@ import { Injectable } from '@nestjs/common';
import { DeleteObjectCommand, S3Client } from '@aws-sdk/client-s3';
import { Upload } from '@aws-sdk/lib-storage';
import { NodeHttpHandler, NodeHttpHandlerOptions } from '@smithy/node-http-handler';
-import type { MiMeta } from '@/models/entities/Meta.js';
+import type { MiMeta } from '@/models/Meta.js';
import { HttpRequestService } from '@/core/HttpRequestService.js';
import { bindThis } from '@/decorators.js';
import type { DeleteObjectCommandInput, PutObjectCommandInput } from '@aws-sdk/client-s3';
diff --git a/packages/backend/src/core/SearchService.ts b/packages/backend/src/core/SearchService.ts
index 39b6a708c4..3ef321dd32 100644
--- a/packages/backend/src/core/SearchService.ts
+++ b/packages/backend/src/core/SearchService.ts
@@ -8,7 +8,7 @@ import { In } from 'typeorm';
import { DI } from '@/di-symbols.js';
import type { Config } from '@/config.js';
import { bindThis } from '@/decorators.js';
-import { MiNote } from '@/models/entities/Note.js';
+import { MiNote } from '@/models/Note.js';
import { MiUser } from '@/models/_.js';
import type { NotesRepository } from '@/models/_.js';
import { sqlLikeEscape } from '@/misc/sql-like-escape.js';
diff --git a/packages/backend/src/core/SignupService.ts b/packages/backend/src/core/SignupService.ts
index 467b93677b..dfec0cfcfe 100644
--- a/packages/backend/src/core/SignupService.ts
+++ b/packages/backend/src/core/SignupService.ts
@@ -9,11 +9,11 @@ import bcrypt from 'bcryptjs';
import { DataSource, IsNull } from 'typeorm';
import { DI } from '@/di-symbols.js';
import type { UsedUsernamesRepository, UsersRepository } from '@/models/_.js';
-import { MiUser } from '@/models/entities/User.js';
-import { MiUserProfile } from '@/models/entities/UserProfile.js';
+import { MiUser } from '@/models/User.js';
+import { MiUserProfile } from '@/models/UserProfile.js';
import { IdService } from '@/core/IdService.js';
-import { MiUserKeypair } from '@/models/entities/UserKeypair.js';
-import { MiUsedUsername } from '@/models/entities/UsedUsername.js';
+import { MiUserKeypair } from '@/models/UserKeypair.js';
+import { MiUsedUsername } from '@/models/UsedUsername.js';
import generateUserToken from '@/misc/generate-native-user-token.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { bindThis } from '@/decorators.js';
diff --git a/packages/backend/src/core/UserBlockingService.ts b/packages/backend/src/core/UserBlockingService.ts
index 2d329a719e..37031e341e 100644
--- a/packages/backend/src/core/UserBlockingService.ts
+++ b/packages/backend/src/core/UserBlockingService.ts
@@ -6,8 +6,8 @@
import { Inject, Injectable, OnModuleInit } from '@nestjs/common';
import { ModuleRef } from '@nestjs/core';
import { IdService } from '@/core/IdService.js';
-import type { MiUser } from '@/models/entities/User.js';
-import type { MiBlocking } from '@/models/entities/Blocking.js';
+import type { MiUser } from '@/models/User.js';
+import type { MiBlocking } from '@/models/Blocking.js';
import { QueueService } from '@/core/QueueService.js';
import { GlobalEventService } from '@/core/GlobalEventService.js';
import { DI } from '@/di-symbols.js';
diff --git a/packages/backend/src/core/UserFollowingService.ts b/packages/backend/src/core/UserFollowingService.ts
index 3b96eb480a..5b2b0205d9 100644
--- a/packages/backend/src/core/UserFollowingService.ts
+++ b/packages/backend/src/core/UserFollowingService.ts
@@ -6,7 +6,7 @@
import { Inject, Injectable, OnModuleInit, forwardRef } from '@nestjs/common';
import { ModuleRef } from '@nestjs/core';
import { IsNull } from 'typeorm';
-import type { MiLocalUser, MiPartialLocalUser, MiPartialRemoteUser, MiRemoteUser, MiUser } from '@/models/entities/User.js';
+import type { MiLocalUser, MiPartialLocalUser, MiPartialRemoteUser, MiRemoteUser, MiUser } from '@/models/User.js';
import { IdentifiableError } from '@/misc/identifiable-error.js';
import { QueueService } from '@/core/QueueService.js';
import PerUserFollowingChart from '@/core/chart/charts/per-user-following.js';
diff --git a/packages/backend/src/core/UserKeypairService.ts b/packages/backend/src/core/UserKeypairService.ts
index 31555ba224..425a97f3f1 100644
--- a/packages/backend/src/core/UserKeypairService.ts
+++ b/packages/backend/src/core/UserKeypairService.ts
@@ -5,10 +5,10 @@
import { Inject, Injectable, OnApplicationShutdown } from '@nestjs/common';
import * as Redis from 'ioredis';
-import type { MiUser } from '@/models/entities/User.js';
+import type { MiUser } from '@/models/User.js';
import type { UserKeypairsRepository } from '@/models/_.js';
import { RedisKVCache } from '@/misc/cache.js';
-import type { MiUserKeypair } from '@/models/entities/UserKeypair.js';
+import type { MiUserKeypair } from '@/models/UserKeypair.js';
import { DI } from '@/di-symbols.js';
import { bindThis } from '@/decorators.js';
diff --git a/packages/backend/src/core/UserListService.ts b/packages/backend/src/core/UserListService.ts
index 8b1985c95d..a71d50bba5 100644
--- a/packages/backend/src/core/UserListService.ts
+++ b/packages/backend/src/core/UserListService.ts
@@ -5,9 +5,9 @@
import { Inject, Injectable } from '@nestjs/common';
import type { UserListJoiningsRepository } from '@/models/_.js';
-import type { MiUser } from '@/models/entities/User.js';
-import type { MiUserList } from '@/models/entities/UserList.js';
-import type { MiUserListJoining } from '@/models/entities/UserListJoining.js';
+import type { MiUser } from '@/models/User.js';
+import type { MiUserList } from '@/models/UserList.js';
+import type { MiUserListJoining } from '@/models/UserListJoining.js';
import { IdService } from '@/core/IdService.js';
import { GlobalEventService } from '@/core/GlobalEventService.js';
import { DI } from '@/di-symbols.js';
diff --git a/packages/backend/src/core/UserMutingService.ts b/packages/backend/src/core/UserMutingService.ts
index 52346ffe15..2387c9d648 100644
--- a/packages/backend/src/core/UserMutingService.ts
+++ b/packages/backend/src/core/UserMutingService.ts
@@ -7,7 +7,7 @@ import { Inject, Injectable } from '@nestjs/common';
import { In } from 'typeorm';
import type { MutingsRepository, MiMuting } from '@/models/_.js';
import { IdService } from '@/core/IdService.js';
-import type { MiUser } from '@/models/entities/User.js';
+import type { MiUser } from '@/models/User.js';
import { DI } from '@/di-symbols.js';
import { bindThis } from '@/decorators.js';
import { CacheService } from '@/core/CacheService.js';
diff --git a/packages/backend/src/core/UserSuspendService.ts b/packages/backend/src/core/UserSuspendService.ts
index 914a1d7dfb..8940a142d1 100644
--- a/packages/backend/src/core/UserSuspendService.ts
+++ b/packages/backend/src/core/UserSuspendService.ts
@@ -6,7 +6,7 @@
import { Inject, Injectable } from '@nestjs/common';
import { Not, IsNull } from 'typeorm';
import type { FollowingsRepository } from '@/models/_.js';
-import type { MiUser } from '@/models/entities/User.js';
+import type { MiUser } from '@/models/User.js';
import { QueueService } from '@/core/QueueService.js';
import { GlobalEventService } from '@/core/GlobalEventService.js';
import { DI } from '@/di-symbols.js';
diff --git a/packages/backend/src/core/WebhookService.ts b/packages/backend/src/core/WebhookService.ts
index c673562aa8..1344f0ac97 100644
--- a/packages/backend/src/core/WebhookService.ts
+++ b/packages/backend/src/core/WebhookService.ts
@@ -6,7 +6,7 @@
import { Inject, Injectable } from '@nestjs/common';
import * as Redis from 'ioredis';
import type { WebhooksRepository } from '@/models/_.js';
-import type { MiWebhook } from '@/models/entities/Webhook.js';
+import type { MiWebhook } from '@/models/Webhook.js';
import { DI } from '@/di-symbols.js';
import { bindThis } from '@/decorators.js';
import { StreamMessages } from '@/server/api/stream/types.js';
diff --git a/packages/backend/src/core/activitypub/ApAudienceService.ts b/packages/backend/src/core/activitypub/ApAudienceService.ts
index f3432f8334..440852bdf3 100644
--- a/packages/backend/src/core/activitypub/ApAudienceService.ts
+++ b/packages/backend/src/core/activitypub/ApAudienceService.ts
@@ -5,7 +5,7 @@
import { Injectable } from '@nestjs/common';
import promiseLimit from 'promise-limit';
-import type { MiRemoteUser, MiUser } from '@/models/entities/User.js';
+import type { MiRemoteUser, MiUser } from '@/models/User.js';
import { concat, unique } from '@/misc/prelude/array.js';
import { bindThis } from '@/decorators.js';
import { getApIds } from './type.js';
diff --git a/packages/backend/src/core/activitypub/ApDbResolverService.ts b/packages/backend/src/core/activitypub/ApDbResolverService.ts
index 711cfbe5d8..995c5dcd5f 100644
--- a/packages/backend/src/core/activitypub/ApDbResolverService.ts
+++ b/packages/backend/src/core/activitypub/ApDbResolverService.ts
@@ -8,11 +8,11 @@ import { DI } from '@/di-symbols.js';
import type { NotesRepository, UserPublickeysRepository, UsersRepository } from '@/models/_.js';
import type { Config } from '@/config.js';
import { MemoryKVCache } from '@/misc/cache.js';
-import type { MiUserPublickey } from '@/models/entities/UserPublickey.js';
+import type { MiUserPublickey } from '@/models/UserPublickey.js';
import { CacheService } from '@/core/CacheService.js';
-import type { MiNote } from '@/models/entities/Note.js';
+import type { MiNote } from '@/models/Note.js';
import { bindThis } from '@/decorators.js';
-import { MiLocalUser, MiRemoteUser } from '@/models/entities/User.js';
+import { MiLocalUser, MiRemoteUser } from '@/models/User.js';
import { getApId } from './type.js';
import { ApPersonService } from './models/ApPersonService.js';
import type { IObject } from './type.js';
diff --git a/packages/backend/src/core/activitypub/ApDeliverManagerService.ts b/packages/backend/src/core/activitypub/ApDeliverManagerService.ts
index 4557a9114a..81003bcf1c 100644
--- a/packages/backend/src/core/activitypub/ApDeliverManagerService.ts
+++ b/packages/backend/src/core/activitypub/ApDeliverManagerService.ts
@@ -7,7 +7,7 @@ import { Inject, Injectable } from '@nestjs/common';
import { IsNull, Not } from 'typeorm';
import { DI } from '@/di-symbols.js';
import type { FollowingsRepository } from '@/models/_.js';
-import type { MiLocalUser, MiRemoteUser, MiUser } from '@/models/entities/User.js';
+import type { MiLocalUser, MiRemoteUser, MiUser } from '@/models/User.js';
import { QueueService } from '@/core/QueueService.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { bindThis } from '@/decorators.js';
diff --git a/packages/backend/src/core/activitypub/ApInboxService.ts b/packages/backend/src/core/activitypub/ApInboxService.ts
index c47c72fda2..b921ee7454 100644
--- a/packages/backend/src/core/activitypub/ApInboxService.ts
+++ b/packages/backend/src/core/activitypub/ApInboxService.ts
@@ -26,7 +26,7 @@ import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { QueueService } from '@/core/QueueService.js';
import type { UsersRepository, NotesRepository, FollowingsRepository, AbuseUserReportsRepository, FollowRequestsRepository } from '@/models/_.js';
import { bindThis } from '@/decorators.js';
-import type { MiRemoteUser } from '@/models/entities/User.js';
+import type { MiRemoteUser } from '@/models/User.js';
import { getApHrefNullable, getApId, getApIds, getApType, isAccept, isActor, isAdd, isAnnounce, isBlock, isCollection, isCollectionOrOrderedCollection, isCreate, isDelete, isFlag, isFollow, isLike, isMove, isPost, isReject, isRemove, isTombstone, isUndo, isUpdate, validActor, validPost } from './type.js';
import { ApNoteService } from './models/ApNoteService.js';
import { ApLoggerService } from './ApLoggerService.js';
diff --git a/packages/backend/src/core/activitypub/ApMfmService.ts b/packages/backend/src/core/activitypub/ApMfmService.ts
index 5dd4b7f6df..60868627a2 100644
--- a/packages/backend/src/core/activitypub/ApMfmService.ts
+++ b/packages/backend/src/core/activitypub/ApMfmService.ts
@@ -6,7 +6,7 @@
import { Injectable } from '@nestjs/common';
import * as mfm from 'mfm-js';
import { MfmService } from '@/core/MfmService.js';
-import type { MiNote } from '@/models/entities/Note.js';
+import type { MiNote } from '@/models/Note.js';
import { bindThis } from '@/decorators.js';
import { extractApHashtagObjects } from './models/tag.js';
import type { IObject } from './type.js';
diff --git a/packages/backend/src/core/activitypub/ApRendererService.ts b/packages/backend/src/core/activitypub/ApRendererService.ts
index a2f174e235..7a9d2e21d8 100644
--- a/packages/backend/src/core/activitypub/ApRendererService.ts
+++ b/packages/backend/src/core/activitypub/ApRendererService.ts
@@ -9,20 +9,20 @@ import { In } from 'typeorm';
import * as mfm from 'mfm-js';
import { DI } from '@/di-symbols.js';
import type { Config } from '@/config.js';
-import type { MiPartialLocalUser, MiLocalUser, MiPartialRemoteUser, MiRemoteUser, MiUser } from '@/models/entities/User.js';
-import type { IMentionedRemoteUsers, MiNote } from '@/models/entities/Note.js';
-import type { MiBlocking } from '@/models/entities/Blocking.js';
-import type { MiRelay } from '@/models/entities/Relay.js';
-import type { MiDriveFile } from '@/models/entities/DriveFile.js';
-import type { MiNoteReaction } from '@/models/entities/NoteReaction.js';
-import type { MiEmoji } from '@/models/entities/Emoji.js';
-import type { MiPoll } from '@/models/entities/Poll.js';
-import type { MiPollVote } from '@/models/entities/PollVote.js';
+import type { MiPartialLocalUser, MiLocalUser, MiPartialRemoteUser, MiRemoteUser, MiUser } from '@/models/User.js';
+import type { IMentionedRemoteUsers, MiNote } from '@/models/Note.js';
+import type { MiBlocking } from '@/models/Blocking.js';
+import type { MiRelay } from '@/models/Relay.js';
+import type { MiDriveFile } from '@/models/DriveFile.js';
+import type { MiNoteReaction } from '@/models/NoteReaction.js';
+import type { MiEmoji } from '@/models/Emoji.js';
+import type { MiPoll } from '@/models/Poll.js';
+import type { MiPollVote } from '@/models/PollVote.js';
import { UserKeypairService } from '@/core/UserKeypairService.js';
import { MfmService } from '@/core/MfmService.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { DriveFileEntityService } from '@/core/entities/DriveFileEntityService.js';
-import type { MiUserKeypair } from '@/models/entities/UserKeypair.js';
+import type { MiUserKeypair } from '@/models/UserKeypair.js';
import type { UsersRepository, UserProfilesRepository, NotesRepository, DriveFilesRepository, PollsRepository } from '@/models/_.js';
import { bindThis } from '@/decorators.js';
import { CustomEmojiService } from '@/core/CustomEmojiService.js';
diff --git a/packages/backend/src/core/activitypub/ApRequestService.ts b/packages/backend/src/core/activitypub/ApRequestService.ts
index fb44a55de2..b59ce5241f 100644
--- a/packages/backend/src/core/activitypub/ApRequestService.ts
+++ b/packages/backend/src/core/activitypub/ApRequestService.ts
@@ -8,7 +8,7 @@ import { URL } from 'node:url';
import { Inject, Injectable } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import type { Config } from '@/config.js';
-import type { MiUser } from '@/models/entities/User.js';
+import type { MiUser } from '@/models/User.js';
import { UserKeypairService } from '@/core/UserKeypairService.js';
import { HttpRequestService } from '@/core/HttpRequestService.js';
import { LoggerService } from '@/core/LoggerService.js';
diff --git a/packages/backend/src/core/activitypub/ApResolverService.ts b/packages/backend/src/core/activitypub/ApResolverService.ts
index 0d70807335..058869ca77 100644
--- a/packages/backend/src/core/activitypub/ApResolverService.ts
+++ b/packages/backend/src/core/activitypub/ApResolverService.ts
@@ -4,7 +4,7 @@
*/
import { Inject, Injectable } from '@nestjs/common';
-import type { MiLocalUser, MiRemoteUser } from '@/models/entities/User.js';
+import type { MiLocalUser, MiRemoteUser } from '@/models/User.js';
import { InstanceActorService } from '@/core/InstanceActorService.js';
import type { NotesRepository, PollsRepository, NoteReactionsRepository, UsersRepository } from '@/models/_.js';
import type { Config } from '@/config.js';
diff --git a/packages/backend/src/core/activitypub/models/ApImageService.ts b/packages/backend/src/core/activitypub/models/ApImageService.ts
index 906a2f3fb1..a4cd533892 100644
--- a/packages/backend/src/core/activitypub/models/ApImageService.ts
+++ b/packages/backend/src/core/activitypub/models/ApImageService.ts
@@ -6,8 +6,8 @@
import { Inject, Injectable } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import type { DriveFilesRepository } from '@/models/_.js';
-import type { MiRemoteUser } from '@/models/entities/User.js';
-import type { MiDriveFile } from '@/models/entities/DriveFile.js';
+import type { MiRemoteUser } from '@/models/User.js';
+import type { MiDriveFile } from '@/models/DriveFile.js';
import { MetaService } from '@/core/MetaService.js';
import { truncate } from '@/misc/truncate.js';
import { DB_MAX_IMAGE_COMMENT_LENGTH } from '@/const.js';
diff --git a/packages/backend/src/core/activitypub/models/ApNoteService.ts b/packages/backend/src/core/activitypub/models/ApNoteService.ts
index 392bdf33ed..573dff5b91 100644
--- a/packages/backend/src/core/activitypub/models/ApNoteService.ts
+++ b/packages/backend/src/core/activitypub/models/ApNoteService.ts
@@ -9,13 +9,13 @@ import { In } from 'typeorm';
import { DI } from '@/di-symbols.js';
import type { PollsRepository, EmojisRepository } from '@/models/_.js';
import type { Config } from '@/config.js';
-import type { MiRemoteUser } from '@/models/entities/User.js';
-import type { MiNote } from '@/models/entities/Note.js';
+import type { MiRemoteUser } from '@/models/User.js';
+import type { MiNote } from '@/models/Note.js';
import { toArray, toSingle, unique } from '@/misc/prelude/array.js';
-import type { MiEmoji } from '@/models/entities/Emoji.js';
+import type { MiEmoji } from '@/models/Emoji.js';
import { MetaService } from '@/core/MetaService.js';
import { AppLockService } from '@/core/AppLockService.js';
-import type { MiDriveFile } from '@/models/entities/DriveFile.js';
+import type { MiDriveFile } from '@/models/DriveFile.js';
import { NoteCreateService } from '@/core/NoteCreateService.js';
import type Logger from '@/logger.js';
import { IdService } from '@/core/IdService.js';
diff --git a/packages/backend/src/core/activitypub/models/ApPersonService.ts b/packages/backend/src/core/activitypub/models/ApPersonService.ts
index d233bcc8b8..ea64883395 100644
--- a/packages/backend/src/core/activitypub/models/ApPersonService.ts
+++ b/packages/backend/src/core/activitypub/models/ApPersonService.ts
@@ -10,26 +10,26 @@ import { ModuleRef } from '@nestjs/core';
import { DI } from '@/di-symbols.js';
import type { FollowingsRepository, InstancesRepository, UserProfilesRepository, UserPublickeysRepository, UsersRepository } from '@/models/_.js';
import type { Config } from '@/config.js';
-import type { MiLocalUser, MiRemoteUser } from '@/models/entities/User.js';
-import { MiUser } from '@/models/entities/User.js';
+import type { MiLocalUser, MiRemoteUser } from '@/models/User.js';
+import { MiUser } from '@/models/User.js';
import { truncate } from '@/misc/truncate.js';
import type { CacheService } from '@/core/CacheService.js';
import { normalizeForSearch } from '@/misc/normalize-for-search.js';
import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error.js';
import type Logger from '@/logger.js';
-import type { MiNote } from '@/models/entities/Note.js';
+import type { MiNote } from '@/models/Note.js';
import type { IdService } from '@/core/IdService.js';
import type { MfmService } from '@/core/MfmService.js';
import { toArray } from '@/misc/prelude/array.js';
import type { GlobalEventService } from '@/core/GlobalEventService.js';
import type { FederatedInstanceService } from '@/core/FederatedInstanceService.js';
import type { FetchInstanceMetadataService } from '@/core/FetchInstanceMetadataService.js';
-import { MiUserProfile } from '@/models/entities/UserProfile.js';
-import { MiUserPublickey } from '@/models/entities/UserPublickey.js';
+import { MiUserProfile } from '@/models/UserProfile.js';
+import { MiUserPublickey } from '@/models/UserPublickey.js';
import type UsersChart from '@/core/chart/charts/users.js';
import type InstanceChart from '@/core/chart/charts/instance.js';
import type { HashtagService } from '@/core/HashtagService.js';
-import { MiUserNotePining } from '@/models/entities/UserNotePining.js';
+import { MiUserNotePining } from '@/models/UserNotePining.js';
import { StatusError } from '@/misc/status-error.js';
import type { UtilityService } from '@/core/UtilityService.js';
import type { UserEntityService } from '@/core/entities/UserEntityService.js';
diff --git a/packages/backend/src/core/activitypub/models/ApQuestionService.ts b/packages/backend/src/core/activitypub/models/ApQuestionService.ts
index 85e97e0e83..27bd62268b 100644
--- a/packages/backend/src/core/activitypub/models/ApQuestionService.ts
+++ b/packages/backend/src/core/activitypub/models/ApQuestionService.ts
@@ -7,7 +7,7 @@ import { Inject, Injectable } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import type { NotesRepository, PollsRepository } from '@/models/_.js';
import type { Config } from '@/config.js';
-import type { IPoll } from '@/models/entities/Poll.js';
+import type { IPoll } from '@/models/Poll.js';
import type Logger from '@/logger.js';
import { bindThis } from '@/decorators.js';
import { isQuestion } from '../type.js';
diff --git a/packages/backend/src/core/chart/charts/active-users.ts b/packages/backend/src/core/chart/charts/active-users.ts
index ff9db46bc2..55da1469e5 100644
--- a/packages/backend/src/core/chart/charts/active-users.ts
+++ b/packages/backend/src/core/chart/charts/active-users.ts
@@ -6,7 +6,7 @@
import { Injectable, Inject } from '@nestjs/common';
import { DataSource } from 'typeorm';
import { AppLockService } from '@/core/AppLockService.js';
-import type { MiUser } from '@/models/entities/User.js';
+import type { MiUser } from '@/models/User.js';
import { DI } from '@/di-symbols.js';
import { bindThis } from '@/decorators.js';
import Chart from '../core.js';
diff --git a/packages/backend/src/core/chart/charts/drive.ts b/packages/backend/src/core/chart/charts/drive.ts
index 2fe0f76163..bbcbf1a955 100644
--- a/packages/backend/src/core/chart/charts/drive.ts
+++ b/packages/backend/src/core/chart/charts/drive.ts
@@ -5,7 +5,7 @@
import { Injectable, Inject } from '@nestjs/common';
import { DataSource } from 'typeorm';
-import type { MiDriveFile } from '@/models/entities/DriveFile.js';
+import type { MiDriveFile } from '@/models/DriveFile.js';
import { AppLockService } from '@/core/AppLockService.js';
import { DI } from '@/di-symbols.js';
import { bindThis } from '@/decorators.js';
diff --git a/packages/backend/src/core/chart/charts/instance.ts b/packages/backend/src/core/chart/charts/instance.ts
index fe38b647b1..9df0afb02e 100644
--- a/packages/backend/src/core/chart/charts/instance.ts
+++ b/packages/backend/src/core/chart/charts/instance.ts
@@ -6,8 +6,8 @@
import { Injectable, Inject } from '@nestjs/common';
import { DataSource } from 'typeorm';
import type { DriveFilesRepository, FollowingsRepository, UsersRepository, NotesRepository } from '@/models/_.js';
-import type { MiDriveFile } from '@/models/entities/DriveFile.js';
-import type { MiNote } from '@/models/entities/Note.js';
+import type { MiDriveFile } from '@/models/DriveFile.js';
+import type { MiNote } from '@/models/Note.js';
import { AppLockService } from '@/core/AppLockService.js';
import { DI } from '@/di-symbols.js';
import { UtilityService } from '@/core/UtilityService.js';
diff --git a/packages/backend/src/core/chart/charts/notes.ts b/packages/backend/src/core/chart/charts/notes.ts
index c1f3f13e0f..df3295dbac 100644
--- a/packages/backend/src/core/chart/charts/notes.ts
+++ b/packages/backend/src/core/chart/charts/notes.ts
@@ -6,7 +6,7 @@
import { Injectable, Inject } from '@nestjs/common';
import { Not, IsNull, DataSource } from 'typeorm';
import type { NotesRepository } from '@/models/_.js';
-import type { MiNote } from '@/models/entities/Note.js';
+import type { MiNote } from '@/models/Note.js';
import { AppLockService } from '@/core/AppLockService.js';
import { DI } from '@/di-symbols.js';
import { bindThis } from '@/decorators.js';
diff --git a/packages/backend/src/core/chart/charts/per-user-drive.ts b/packages/backend/src/core/chart/charts/per-user-drive.ts
index cf7e7c0d31..18354359c8 100644
--- a/packages/backend/src/core/chart/charts/per-user-drive.ts
+++ b/packages/backend/src/core/chart/charts/per-user-drive.ts
@@ -6,7 +6,7 @@
import { Injectable, Inject } from '@nestjs/common';
import { DataSource } from 'typeorm';
import type { DriveFilesRepository } from '@/models/_.js';
-import type { MiDriveFile } from '@/models/entities/DriveFile.js';
+import type { MiDriveFile } from '@/models/DriveFile.js';
import { AppLockService } from '@/core/AppLockService.js';
import { DI } from '@/di-symbols.js';
import { DriveFileEntityService } from '@/core/entities/DriveFileEntityService.js';
diff --git a/packages/backend/src/core/chart/charts/per-user-following.ts b/packages/backend/src/core/chart/charts/per-user-following.ts
index e080290662..79bff2cb66 100644
--- a/packages/backend/src/core/chart/charts/per-user-following.ts
+++ b/packages/backend/src/core/chart/charts/per-user-following.ts
@@ -5,7 +5,7 @@
import { Injectable, Inject } from '@nestjs/common';
import { Not, IsNull, DataSource } from 'typeorm';
-import type { MiUser } from '@/models/entities/User.js';
+import type { MiUser } from '@/models/User.js';
import { AppLockService } from '@/core/AppLockService.js';
import { DI } from '@/di-symbols.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
diff --git a/packages/backend/src/core/chart/charts/per-user-notes.ts b/packages/backend/src/core/chart/charts/per-user-notes.ts
index 5215875cce..0db0e6f07f 100644
--- a/packages/backend/src/core/chart/charts/per-user-notes.ts
+++ b/packages/backend/src/core/chart/charts/per-user-notes.ts
@@ -5,8 +5,8 @@
import { Injectable, Inject } from '@nestjs/common';
import { DataSource } from 'typeorm';
-import type { MiUser } from '@/models/entities/User.js';
-import type { MiNote } from '@/models/entities/Note.js';
+import type { MiUser } from '@/models/User.js';
+import type { MiNote } from '@/models/Note.js';
import { AppLockService } from '@/core/AppLockService.js';
import { DI } from '@/di-symbols.js';
import type { NotesRepository } from '@/models/_.js';
diff --git a/packages/backend/src/core/chart/charts/per-user-pv.ts b/packages/backend/src/core/chart/charts/per-user-pv.ts
index ad01e0483e..cf1b4c71f6 100644
--- a/packages/backend/src/core/chart/charts/per-user-pv.ts
+++ b/packages/backend/src/core/chart/charts/per-user-pv.ts
@@ -5,7 +5,7 @@
import { Injectable, Inject } from '@nestjs/common';
import { DataSource } from 'typeorm';
-import type { MiUser } from '@/models/entities/User.js';
+import type { MiUser } from '@/models/User.js';
import { AppLockService } from '@/core/AppLockService.js';
import { DI } from '@/di-symbols.js';
import { bindThis } from '@/decorators.js';
diff --git a/packages/backend/src/core/chart/charts/per-user-reactions.ts b/packages/backend/src/core/chart/charts/per-user-reactions.ts
index d6d54bef3b..9f4f6e9651 100644
--- a/packages/backend/src/core/chart/charts/per-user-reactions.ts
+++ b/packages/backend/src/core/chart/charts/per-user-reactions.ts
@@ -5,8 +5,8 @@
import { Injectable, Inject } from '@nestjs/common';
import { DataSource } from 'typeorm';
-import type { MiUser } from '@/models/entities/User.js';
-import type { MiNote } from '@/models/entities/Note.js';
+import type { MiUser } from '@/models/User.js';
+import type { MiNote } from '@/models/Note.js';
import { AppLockService } from '@/core/AppLockService.js';
import { DI } from '@/di-symbols.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
diff --git a/packages/backend/src/core/chart/charts/users.ts b/packages/backend/src/core/chart/charts/users.ts
index ccf6912924..c2026c2aea 100644
--- a/packages/backend/src/core/chart/charts/users.ts
+++ b/packages/backend/src/core/chart/charts/users.ts
@@ -5,7 +5,7 @@
import { Injectable, Inject } from '@nestjs/common';
import { Not, IsNull, DataSource } from 'typeorm';
-import type { MiUser } from '@/models/entities/User.js';
+import type { MiUser } from '@/models/User.js';
import { AppLockService } from '@/core/AppLockService.js';
import { DI } from '@/di-symbols.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
diff --git a/packages/backend/src/core/entities/AbuseUserReportEntityService.ts b/packages/backend/src/core/entities/AbuseUserReportEntityService.ts
index 194157136f..0e65a10d26 100644
--- a/packages/backend/src/core/entities/AbuseUserReportEntityService.ts
+++ b/packages/backend/src/core/entities/AbuseUserReportEntityService.ts
@@ -7,7 +7,7 @@ import { Inject, Injectable } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import type { AbuseUserReportsRepository } from '@/models/_.js';
import { awaitAll } from '@/misc/prelude/await-all.js';
-import type { MiAbuseUserReport } from '@/models/entities/AbuseUserReport.js';
+import type { MiAbuseUserReport } from '@/models/AbuseUserReport.js';
import { bindThis } from '@/decorators.js';
import { UserEntityService } from './UserEntityService.js';
diff --git a/packages/backend/src/core/entities/AntennaEntityService.ts b/packages/backend/src/core/entities/AntennaEntityService.ts
index 073d0aa2a1..ed108f2ce5 100644
--- a/packages/backend/src/core/entities/AntennaEntityService.ts
+++ b/packages/backend/src/core/entities/AntennaEntityService.ts
@@ -7,7 +7,7 @@ import { Inject, Injectable } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import type { AntennasRepository } from '@/models/_.js';
import type { Packed } from '@/misc/json-schema.js';
-import type { MiAntenna } from '@/models/entities/Antenna.js';
+import type { MiAntenna } from '@/models/Antenna.js';
import { bindThis } from '@/decorators.js';
@Injectable()
diff --git a/packages/backend/src/core/entities/AppEntityService.ts b/packages/backend/src/core/entities/AppEntityService.ts
index e200e8ff4a..14a93cda5b 100644
--- a/packages/backend/src/core/entities/AppEntityService.ts
+++ b/packages/backend/src/core/entities/AppEntityService.ts
@@ -7,8 +7,8 @@ import { Inject, Injectable } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import type { AccessTokensRepository, AppsRepository } from '@/models/_.js';
import type { Packed } from '@/misc/json-schema.js';
-import type { MiApp } from '@/models/entities/App.js';
-import type { MiUser } from '@/models/entities/User.js';
+import type { MiApp } from '@/models/App.js';
+import type { MiUser } from '@/models/User.js';
import { bindThis } from '@/decorators.js';
@Injectable()
diff --git a/packages/backend/src/core/entities/AuthSessionEntityService.ts b/packages/backend/src/core/entities/AuthSessionEntityService.ts
index bc87e26f21..fd356cc89d 100644
--- a/packages/backend/src/core/entities/AuthSessionEntityService.ts
+++ b/packages/backend/src/core/entities/AuthSessionEntityService.ts
@@ -7,8 +7,8 @@ import { Inject, Injectable } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import type { AuthSessionsRepository } from '@/models/_.js';
import { awaitAll } from '@/misc/prelude/await-all.js';
-import type { MiAuthSession } from '@/models/entities/AuthSession.js';
-import type { MiUser } from '@/models/entities/User.js';
+import type { MiAuthSession } from '@/models/AuthSession.js';
+import type { MiUser } from '@/models/User.js';
import { bindThis } from '@/decorators.js';
import { AppEntityService } from './AppEntityService.js';
diff --git a/packages/backend/src/core/entities/BlockingEntityService.ts b/packages/backend/src/core/entities/BlockingEntityService.ts
index 3773abaa8a..44466e24e8 100644
--- a/packages/backend/src/core/entities/BlockingEntityService.ts
+++ b/packages/backend/src/core/entities/BlockingEntityService.ts
@@ -8,8 +8,8 @@ import { DI } from '@/di-symbols.js';
import type { BlockingsRepository } from '@/models/_.js';
import { awaitAll } from '@/misc/prelude/await-all.js';
import type { Packed } from '@/misc/json-schema.js';
-import type { MiBlocking } from '@/models/entities/Blocking.js';
-import type { MiUser } from '@/models/entities/User.js';
+import type { MiBlocking } from '@/models/Blocking.js';
+import type { MiUser } from '@/models/User.js';
import { bindThis } from '@/decorators.js';
import { UserEntityService } from './UserEntityService.js';
diff --git a/packages/backend/src/core/entities/ChannelEntityService.ts b/packages/backend/src/core/entities/ChannelEntityService.ts
index 174f2befc0..094de4d2d5 100644
--- a/packages/backend/src/core/entities/ChannelEntityService.ts
+++ b/packages/backend/src/core/entities/ChannelEntityService.ts
@@ -7,9 +7,9 @@ import { Inject, Injectable } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import type { ChannelFavoritesRepository, ChannelFollowingsRepository, ChannelsRepository, DriveFilesRepository, NoteUnreadsRepository, NotesRepository } from '@/models/_.js';
import type { Packed } from '@/misc/json-schema.js';
-import type { } from '@/models/entities/Blocking.js';
-import type { MiUser } from '@/models/entities/User.js';
-import type { MiChannel } from '@/models/entities/Channel.js';
+import type { } from '@/models/Blocking.js';
+import type { MiUser } from '@/models/User.js';
+import type { MiChannel } from '@/models/Channel.js';
import { bindThis } from '@/decorators.js';
import { DriveFileEntityService } from './DriveFileEntityService.js';
import { NoteEntityService } from './NoteEntityService.js';
diff --git a/packages/backend/src/core/entities/ClipEntityService.ts b/packages/backend/src/core/entities/ClipEntityService.ts
index 59615de159..e141db03f1 100644
--- a/packages/backend/src/core/entities/ClipEntityService.ts
+++ b/packages/backend/src/core/entities/ClipEntityService.ts
@@ -8,8 +8,8 @@ import { DI } from '@/di-symbols.js';
import type { ClipFavoritesRepository, ClipsRepository, MiUser } from '@/models/_.js';
import { awaitAll } from '@/misc/prelude/await-all.js';
import type { Packed } from '@/misc/json-schema.js';
-import type { } from '@/models/entities/Blocking.js';
-import type { MiClip } from '@/models/entities/Clip.js';
+import type { } from '@/models/Blocking.js';
+import type { MiClip } from '@/models/Clip.js';
import { bindThis } from '@/decorators.js';
import { UserEntityService } from './UserEntityService.js';
diff --git a/packages/backend/src/core/entities/DriveFileEntityService.ts b/packages/backend/src/core/entities/DriveFileEntityService.ts
index f1629a33de..23273b0413 100644
--- a/packages/backend/src/core/entities/DriveFileEntityService.ts
+++ b/packages/backend/src/core/entities/DriveFileEntityService.ts
@@ -10,8 +10,8 @@ import type { DriveFilesRepository } from '@/models/_.js';
import type { Config } from '@/config.js';
import type { Packed } from '@/misc/json-schema.js';
import { awaitAll } from '@/misc/prelude/await-all.js';
-import type { MiUser } from '@/models/entities/User.js';
-import type { MiDriveFile } from '@/models/entities/DriveFile.js';
+import type { MiUser } from '@/models/User.js';
+import type { MiDriveFile } from '@/models/DriveFile.js';
import { appendQuery, query } from '@/misc/prelude/url.js';
import { deepClone } from '@/misc/clone.js';
import { bindThis } from '@/decorators.js';
diff --git a/packages/backend/src/core/entities/DriveFolderEntityService.ts b/packages/backend/src/core/entities/DriveFolderEntityService.ts
index f93899217c..55014284bd 100644
--- a/packages/backend/src/core/entities/DriveFolderEntityService.ts
+++ b/packages/backend/src/core/entities/DriveFolderEntityService.ts
@@ -8,8 +8,8 @@ import { DI } from '@/di-symbols.js';
import type { DriveFilesRepository, DriveFoldersRepository } from '@/models/_.js';
import { awaitAll } from '@/misc/prelude/await-all.js';
import type { Packed } from '@/misc/json-schema.js';
-import type { } from '@/models/entities/Blocking.js';
-import type { MiDriveFolder } from '@/models/entities/DriveFolder.js';
+import type { } from '@/models/Blocking.js';
+import type { MiDriveFolder } from '@/models/DriveFolder.js';
import { bindThis } from '@/decorators.js';
@Injectable()
diff --git a/packages/backend/src/core/entities/EmojiEntityService.ts b/packages/backend/src/core/entities/EmojiEntityService.ts
index dda55e01dc..5b97cfad5e 100644
--- a/packages/backend/src/core/entities/EmojiEntityService.ts
+++ b/packages/backend/src/core/entities/EmojiEntityService.ts
@@ -7,8 +7,8 @@ import { Inject, Injectable } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import type { EmojisRepository } from '@/models/_.js';
import type { Packed } from '@/misc/json-schema.js';
-import type { } from '@/models/entities/Blocking.js';
-import type { MiEmoji } from '@/models/entities/Emoji.js';
+import type { } from '@/models/Blocking.js';
+import type { MiEmoji } from '@/models/Emoji.js';
import { bindThis } from '@/decorators.js';
@Injectable()
diff --git a/packages/backend/src/core/entities/FlashEntityService.ts b/packages/backend/src/core/entities/FlashEntityService.ts
index b52e9f6445..4701cddcba 100644
--- a/packages/backend/src/core/entities/FlashEntityService.ts
+++ b/packages/backend/src/core/entities/FlashEntityService.ts
@@ -8,9 +8,9 @@ import { DI } from '@/di-symbols.js';
import type { FlashsRepository, FlashLikesRepository } from '@/models/_.js';
import { awaitAll } from '@/misc/prelude/await-all.js';
import type { Packed } from '@/misc/json-schema.js';
-import type { } from '@/models/entities/Blocking.js';
-import type { MiUser } from '@/models/entities/User.js';
-import type { MiFlash } from '@/models/entities/Flash.js';
+import type { } from '@/models/Blocking.js';
+import type { MiUser } from '@/models/User.js';
+import type { MiFlash } from '@/models/Flash.js';
import { bindThis } from '@/decorators.js';
import { UserEntityService } from './UserEntityService.js';
diff --git a/packages/backend/src/core/entities/FlashLikeEntityService.ts b/packages/backend/src/core/entities/FlashLikeEntityService.ts
index f5bdbe1de7..2eff86217a 100644
--- a/packages/backend/src/core/entities/FlashLikeEntityService.ts
+++ b/packages/backend/src/core/entities/FlashLikeEntityService.ts
@@ -6,9 +6,9 @@
import { Inject, Injectable } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import type { FlashLikesRepository } from '@/models/_.js';
-import type { } from '@/models/entities/Blocking.js';
-import type { MiUser } from '@/models/entities/User.js';
-import type { MiFlashLike } from '@/models/entities/FlashLike.js';
+import type { } from '@/models/Blocking.js';
+import type { MiUser } from '@/models/User.js';
+import type { MiFlashLike } from '@/models/FlashLike.js';
import { bindThis } from '@/decorators.js';
import { FlashEntityService } from './FlashEntityService.js';
diff --git a/packages/backend/src/core/entities/FollowRequestEntityService.ts b/packages/backend/src/core/entities/FollowRequestEntityService.ts
index 45ab7d3302..0e0fec9f46 100644
--- a/packages/backend/src/core/entities/FollowRequestEntityService.ts
+++ b/packages/backend/src/core/entities/FollowRequestEntityService.ts
@@ -6,9 +6,9 @@
import { Inject, Injectable } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import type { FollowRequestsRepository } from '@/models/_.js';
-import type { } from '@/models/entities/Blocking.js';
-import type { MiUser } from '@/models/entities/User.js';
-import type { MiFollowRequest } from '@/models/entities/FollowRequest.js';
+import type { } from '@/models/Blocking.js';
+import type { MiUser } from '@/models/User.js';
+import type { MiFollowRequest } from '@/models/FollowRequest.js';
import { bindThis } from '@/decorators.js';
import { UserEntityService } from './UserEntityService.js';
diff --git a/packages/backend/src/core/entities/FollowingEntityService.ts b/packages/backend/src/core/entities/FollowingEntityService.ts
index 1faa051635..9f6eb51e8c 100644
--- a/packages/backend/src/core/entities/FollowingEntityService.ts
+++ b/packages/backend/src/core/entities/FollowingEntityService.ts
@@ -8,9 +8,9 @@ import { DI } from '@/di-symbols.js';
import type { FollowingsRepository } from '@/models/_.js';
import { awaitAll } from '@/misc/prelude/await-all.js';
import type { Packed } from '@/misc/json-schema.js';
-import type { } from '@/models/entities/Blocking.js';
-import type { MiUser } from '@/models/entities/User.js';
-import type { MiFollowing } from '@/models/entities/Following.js';
+import type { } from '@/models/Blocking.js';
+import type { MiUser } from '@/models/User.js';
+import type { MiFollowing } from '@/models/Following.js';
import { bindThis } from '@/decorators.js';
import { UserEntityService } from './UserEntityService.js';
diff --git a/packages/backend/src/core/entities/GalleryLikeEntityService.ts b/packages/backend/src/core/entities/GalleryLikeEntityService.ts
index 5f321da67c..e740701888 100644
--- a/packages/backend/src/core/entities/GalleryLikeEntityService.ts
+++ b/packages/backend/src/core/entities/GalleryLikeEntityService.ts
@@ -6,8 +6,8 @@
import { Inject, Injectable } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import type { GalleryLikesRepository } from '@/models/_.js';
-import type { } from '@/models/entities/Blocking.js';
-import type { MiGalleryLike } from '@/models/entities/GalleryLike.js';
+import type { } from '@/models/Blocking.js';
+import type { MiGalleryLike } from '@/models/GalleryLike.js';
import { bindThis } from '@/decorators.js';
import { GalleryPostEntityService } from './GalleryPostEntityService.js';
diff --git a/packages/backend/src/core/entities/GalleryPostEntityService.ts b/packages/backend/src/core/entities/GalleryPostEntityService.ts
index c05d6f5b24..bbaf70f0fd 100644
--- a/packages/backend/src/core/entities/GalleryPostEntityService.ts
+++ b/packages/backend/src/core/entities/GalleryPostEntityService.ts
@@ -8,9 +8,9 @@ import { DI } from '@/di-symbols.js';
import type { GalleryLikesRepository, GalleryPostsRepository } from '@/models/_.js';
import { awaitAll } from '@/misc/prelude/await-all.js';
import type { Packed } from '@/misc/json-schema.js';
-import type { } from '@/models/entities/Blocking.js';
-import type { MiUser } from '@/models/entities/User.js';
-import type { MiGalleryPost } from '@/models/entities/GalleryPost.js';
+import type { } from '@/models/Blocking.js';
+import type { MiUser } from '@/models/User.js';
+import type { MiGalleryPost } from '@/models/GalleryPost.js';
import { bindThis } from '@/decorators.js';
import { UserEntityService } from './UserEntityService.js';
import { DriveFileEntityService } from './DriveFileEntityService.js';
diff --git a/packages/backend/src/core/entities/HashtagEntityService.ts b/packages/backend/src/core/entities/HashtagEntityService.ts
index 21c5d13926..006e267b12 100644
--- a/packages/backend/src/core/entities/HashtagEntityService.ts
+++ b/packages/backend/src/core/entities/HashtagEntityService.ts
@@ -5,8 +5,8 @@
import { Injectable } from '@nestjs/common';
import type { Packed } from '@/misc/json-schema.js';
-import type { } from '@/models/entities/Blocking.js';
-import type { MiHashtag } from '@/models/entities/Hashtag.js';
+import type { } from '@/models/Blocking.js';
+import type { MiHashtag } from '@/models/Hashtag.js';
import { bindThis } from '@/decorators.js';
@Injectable()
diff --git a/packages/backend/src/core/entities/InstanceEntityService.ts b/packages/backend/src/core/entities/InstanceEntityService.ts
index 1de7564b0c..0e27e9df7f 100644
--- a/packages/backend/src/core/entities/InstanceEntityService.ts
+++ b/packages/backend/src/core/entities/InstanceEntityService.ts
@@ -5,8 +5,8 @@
import { Injectable } from '@nestjs/common';
import type { Packed } from '@/misc/json-schema.js';
-import type { } from '@/models/entities/Blocking.js';
-import type { MiInstance } from '@/models/entities/Instance.js';
+import type { } from '@/models/Blocking.js';
+import type { MiInstance } from '@/models/Instance.js';
import { MetaService } from '@/core/MetaService.js';
import { bindThis } from '@/decorators.js';
import { UtilityService } from '../UtilityService.js';
diff --git a/packages/backend/src/core/entities/InviteCodeEntityService.ts b/packages/backend/src/core/entities/InviteCodeEntityService.ts
index d3c197fbf0..914eaafe68 100644
--- a/packages/backend/src/core/entities/InviteCodeEntityService.ts
+++ b/packages/backend/src/core/entities/InviteCodeEntityService.ts
@@ -8,8 +8,8 @@ import { DI } from '@/di-symbols.js';
import type { RegistrationTicketsRepository } from '@/models/_.js';
import { awaitAll } from '@/misc/prelude/await-all.js';
import type { Packed } from '@/misc/json-schema.js';
-import type { MiUser } from '@/models/entities/User.js';
-import type { MiRegistrationTicket } from '@/models/entities/RegistrationTicket.js';
+import type { MiUser } from '@/models/User.js';
+import type { MiRegistrationTicket } from '@/models/RegistrationTicket.js';
import { bindThis } from '@/decorators.js';
import { UserEntityService } from './UserEntityService.js';
diff --git a/packages/backend/src/core/entities/ModerationLogEntityService.ts b/packages/backend/src/core/entities/ModerationLogEntityService.ts
index 59bb0f32de..83b024d83b 100644
--- a/packages/backend/src/core/entities/ModerationLogEntityService.ts
+++ b/packages/backend/src/core/entities/ModerationLogEntityService.ts
@@ -7,8 +7,8 @@ import { Inject, Injectable } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import type { ModerationLogsRepository } from '@/models/_.js';
import { awaitAll } from '@/misc/prelude/await-all.js';
-import type { } from '@/models/entities/Blocking.js';
-import type { MiModerationLog } from '@/models/entities/ModerationLog.js';
+import type { } from '@/models/Blocking.js';
+import type { MiModerationLog } from '@/models/ModerationLog.js';
import { bindThis } from '@/decorators.js';
import { UserEntityService } from './UserEntityService.js';
diff --git a/packages/backend/src/core/entities/MutingEntityService.ts b/packages/backend/src/core/entities/MutingEntityService.ts
index dcd1ddd034..e3d5d2e211 100644
--- a/packages/backend/src/core/entities/MutingEntityService.ts
+++ b/packages/backend/src/core/entities/MutingEntityService.ts
@@ -8,9 +8,9 @@ import { DI } from '@/di-symbols.js';
import type { MutingsRepository } from '@/models/_.js';
import { awaitAll } from '@/misc/prelude/await-all.js';
import type { Packed } from '@/misc/json-schema.js';
-import type { } from '@/models/entities/Blocking.js';
-import type { MiUser } from '@/models/entities/User.js';
-import type { MiMuting } from '@/models/entities/Muting.js';
+import type { } from '@/models/Blocking.js';
+import type { MiUser } from '@/models/User.js';
+import type { MiMuting } from '@/models/Muting.js';
import { bindThis } from '@/decorators.js';
import { UserEntityService } from './UserEntityService.js';
diff --git a/packages/backend/src/core/entities/NoteEntityService.ts b/packages/backend/src/core/entities/NoteEntityService.ts
index 242ef07e7c..bf42e98ce0 100644
--- a/packages/backend/src/core/entities/NoteEntityService.ts
+++ b/packages/backend/src/core/entities/NoteEntityService.ts
@@ -11,9 +11,9 @@ import { DI } from '@/di-symbols.js';
import type { Packed } from '@/misc/json-schema.js';
import { nyaize } from '@/misc/nyaize.js';
import { awaitAll } from '@/misc/prelude/await-all.js';
-import type { MiUser } from '@/models/entities/User.js';
-import type { MiNote } from '@/models/entities/Note.js';
-import type { MiNoteReaction } from '@/models/entities/NoteReaction.js';
+import type { MiUser } from '@/models/User.js';
+import type { MiNote } from '@/models/Note.js';
+import type { MiNoteReaction } from '@/models/NoteReaction.js';
import type { UsersRepository, NotesRepository, FollowingsRepository, PollsRepository, PollVotesRepository, NoteReactionsRepository, ChannelsRepository } from '@/models/_.js';
import { bindThis } from '@/decorators.js';
import { isNotNull } from '@/misc/is-not-null.js';
diff --git a/packages/backend/src/core/entities/NoteFavoriteEntityService.ts b/packages/backend/src/core/entities/NoteFavoriteEntityService.ts
index ceddcfde50..808c8c9f69 100644
--- a/packages/backend/src/core/entities/NoteFavoriteEntityService.ts
+++ b/packages/backend/src/core/entities/NoteFavoriteEntityService.ts
@@ -6,9 +6,9 @@
import { Inject, Injectable } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import type { NoteFavoritesRepository } from '@/models/_.js';
-import type { } from '@/models/entities/Blocking.js';
-import type { MiUser } from '@/models/entities/User.js';
-import type { MiNoteFavorite } from '@/models/entities/NoteFavorite.js';
+import type { } from '@/models/Blocking.js';
+import type { MiUser } from '@/models/User.js';
+import type { MiNoteFavorite } from '@/models/NoteFavorite.js';
import { bindThis } from '@/decorators.js';
import { NoteEntityService } from './NoteEntityService.js';
diff --git a/packages/backend/src/core/entities/NoteReactionEntityService.ts b/packages/backend/src/core/entities/NoteReactionEntityService.ts
index ad8eb06e8f..9701f37fdb 100644
--- a/packages/backend/src/core/entities/NoteReactionEntityService.ts
+++ b/packages/backend/src/core/entities/NoteReactionEntityService.ts
@@ -9,9 +9,9 @@ import type { NoteReactionsRepository } from '@/models/_.js';
import type { Packed } from '@/misc/json-schema.js';
import { bindThis } from '@/decorators.js';
import type { OnModuleInit } from '@nestjs/common';
-import type { } from '@/models/entities/Blocking.js';
-import type { MiUser } from '@/models/entities/User.js';
-import type { MiNoteReaction } from '@/models/entities/NoteReaction.js';
+import type { } from '@/models/Blocking.js';
+import type { MiUser } from '@/models/User.js';
+import type { MiNoteReaction } from '@/models/NoteReaction.js';
import type { ReactionService } from '../ReactionService.js';
import type { UserEntityService } from './UserEntityService.js';
import type { NoteEntityService } from './NoteEntityService.js';
diff --git a/packages/backend/src/core/entities/NotificationEntityService.ts b/packages/backend/src/core/entities/NotificationEntityService.ts
index 4cd4bc5881..75a2f62f6e 100644
--- a/packages/backend/src/core/entities/NotificationEntityService.ts
+++ b/packages/backend/src/core/entities/NotificationEntityService.ts
@@ -9,8 +9,8 @@ import { In } from 'typeorm';
import { DI } from '@/di-symbols.js';
import type { AccessTokensRepository, FollowRequestsRepository, NotesRepository, MiUser, UsersRepository } from '@/models/_.js';
import { awaitAll } from '@/misc/prelude/await-all.js';
-import type { MiNotification } from '@/models/entities/Notification.js';
-import type { MiNote } from '@/models/entities/Note.js';
+import type { MiNotification } from '@/models/Notification.js';
+import type { MiNote } from '@/models/Note.js';
import type { Packed } from '@/misc/json-schema.js';
import { bindThis } from '@/decorators.js';
import { isNotNull } from '@/misc/is-not-null.js';
diff --git a/packages/backend/src/core/entities/PageEntityService.ts b/packages/backend/src/core/entities/PageEntityService.ts
index 3d03ac598e..e3a1e19ddd 100644
--- a/packages/backend/src/core/entities/PageEntityService.ts
+++ b/packages/backend/src/core/entities/PageEntityService.ts
@@ -8,10 +8,10 @@ import { DI } from '@/di-symbols.js';
import type { DriveFilesRepository, PagesRepository, PageLikesRepository } from '@/models/_.js';
import { awaitAll } from '@/misc/prelude/await-all.js';
import type { Packed } from '@/misc/json-schema.js';
-import type { } from '@/models/entities/Blocking.js';
-import type { MiUser } from '@/models/entities/User.js';
-import type { MiPage } from '@/models/entities/Page.js';
-import type { MiDriveFile } from '@/models/entities/DriveFile.js';
+import type { } from '@/models/Blocking.js';
+import type { MiUser } from '@/models/User.js';
+import type { MiPage } from '@/models/Page.js';
+import type { MiDriveFile } from '@/models/DriveFile.js';
import { bindThis } from '@/decorators.js';
import { UserEntityService } from './UserEntityService.js';
import { DriveFileEntityService } from './DriveFileEntityService.js';
diff --git a/packages/backend/src/core/entities/PageLikeEntityService.ts b/packages/backend/src/core/entities/PageLikeEntityService.ts
index 8521352517..4dc691ab93 100644
--- a/packages/backend/src/core/entities/PageLikeEntityService.ts
+++ b/packages/backend/src/core/entities/PageLikeEntityService.ts
@@ -6,9 +6,9 @@
import { Inject, Injectable } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import type { PageLikesRepository } from '@/models/_.js';
-import type { } from '@/models/entities/Blocking.js';
-import type { MiUser } from '@/models/entities/User.js';
-import type { MiPageLike } from '@/models/entities/PageLike.js';
+import type { } from '@/models/Blocking.js';
+import type { MiUser } from '@/models/User.js';
+import type { MiPageLike } from '@/models/PageLike.js';
import { bindThis } from '@/decorators.js';
import { PageEntityService } from './PageEntityService.js';
diff --git a/packages/backend/src/core/entities/RenoteMutingEntityService.ts b/packages/backend/src/core/entities/RenoteMutingEntityService.ts
index bb0aa7f26c..7111fab08a 100644
--- a/packages/backend/src/core/entities/RenoteMutingEntityService.ts
+++ b/packages/backend/src/core/entities/RenoteMutingEntityService.ts
@@ -8,9 +8,9 @@ import { DI } from '@/di-symbols.js';
import type { RenoteMutingsRepository } from '@/models/_.js';
import { awaitAll } from '@/misc/prelude/await-all.js';
import type { Packed } from '@/misc/json-schema.js';
-import type { } from '@/models/entities/Blocking.js';
-import type { MiUser } from '@/models/entities/User.js';
-import type { MiRenoteMuting } from '@/models/entities/RenoteMuting.js';
+import type { } from '@/models/Blocking.js';
+import type { MiUser } from '@/models/User.js';
+import type { MiRenoteMuting } from '@/models/RenoteMuting.js';
import { bindThis } from '@/decorators.js';
import { UserEntityService } from './UserEntityService.js';
diff --git a/packages/backend/src/core/entities/RoleEntityService.ts b/packages/backend/src/core/entities/RoleEntityService.ts
index 5510c75695..23e82561d6 100644
--- a/packages/backend/src/core/entities/RoleEntityService.ts
+++ b/packages/backend/src/core/entities/RoleEntityService.ts
@@ -8,8 +8,8 @@ import { Brackets } from 'typeorm';
import { DI } from '@/di-symbols.js';
import type { RoleAssignmentsRepository, RolesRepository } from '@/models/_.js';
import { awaitAll } from '@/misc/prelude/await-all.js';
-import type { MiUser } from '@/models/entities/User.js';
-import type { MiRole } from '@/models/entities/Role.js';
+import type { MiUser } from '@/models/User.js';
+import type { MiRole } from '@/models/Role.js';
import { bindThis } from '@/decorators.js';
import { DEFAULT_POLICIES } from '@/core/RoleService.js';
diff --git a/packages/backend/src/core/entities/SigninEntityService.ts b/packages/backend/src/core/entities/SigninEntityService.ts
index 59ad57e4a3..8c88e8560a 100644
--- a/packages/backend/src/core/entities/SigninEntityService.ts
+++ b/packages/backend/src/core/entities/SigninEntityService.ts
@@ -4,8 +4,8 @@
*/
import { Injectable } from '@nestjs/common';
-import type { } from '@/models/entities/Blocking.js';
-import type { MiSignin } from '@/models/entities/Signin.js';
+import type { } from '@/models/Blocking.js';
+import type { MiSignin } from '@/models/Signin.js';
import { bindThis } from '@/decorators.js';
@Injectable()
diff --git a/packages/backend/src/core/entities/UserEntityService.ts b/packages/backend/src/core/entities/UserEntityService.ts
index 7c880e7c69..c0909a663d 100644
--- a/packages/backend/src/core/entities/UserEntityService.ts
+++ b/packages/backend/src/core/entities/UserEntityService.ts
@@ -13,8 +13,8 @@ import type { Packed } from '@/misc/json-schema.js';
import type { Promiseable } from '@/misc/prelude/await-all.js';
import { awaitAll } from '@/misc/prelude/await-all.js';
import { USER_ACTIVE_THRESHOLD, USER_ONLINE_THRESHOLD } from '@/const.js';
-import type { MiLocalUser, MiPartialLocalUser, MiPartialRemoteUser, MiRemoteUser, MiUser } from '@/models/entities/User.js';
-import { birthdaySchema, descriptionSchema, localUsernameSchema, locationSchema, nameSchema, passwordSchema } from '@/models/entities/User.js';
+import type { MiLocalUser, MiPartialLocalUser, MiPartialRemoteUser, MiRemoteUser, MiUser } from '@/models/User.js';
+import { birthdaySchema, descriptionSchema, localUsernameSchema, locationSchema, nameSchema, passwordSchema } from '@/models/User.js';
import type { UsersRepository, UserSecurityKeysRepository, FollowingsRepository, FollowRequestsRepository, BlockingsRepository, MutingsRepository, DriveFilesRepository, NoteUnreadsRepository, UserNotePiningsRepository, UserProfilesRepository, AnnouncementReadsRepository, AnnouncementsRepository, MiUserProfile, RenoteMutingsRepository, UserMemoRepository } from '@/models/_.js';
import { bindThis } from '@/decorators.js';
import { RoleService } from '@/core/RoleService.js';
diff --git a/packages/backend/src/core/entities/UserListEntityService.ts b/packages/backend/src/core/entities/UserListEntityService.ts
index 79974dd6f6..a7f2885194 100644
--- a/packages/backend/src/core/entities/UserListEntityService.ts
+++ b/packages/backend/src/core/entities/UserListEntityService.ts
@@ -7,8 +7,8 @@ import { Inject, Injectable } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import type { UserListJoiningsRepository, UserListsRepository } from '@/models/_.js';
import type { Packed } from '@/misc/json-schema.js';
-import type { } from '@/models/entities/Blocking.js';
-import type { MiUserList } from '@/models/entities/UserList.js';
+import type { } from '@/models/Blocking.js';
+import type { MiUserList } from '@/models/UserList.js';
import { bindThis } from '@/decorators.js';
@Injectable()
diff --git a/packages/backend/src/misc/check-word-mute.ts b/packages/backend/src/misc/check-word-mute.ts
index a7a60c20e9..cef5595451 100644
--- a/packages/backend/src/misc/check-word-mute.ts
+++ b/packages/backend/src/misc/check-word-mute.ts
@@ -5,8 +5,8 @@
import { AhoCorasick } from 'slacc';
import RE2 from 're2';
-import type { MiNote } from '@/models/entities/Note.js';
-import type { MiUser } from '@/models/entities/User.js';
+import type { MiNote } from '@/models/Note.js';
+import type { MiUser } from '@/models/User.js';
type NoteLike = {
userId: MiNote['userId'];
diff --git a/packages/backend/src/misc/is-quote.ts b/packages/backend/src/misc/is-quote.ts
index c9f3af15fc..059f6a4b5f 100644
--- a/packages/backend/src/misc/is-quote.ts
+++ b/packages/backend/src/misc/is-quote.ts
@@ -3,7 +3,7 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
-import type { MiNote } from '@/models/entities/Note.js';
+import type { MiNote } from '@/models/Note.js';
// eslint-disable-next-line import/no-default-export
export default function(note: MiNote): boolean {
diff --git a/packages/backend/src/models/entities/AbuseUserReport.ts b/packages/backend/src/models/AbuseUserReport.ts
similarity index 97%
rename from packages/backend/src/models/entities/AbuseUserReport.ts
rename to packages/backend/src/models/AbuseUserReport.ts
index 522cc502cc..2551af7cb6 100644
--- a/packages/backend/src/models/entities/AbuseUserReport.ts
+++ b/packages/backend/src/models/AbuseUserReport.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
@Entity('abuse_user_report')
diff --git a/packages/backend/src/models/entities/AccessToken.ts b/packages/backend/src/models/AccessToken.ts
similarity index 97%
rename from packages/backend/src/models/entities/AccessToken.ts
rename to packages/backend/src/models/AccessToken.ts
index 08bd2483ee..5a6269a729 100644
--- a/packages/backend/src/models/entities/AccessToken.ts
+++ b/packages/backend/src/models/AccessToken.ts
@@ -4,7 +4,7 @@
*/
import { Entity, PrimaryColumn, Index, Column, ManyToOne, JoinColumn } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
import { MiApp } from './App.js';
diff --git a/packages/backend/src/models/entities/Ad.ts b/packages/backend/src/models/Ad.ts
similarity index 97%
rename from packages/backend/src/models/entities/Ad.ts
rename to packages/backend/src/models/Ad.ts
index 2f84e7144e..6dfc9cb30e 100644
--- a/packages/backend/src/models/entities/Ad.ts
+++ b/packages/backend/src/models/Ad.ts
@@ -4,7 +4,7 @@
*/
import { Entity, Index, Column, PrimaryColumn } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
@Entity('ad')
export class MiAd {
diff --git a/packages/backend/src/models/entities/Announcement.ts b/packages/backend/src/models/Announcement.ts
similarity index 98%
rename from packages/backend/src/models/entities/Announcement.ts
rename to packages/backend/src/models/Announcement.ts
index 9a2722b39c..34b092a8d4 100644
--- a/packages/backend/src/models/entities/Announcement.ts
+++ b/packages/backend/src/models/Announcement.ts
@@ -4,7 +4,7 @@
*/
import { Entity, Index, Column, PrimaryColumn, ManyToOne, JoinColumn } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
@Entity('announcement')
diff --git a/packages/backend/src/models/entities/AnnouncementRead.ts b/packages/backend/src/models/AnnouncementRead.ts
similarity index 96%
rename from packages/backend/src/models/entities/AnnouncementRead.ts
rename to packages/backend/src/models/AnnouncementRead.ts
index 89dadaab37..3d6ec5652c 100644
--- a/packages/backend/src/models/entities/AnnouncementRead.ts
+++ b/packages/backend/src/models/AnnouncementRead.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
import { MiAnnouncement } from './Announcement.js';
diff --git a/packages/backend/src/models/entities/Antenna.ts b/packages/backend/src/models/Antenna.ts
similarity index 98%
rename from packages/backend/src/models/entities/Antenna.ts
rename to packages/backend/src/models/Antenna.ts
index e73a4d55c6..7c1d80cc46 100644
--- a/packages/backend/src/models/entities/Antenna.ts
+++ b/packages/backend/src/models/Antenna.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
import { MiUserList } from './UserList.js';
diff --git a/packages/backend/src/models/entities/App.ts b/packages/backend/src/models/App.ts
similarity index 97%
rename from packages/backend/src/models/entities/App.ts
rename to packages/backend/src/models/App.ts
index 99c41a2035..c599ef8be0 100644
--- a/packages/backend/src/models/entities/App.ts
+++ b/packages/backend/src/models/App.ts
@@ -4,7 +4,7 @@
*/
import { Entity, PrimaryColumn, Column, Index, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
@Entity('app')
diff --git a/packages/backend/src/models/entities/AuthSession.ts b/packages/backend/src/models/AuthSession.ts
similarity index 96%
rename from packages/backend/src/models/entities/AuthSession.ts
rename to packages/backend/src/models/AuthSession.ts
index 1aabf836db..d9de6b6979 100644
--- a/packages/backend/src/models/entities/AuthSession.ts
+++ b/packages/backend/src/models/AuthSession.ts
@@ -4,7 +4,7 @@
*/
import { Entity, PrimaryColumn, Index, Column, ManyToOne, JoinColumn } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
import { MiApp } from './App.js';
diff --git a/packages/backend/src/models/entities/Blocking.ts b/packages/backend/src/models/Blocking.ts
similarity index 96%
rename from packages/backend/src/models/entities/Blocking.ts
rename to packages/backend/src/models/Blocking.ts
index 8bedb4395c..1e3dd3a644 100644
--- a/packages/backend/src/models/entities/Blocking.ts
+++ b/packages/backend/src/models/Blocking.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
@Entity('blocking')
diff --git a/packages/backend/src/models/entities/Channel.ts b/packages/backend/src/models/Channel.ts
similarity index 98%
rename from packages/backend/src/models/entities/Channel.ts
rename to packages/backend/src/models/Channel.ts
index 9a89b650a9..ae3886a657 100644
--- a/packages/backend/src/models/entities/Channel.ts
+++ b/packages/backend/src/models/Channel.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
import { MiDriveFile } from './DriveFile.js';
diff --git a/packages/backend/src/models/entities/ChannelFavorite.ts b/packages/backend/src/models/ChannelFavorite.ts
similarity index 96%
rename from packages/backend/src/models/entities/ChannelFavorite.ts
rename to packages/backend/src/models/ChannelFavorite.ts
index c2be68ab7d..ab74aa5530 100644
--- a/packages/backend/src/models/entities/ChannelFavorite.ts
+++ b/packages/backend/src/models/ChannelFavorite.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
import { MiChannel } from './Channel.js';
diff --git a/packages/backend/src/models/entities/ChannelFollowing.ts b/packages/backend/src/models/ChannelFollowing.ts
similarity index 96%
rename from packages/backend/src/models/entities/ChannelFollowing.ts
rename to packages/backend/src/models/ChannelFollowing.ts
index dc33eb144b..c62a95332a 100644
--- a/packages/backend/src/models/entities/ChannelFollowing.ts
+++ b/packages/backend/src/models/ChannelFollowing.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
import { MiChannel } from './Channel.js';
diff --git a/packages/backend/src/models/entities/Clip.ts b/packages/backend/src/models/Clip.ts
similarity index 96%
rename from packages/backend/src/models/entities/Clip.ts
rename to packages/backend/src/models/Clip.ts
index f8bc2f2173..c60b2964e0 100644
--- a/packages/backend/src/models/entities/Clip.ts
+++ b/packages/backend/src/models/Clip.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
@Entity('clip')
diff --git a/packages/backend/src/models/entities/ClipFavorite.ts b/packages/backend/src/models/ClipFavorite.ts
similarity index 95%
rename from packages/backend/src/models/entities/ClipFavorite.ts
rename to packages/backend/src/models/ClipFavorite.ts
index 74d765411d..054764389b 100644
--- a/packages/backend/src/models/entities/ClipFavorite.ts
+++ b/packages/backend/src/models/ClipFavorite.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
import { MiClip } from './Clip.js';
diff --git a/packages/backend/src/models/entities/ClipNote.ts b/packages/backend/src/models/ClipNote.ts
similarity index 95%
rename from packages/backend/src/models/entities/ClipNote.ts
rename to packages/backend/src/models/ClipNote.ts
index ed5458864f..b7cc5ee39b 100644
--- a/packages/backend/src/models/entities/ClipNote.ts
+++ b/packages/backend/src/models/ClipNote.ts
@@ -4,7 +4,7 @@
*/
import { Entity, Index, JoinColumn, Column, ManyToOne, PrimaryColumn } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiNote } from './Note.js';
import { MiClip } from './Clip.js';
diff --git a/packages/backend/src/models/entities/DriveFile.ts b/packages/backend/src/models/DriveFile.ts
similarity index 99%
rename from packages/backend/src/models/entities/DriveFile.ts
rename to packages/backend/src/models/DriveFile.ts
index 55d6a9826c..c12f0e0f02 100644
--- a/packages/backend/src/models/entities/DriveFile.ts
+++ b/packages/backend/src/models/DriveFile.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
import { MiDriveFolder } from './DriveFolder.js';
diff --git a/packages/backend/src/models/entities/DriveFolder.ts b/packages/backend/src/models/DriveFolder.ts
similarity index 96%
rename from packages/backend/src/models/entities/DriveFolder.ts
rename to packages/backend/src/models/DriveFolder.ts
index 614974af13..3e049136bd 100644
--- a/packages/backend/src/models/entities/DriveFolder.ts
+++ b/packages/backend/src/models/DriveFolder.ts
@@ -4,7 +4,7 @@
*/
import { JoinColumn, ManyToOne, Entity, PrimaryColumn, Index, Column } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
@Entity('drive_folder')
diff --git a/packages/backend/src/models/entities/Emoji.ts b/packages/backend/src/models/Emoji.ts
similarity index 97%
rename from packages/backend/src/models/entities/Emoji.ts
rename to packages/backend/src/models/Emoji.ts
index a3ae1f2580..563ac1d9d3 100644
--- a/packages/backend/src/models/entities/Emoji.ts
+++ b/packages/backend/src/models/Emoji.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, Column } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
@Entity('emoji')
@Index(['name', 'host'], { unique: true })
diff --git a/packages/backend/src/models/entities/Flash.ts b/packages/backend/src/models/Flash.ts
similarity index 97%
rename from packages/backend/src/models/entities/Flash.ts
rename to packages/backend/src/models/Flash.ts
index 38e023332e..185063029d 100644
--- a/packages/backend/src/models/entities/Flash.ts
+++ b/packages/backend/src/models/Flash.ts
@@ -4,7 +4,7 @@
*/
import { Entity, Index, JoinColumn, Column, PrimaryColumn, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
@Entity('flash')
diff --git a/packages/backend/src/models/entities/FlashLike.ts b/packages/backend/src/models/FlashLike.ts
similarity index 95%
rename from packages/backend/src/models/entities/FlashLike.ts
rename to packages/backend/src/models/FlashLike.ts
index 9486be3ea6..7c66010ae6 100644
--- a/packages/backend/src/models/entities/FlashLike.ts
+++ b/packages/backend/src/models/FlashLike.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
import { MiFlash } from './Flash.js';
diff --git a/packages/backend/src/models/entities/FollowRequest.ts b/packages/backend/src/models/FollowRequest.ts
similarity index 98%
rename from packages/backend/src/models/entities/FollowRequest.ts
rename to packages/backend/src/models/FollowRequest.ts
index 28385931b7..769b9a6cb5 100644
--- a/packages/backend/src/models/entities/FollowRequest.ts
+++ b/packages/backend/src/models/FollowRequest.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
@Entity('follow_request')
diff --git a/packages/backend/src/models/entities/Following.ts b/packages/backend/src/models/Following.ts
similarity index 98%
rename from packages/backend/src/models/entities/Following.ts
rename to packages/backend/src/models/Following.ts
index df509cf944..05b729412f 100644
--- a/packages/backend/src/models/entities/Following.ts
+++ b/packages/backend/src/models/Following.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
@Entity('following')
diff --git a/packages/backend/src/models/entities/GalleryLike.ts b/packages/backend/src/models/GalleryLike.ts
similarity index 95%
rename from packages/backend/src/models/entities/GalleryLike.ts
rename to packages/backend/src/models/GalleryLike.ts
index 40aeeaad0c..b5f71764aa 100644
--- a/packages/backend/src/models/entities/GalleryLike.ts
+++ b/packages/backend/src/models/GalleryLike.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
import { MiGalleryPost } from './GalleryPost.js';
diff --git a/packages/backend/src/models/entities/GalleryPost.ts b/packages/backend/src/models/GalleryPost.ts
similarity index 97%
rename from packages/backend/src/models/entities/GalleryPost.ts
rename to packages/backend/src/models/GalleryPost.ts
index 777fe942e1..4c6063f32b 100644
--- a/packages/backend/src/models/entities/GalleryPost.ts
+++ b/packages/backend/src/models/GalleryPost.ts
@@ -4,7 +4,7 @@
*/
import { Entity, Index, JoinColumn, Column, PrimaryColumn, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
import type { MiDriveFile } from './DriveFile.js';
diff --git a/packages/backend/src/models/entities/Hashtag.ts b/packages/backend/src/models/Hashtag.ts
similarity index 97%
rename from packages/backend/src/models/entities/Hashtag.ts
rename to packages/backend/src/models/Hashtag.ts
index 30fea91b7d..1493774752 100644
--- a/packages/backend/src/models/entities/Hashtag.ts
+++ b/packages/backend/src/models/Hashtag.ts
@@ -4,7 +4,7 @@
*/
import { Entity, PrimaryColumn, Index, Column } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import type { MiUser } from './User.js';
@Entity('hashtag')
diff --git a/packages/backend/src/models/entities/Instance.ts b/packages/backend/src/models/Instance.ts
similarity index 98%
rename from packages/backend/src/models/entities/Instance.ts
rename to packages/backend/src/models/Instance.ts
index 8c562ffa80..b225d918d6 100644
--- a/packages/backend/src/models/entities/Instance.ts
+++ b/packages/backend/src/models/Instance.ts
@@ -4,7 +4,7 @@
*/
import { Entity, PrimaryColumn, Index, Column } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
@Entity('instance')
export class MiInstance {
diff --git a/packages/backend/src/models/entities/Meta.ts b/packages/backend/src/models/Meta.ts
similarity index 99%
rename from packages/backend/src/models/entities/Meta.ts
rename to packages/backend/src/models/Meta.ts
index 4bb77b792d..a9e116341f 100644
--- a/packages/backend/src/models/entities/Meta.ts
+++ b/packages/backend/src/models/Meta.ts
@@ -4,7 +4,7 @@
*/
import { Entity, Column, PrimaryColumn, ManyToOne, JoinColumn } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
@Entity('meta')
diff --git a/packages/backend/src/models/entities/ModerationLog.ts b/packages/backend/src/models/ModerationLog.ts
similarity index 95%
rename from packages/backend/src/models/entities/ModerationLog.ts
rename to packages/backend/src/models/ModerationLog.ts
index 027645de6b..a12b6ab614 100644
--- a/packages/backend/src/models/entities/ModerationLog.ts
+++ b/packages/backend/src/models/ModerationLog.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
@Entity('moderation_log')
diff --git a/packages/backend/src/models/entities/MutedNote.ts b/packages/backend/src/models/MutedNote.ts
similarity index 92%
rename from packages/backend/src/models/entities/MutedNote.ts
rename to packages/backend/src/models/MutedNote.ts
index d33af90a97..89a678a2a7 100644
--- a/packages/backend/src/models/entities/MutedNote.ts
+++ b/packages/backend/src/models/MutedNote.ts
@@ -4,8 +4,8 @@
*/
import { Entity, Index, JoinColumn, Column, ManyToOne, PrimaryColumn } from 'typeorm';
-import { id } from '../id.js';
-import { mutedNoteReasons } from '../../types.js';
+import { mutedNoteReasons } from '@/types.js';
+import { id } from './util/id.js';
import { MiNote } from './Note.js';
import { MiUser } from './User.js';
diff --git a/packages/backend/src/models/entities/Muting.ts b/packages/backend/src/models/Muting.ts
similarity index 96%
rename from packages/backend/src/models/entities/Muting.ts
rename to packages/backend/src/models/Muting.ts
index b1f12f0118..2f06ca8e5e 100644
--- a/packages/backend/src/models/entities/Muting.ts
+++ b/packages/backend/src/models/Muting.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
@Entity('muting')
diff --git a/packages/backend/src/models/entities/Note.ts b/packages/backend/src/models/Note.ts
similarity index 98%
rename from packages/backend/src/models/entities/Note.ts
rename to packages/backend/src/models/Note.ts
index effc1509e5..ed86d4549e 100644
--- a/packages/backend/src/models/entities/Note.ts
+++ b/packages/backend/src/models/Note.ts
@@ -4,8 +4,8 @@
*/
import { Entity, Index, JoinColumn, Column, PrimaryColumn, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
-import { noteVisibilities } from '../../types.js';
+import { noteVisibilities } from '@/types.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
import { MiChannel } from './Channel.js';
import type { MiDriveFile } from './DriveFile.js';
diff --git a/packages/backend/src/models/entities/NoteFavorite.ts b/packages/backend/src/models/NoteFavorite.ts
similarity index 96%
rename from packages/backend/src/models/entities/NoteFavorite.ts
rename to packages/backend/src/models/NoteFavorite.ts
index 1b637e6b92..1171684bcf 100644
--- a/packages/backend/src/models/entities/NoteFavorite.ts
+++ b/packages/backend/src/models/NoteFavorite.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiNote } from './Note.js';
import { MiUser } from './User.js';
diff --git a/packages/backend/src/models/entities/NoteReaction.ts b/packages/backend/src/models/NoteReaction.ts
similarity index 96%
rename from packages/backend/src/models/entities/NoteReaction.ts
rename to packages/backend/src/models/NoteReaction.ts
index 19511abd12..7c08d31c6d 100644
--- a/packages/backend/src/models/entities/NoteReaction.ts
+++ b/packages/backend/src/models/NoteReaction.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
import { MiNote } from './Note.js';
diff --git a/packages/backend/src/models/entities/NoteThreadMuting.ts b/packages/backend/src/models/NoteThreadMuting.ts
similarity index 95%
rename from packages/backend/src/models/entities/NoteThreadMuting.ts
rename to packages/backend/src/models/NoteThreadMuting.ts
index d8ccbe0f74..2d120e4c25 100644
--- a/packages/backend/src/models/entities/NoteThreadMuting.ts
+++ b/packages/backend/src/models/NoteThreadMuting.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
@Entity('note_thread_muting')
diff --git a/packages/backend/src/models/entities/NoteUnread.ts b/packages/backend/src/models/NoteUnread.ts
similarity index 97%
rename from packages/backend/src/models/entities/NoteUnread.ts
rename to packages/backend/src/models/NoteUnread.ts
index 0f111cc1b0..d86a474553 100644
--- a/packages/backend/src/models/entities/NoteUnread.ts
+++ b/packages/backend/src/models/NoteUnread.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
import { MiNote } from './Note.js';
import type { MiChannel } from './Channel.js';
diff --git a/packages/backend/src/models/entities/Notification.ts b/packages/backend/src/models/Notification.ts
similarity index 100%
rename from packages/backend/src/models/entities/Notification.ts
rename to packages/backend/src/models/Notification.ts
diff --git a/packages/backend/src/models/entities/Page.ts b/packages/backend/src/models/Page.ts
similarity index 98%
rename from packages/backend/src/models/entities/Page.ts
rename to packages/backend/src/models/Page.ts
index 30131af85c..3cb986f4ee 100644
--- a/packages/backend/src/models/entities/Page.ts
+++ b/packages/backend/src/models/Page.ts
@@ -4,7 +4,7 @@
*/
import { Entity, Index, JoinColumn, Column, PrimaryColumn, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
import { MiDriveFile } from './DriveFile.js';
diff --git a/packages/backend/src/models/entities/PageLike.ts b/packages/backend/src/models/PageLike.ts
similarity index 95%
rename from packages/backend/src/models/entities/PageLike.ts
rename to packages/backend/src/models/PageLike.ts
index 36f5177cff..92adf9bcc2 100644
--- a/packages/backend/src/models/entities/PageLike.ts
+++ b/packages/backend/src/models/PageLike.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
import { MiPage } from './Page.js';
diff --git a/packages/backend/src/models/entities/PasswordResetRequest.ts b/packages/backend/src/models/PasswordResetRequest.ts
similarity index 95%
rename from packages/backend/src/models/entities/PasswordResetRequest.ts
rename to packages/backend/src/models/PasswordResetRequest.ts
index 4c608d979c..79f2e984b8 100644
--- a/packages/backend/src/models/entities/PasswordResetRequest.ts
+++ b/packages/backend/src/models/PasswordResetRequest.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, Column, ManyToOne, JoinColumn } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
@Entity('password_reset_request')
diff --git a/packages/backend/src/models/entities/Poll.ts b/packages/backend/src/models/Poll.ts
similarity index 94%
rename from packages/backend/src/models/entities/Poll.ts
rename to packages/backend/src/models/Poll.ts
index 557fd1be11..5ce0b9a2fc 100644
--- a/packages/backend/src/models/entities/Poll.ts
+++ b/packages/backend/src/models/Poll.ts
@@ -4,8 +4,8 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, OneToOne } from 'typeorm';
-import { id } from '../id.js';
-import { noteVisibilities } from '../../types.js';
+import { noteVisibilities } from '@/types.js';
+import { id } from './util/id.js';
import { MiNote } from './Note.js';
import type { MiUser } from './User.js';
diff --git a/packages/backend/src/models/entities/PollVote.ts b/packages/backend/src/models/PollVote.ts
similarity index 96%
rename from packages/backend/src/models/entities/PollVote.ts
rename to packages/backend/src/models/PollVote.ts
index 5070ab16c0..37cd55fc18 100644
--- a/packages/backend/src/models/entities/PollVote.ts
+++ b/packages/backend/src/models/PollVote.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
import { MiNote } from './Note.js';
diff --git a/packages/backend/src/models/entities/PromoNote.ts b/packages/backend/src/models/PromoNote.ts
similarity index 95%
rename from packages/backend/src/models/entities/PromoNote.ts
rename to packages/backend/src/models/PromoNote.ts
index 9daf915b51..f4425fe88b 100644
--- a/packages/backend/src/models/entities/PromoNote.ts
+++ b/packages/backend/src/models/PromoNote.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, OneToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiNote } from './Note.js';
import type { MiUser } from './User.js';
diff --git a/packages/backend/src/models/entities/PromoRead.ts b/packages/backend/src/models/PromoRead.ts
similarity index 95%
rename from packages/backend/src/models/entities/PromoRead.ts
rename to packages/backend/src/models/PromoRead.ts
index 83a12858e8..09ebfc8346 100644
--- a/packages/backend/src/models/entities/PromoRead.ts
+++ b/packages/backend/src/models/PromoRead.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiNote } from './Note.js';
import { MiUser } from './User.js';
diff --git a/packages/backend/src/models/entities/RegistrationTicket.ts b/packages/backend/src/models/RegistrationTicket.ts
similarity index 97%
rename from packages/backend/src/models/entities/RegistrationTicket.ts
rename to packages/backend/src/models/RegistrationTicket.ts
index 2b1c541a28..d94f465916 100644
--- a/packages/backend/src/models/entities/RegistrationTicket.ts
+++ b/packages/backend/src/models/RegistrationTicket.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, Column, ManyToOne, JoinColumn, OneToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
@Entity('registration_ticket')
diff --git a/packages/backend/src/models/entities/RegistryItem.ts b/packages/backend/src/models/RegistryItem.ts
similarity index 97%
rename from packages/backend/src/models/entities/RegistryItem.ts
rename to packages/backend/src/models/RegistryItem.ts
index fdfa4212d0..fdce57c467 100644
--- a/packages/backend/src/models/entities/RegistryItem.ts
+++ b/packages/backend/src/models/RegistryItem.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
// TODO: 同じdomain、同じscope、同じkeyのレコードは二つ以上存在しないように制約付けたい
diff --git a/packages/backend/src/models/entities/Relay.ts b/packages/backend/src/models/Relay.ts
similarity index 93%
rename from packages/backend/src/models/entities/Relay.ts
rename to packages/backend/src/models/Relay.ts
index f73ab193a6..293fccecfc 100644
--- a/packages/backend/src/models/entities/Relay.ts
+++ b/packages/backend/src/models/Relay.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, Column } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
@Entity('relay')
export class MiRelay {
diff --git a/packages/backend/src/models/entities/RenoteMuting.ts b/packages/backend/src/models/RenoteMuting.ts
similarity index 96%
rename from packages/backend/src/models/entities/RenoteMuting.ts
rename to packages/backend/src/models/RenoteMuting.ts
index fc87b82b7d..d2a36249dc 100644
--- a/packages/backend/src/models/entities/RenoteMuting.ts
+++ b/packages/backend/src/models/RenoteMuting.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
@Entity('renote_muting')
diff --git a/packages/backend/src/models/entities/RetentionAggregation.ts b/packages/backend/src/models/RetentionAggregation.ts
similarity index 96%
rename from packages/backend/src/models/entities/RetentionAggregation.ts
rename to packages/backend/src/models/RetentionAggregation.ts
index 7d7874a601..9da401597c 100644
--- a/packages/backend/src/models/entities/RetentionAggregation.ts
+++ b/packages/backend/src/models/RetentionAggregation.ts
@@ -4,7 +4,7 @@
*/
import { Entity, PrimaryColumn, Index, Column } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import type { MiUser } from './User.js';
@Entity('retention_aggregation')
diff --git a/packages/backend/src/models/entities/Role.ts b/packages/backend/src/models/Role.ts
similarity index 99%
rename from packages/backend/src/models/entities/Role.ts
rename to packages/backend/src/models/Role.ts
index 52e1f0c347..df7541db3d 100644
--- a/packages/backend/src/models/entities/Role.ts
+++ b/packages/backend/src/models/Role.ts
@@ -4,7 +4,7 @@
*/
import { Entity, Column, PrimaryColumn } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
type CondFormulaValueAnd = {
type: 'and';
diff --git a/packages/backend/src/models/entities/RoleAssignment.ts b/packages/backend/src/models/RoleAssignment.ts
similarity index 96%
rename from packages/backend/src/models/entities/RoleAssignment.ts
rename to packages/backend/src/models/RoleAssignment.ts
index 5a2dacb91a..4e5322c60b 100644
--- a/packages/backend/src/models/entities/RoleAssignment.ts
+++ b/packages/backend/src/models/RoleAssignment.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiRole } from './Role.js';
import { MiUser } from './User.js';
diff --git a/packages/backend/src/models/entities/Signin.ts b/packages/backend/src/models/Signin.ts
similarity index 95%
rename from packages/backend/src/models/entities/Signin.ts
rename to packages/backend/src/models/Signin.ts
index 709a998889..a8b1a45c53 100644
--- a/packages/backend/src/models/entities/Signin.ts
+++ b/packages/backend/src/models/Signin.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
@Entity('signin')
diff --git a/packages/backend/src/models/entities/SwSubscription.ts b/packages/backend/src/models/SwSubscription.ts
similarity index 96%
rename from packages/backend/src/models/entities/SwSubscription.ts
rename to packages/backend/src/models/SwSubscription.ts
index 9c3f97cf99..be1e4e3687 100644
--- a/packages/backend/src/models/entities/SwSubscription.ts
+++ b/packages/backend/src/models/SwSubscription.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
@Entity('sw_subscription')
diff --git a/packages/backend/src/models/entities/UsedUsername.ts b/packages/backend/src/models/UsedUsername.ts
similarity index 100%
rename from packages/backend/src/models/entities/UsedUsername.ts
rename to packages/backend/src/models/UsedUsername.ts
diff --git a/packages/backend/src/models/entities/User.ts b/packages/backend/src/models/User.ts
similarity index 99%
rename from packages/backend/src/models/entities/User.ts
rename to packages/backend/src/models/User.ts
index 9db141becf..b040d302ce 100644
--- a/packages/backend/src/models/entities/User.ts
+++ b/packages/backend/src/models/User.ts
@@ -4,7 +4,7 @@
*/
import { Entity, Column, Index, OneToOne, JoinColumn, PrimaryColumn } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiDriveFile } from './DriveFile.js';
@Entity('user')
diff --git a/packages/backend/src/models/entities/UserIp.ts b/packages/backend/src/models/UserIp.ts
similarity index 94%
rename from packages/backend/src/models/entities/UserIp.ts
rename to packages/backend/src/models/UserIp.ts
index 8384984e6b..60a7bc8b01 100644
--- a/packages/backend/src/models/entities/UserIp.ts
+++ b/packages/backend/src/models/UserIp.ts
@@ -4,7 +4,7 @@
*/
import { Entity, Index, Column, PrimaryGeneratedColumn } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import type { MiUser } from './User.js';
@Entity('user_ip')
diff --git a/packages/backend/src/models/entities/UserKeypair.ts b/packages/backend/src/models/UserKeypair.ts
similarity index 95%
rename from packages/backend/src/models/entities/UserKeypair.ts
rename to packages/backend/src/models/UserKeypair.ts
index c9ea7d11f8..a316dbaeb4 100644
--- a/packages/backend/src/models/entities/UserKeypair.ts
+++ b/packages/backend/src/models/UserKeypair.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, JoinColumn, Column, OneToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
@Entity('user_keypair')
diff --git a/packages/backend/src/models/entities/UserList.ts b/packages/backend/src/models/UserList.ts
similarity index 95%
rename from packages/backend/src/models/entities/UserList.ts
rename to packages/backend/src/models/UserList.ts
index a6216b5670..9af85af97e 100644
--- a/packages/backend/src/models/entities/UserList.ts
+++ b/packages/backend/src/models/UserList.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
@Entity('user_list')
diff --git a/packages/backend/src/models/entities/UserListFavorite.ts b/packages/backend/src/models/UserListFavorite.ts
similarity index 95%
rename from packages/backend/src/models/entities/UserListFavorite.ts
rename to packages/backend/src/models/UserListFavorite.ts
index f3c4c1a4d8..d0b054b932 100644
--- a/packages/backend/src/models/entities/UserListFavorite.ts
+++ b/packages/backend/src/models/UserListFavorite.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
import { MiUserList } from './UserList.js';
diff --git a/packages/backend/src/models/entities/UserListJoining.ts b/packages/backend/src/models/UserListJoining.ts
similarity index 96%
rename from packages/backend/src/models/entities/UserListJoining.ts
rename to packages/backend/src/models/UserListJoining.ts
index e4912024c1..4918f2f700 100644
--- a/packages/backend/src/models/entities/UserListJoining.ts
+++ b/packages/backend/src/models/UserListJoining.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
import { MiUserList } from './UserList.js';
diff --git a/packages/backend/src/models/entities/UserMemo.ts b/packages/backend/src/models/UserMemo.ts
similarity index 96%
rename from packages/backend/src/models/entities/UserMemo.ts
rename to packages/backend/src/models/UserMemo.ts
index 9b89080509..ab5e812c44 100644
--- a/packages/backend/src/models/entities/UserMemo.ts
+++ b/packages/backend/src/models/UserMemo.ts
@@ -4,7 +4,7 @@
*/
import { Column, Entity, Index, JoinColumn, ManyToOne, PrimaryColumn } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
@Entity('user_memo')
diff --git a/packages/backend/src/models/entities/UserNotePining.ts b/packages/backend/src/models/UserNotePining.ts
similarity index 96%
rename from packages/backend/src/models/entities/UserNotePining.ts
rename to packages/backend/src/models/UserNotePining.ts
index 95bcb158b6..1d50a5068e 100644
--- a/packages/backend/src/models/entities/UserNotePining.ts
+++ b/packages/backend/src/models/UserNotePining.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiNote } from './Note.js';
import { MiUser } from './User.js';
diff --git a/packages/backend/src/models/entities/UserPending.ts b/packages/backend/src/models/UserPending.ts
similarity index 94%
rename from packages/backend/src/models/entities/UserPending.ts
rename to packages/backend/src/models/UserPending.ts
index 8c9e01e59c..b15ededa14 100644
--- a/packages/backend/src/models/entities/UserPending.ts
+++ b/packages/backend/src/models/UserPending.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, Column } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
@Entity('user_pending')
export class MiUserPending {
diff --git a/packages/backend/src/models/entities/UserProfile.ts b/packages/backend/src/models/UserProfile.ts
similarity index 99%
rename from packages/backend/src/models/entities/UserProfile.ts
rename to packages/backend/src/models/UserProfile.ts
index 0fd26f4d63..6c7ffe4c39 100644
--- a/packages/backend/src/models/entities/UserProfile.ts
+++ b/packages/backend/src/models/UserProfile.ts
@@ -5,7 +5,7 @@
import { Entity, Column, Index, OneToOne, JoinColumn, PrimaryColumn } from 'typeorm';
import { obsoleteNotificationTypes, ffVisibility, notificationTypes } from '@/types.js';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
import { MiPage } from './Page.js';
diff --git a/packages/backend/src/models/entities/UserPublickey.ts b/packages/backend/src/models/UserPublickey.ts
similarity index 95%
rename from packages/backend/src/models/entities/UserPublickey.ts
rename to packages/backend/src/models/UserPublickey.ts
index afa37cf7ea..33de73c636 100644
--- a/packages/backend/src/models/entities/UserPublickey.ts
+++ b/packages/backend/src/models/UserPublickey.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, OneToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
@Entity('user_publickey')
diff --git a/packages/backend/src/models/entities/UserSecurityKey.ts b/packages/backend/src/models/UserSecurityKey.ts
similarity index 98%
rename from packages/backend/src/models/entities/UserSecurityKey.ts
rename to packages/backend/src/models/UserSecurityKey.ts
index 96dd27d083..02c29bfbb5 100644
--- a/packages/backend/src/models/entities/UserSecurityKey.ts
+++ b/packages/backend/src/models/UserSecurityKey.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, JoinColumn, Column, ManyToOne, Index } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
@Entity('user_security_key')
diff --git a/packages/backend/src/models/entities/Webhook.ts b/packages/backend/src/models/Webhook.ts
similarity index 97%
rename from packages/backend/src/models/entities/Webhook.ts
rename to packages/backend/src/models/Webhook.ts
index f08d15825a..5b009c18a6 100644
--- a/packages/backend/src/models/entities/Webhook.ts
+++ b/packages/backend/src/models/Webhook.ts
@@ -4,7 +4,7 @@
*/
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
-import { id } from '../id.js';
+import { id } from './util/id.js';
import { MiUser } from './User.js';
export const webhookEventTypes = ['mention', 'unfollow', 'follow', 'followed', 'note', 'reply', 'renote', 'reaction'] as const;
diff --git a/packages/backend/src/models/_.ts b/packages/backend/src/models/_.ts
index e4f4dce7d6..6be7bd0df6 100644
--- a/packages/backend/src/models/_.ts
+++ b/packages/backend/src/models/_.ts
@@ -3,71 +3,71 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
-import { MiAbuseUserReport } from '@/models/entities/AbuseUserReport.js';
-import { MiAccessToken } from '@/models/entities/AccessToken.js';
-import { MiAd } from '@/models/entities/Ad.js';
-import { MiAnnouncement } from '@/models/entities/Announcement.js';
-import { MiAnnouncementRead } from '@/models/entities/AnnouncementRead.js';
-import { MiAntenna } from '@/models/entities/Antenna.js';
-import { MiApp } from '@/models/entities/App.js';
-import { MiAuthSession } from '@/models/entities/AuthSession.js';
-import { MiBlocking } from '@/models/entities/Blocking.js';
-import { MiChannelFollowing } from '@/models/entities/ChannelFollowing.js';
-import { MiChannelFavorite } from '@/models/entities/ChannelFavorite.js';
-import { MiClip } from '@/models/entities/Clip.js';
-import { MiClipNote } from '@/models/entities/ClipNote.js';
-import { MiClipFavorite } from '@/models/entities/ClipFavorite.js';
-import { MiDriveFile } from '@/models/entities/DriveFile.js';
-import { MiDriveFolder } from '@/models/entities/DriveFolder.js';
-import { MiEmoji } from '@/models/entities/Emoji.js';
-import { MiFollowing } from '@/models/entities/Following.js';
-import { MiFollowRequest } from '@/models/entities/FollowRequest.js';
-import { MiGalleryLike } from '@/models/entities/GalleryLike.js';
-import { MiGalleryPost } from '@/models/entities/GalleryPost.js';
-import { MiHashtag } from '@/models/entities/Hashtag.js';
-import { MiInstance } from '@/models/entities/Instance.js';
-import { MiMeta } from '@/models/entities/Meta.js';
-import { MiModerationLog } from '@/models/entities/ModerationLog.js';
-import { MiMutedNote } from '@/models/entities/MutedNote.js';
-import { MiMuting } from '@/models/entities/Muting.js';
-import { MiRenoteMuting } from '@/models/entities/RenoteMuting.js';
-import { MiNote } from '@/models/entities/Note.js';
-import { MiNoteFavorite } from '@/models/entities/NoteFavorite.js';
-import { MiNoteReaction } from '@/models/entities/NoteReaction.js';
-import { MiNoteThreadMuting } from '@/models/entities/NoteThreadMuting.js';
-import { MiNoteUnread } from '@/models/entities/NoteUnread.js';
-import { MiPage } from '@/models/entities/Page.js';
-import { MiPageLike } from '@/models/entities/PageLike.js';
-import { MiPasswordResetRequest } from '@/models/entities/PasswordResetRequest.js';
-import { MiPoll } from '@/models/entities/Poll.js';
-import { MiPollVote } from '@/models/entities/PollVote.js';
-import { MiPromoNote } from '@/models/entities/PromoNote.js';
-import { MiPromoRead } from '@/models/entities/PromoRead.js';
-import { MiRegistrationTicket } from '@/models/entities/RegistrationTicket.js';
-import { MiRegistryItem } from '@/models/entities/RegistryItem.js';
-import { MiRelay } from '@/models/entities/Relay.js';
-import { MiSignin } from '@/models/entities/Signin.js';
-import { MiSwSubscription } from '@/models/entities/SwSubscription.js';
-import { MiUsedUsername } from '@/models/entities/UsedUsername.js';
-import { MiUser } from '@/models/entities/User.js';
-import { MiUserIp } from '@/models/entities/UserIp.js';
-import { MiUserKeypair } from '@/models/entities/UserKeypair.js';
-import { MiUserList } from '@/models/entities/UserList.js';
-import { MiUserListJoining } from '@/models/entities/UserListJoining.js';
-import { MiUserNotePining } from '@/models/entities/UserNotePining.js';
-import { MiUserPending } from '@/models/entities/UserPending.js';
-import { MiUserProfile } from '@/models/entities/UserProfile.js';
-import { MiUserPublickey } from '@/models/entities/UserPublickey.js';
-import { MiUserSecurityKey } from '@/models/entities/UserSecurityKey.js';
-import { MiUserMemo } from '@/models/entities/UserMemo.js';
-import { MiWebhook } from '@/models/entities/Webhook.js';
-import { MiChannel } from '@/models/entities/Channel.js';
-import { MiRetentionAggregation } from '@/models/entities/RetentionAggregation.js';
-import { MiRole } from '@/models/entities/Role.js';
-import { MiRoleAssignment } from '@/models/entities/RoleAssignment.js';
-import { MiFlash } from '@/models/entities/Flash.js';
-import { MiFlashLike } from '@/models/entities/FlashLike.js';
-import { MiUserListFavorite } from './entities/UserListFavorite.js';
+import { MiAbuseUserReport } from '@/models/AbuseUserReport.js';
+import { MiAccessToken } from '@/models/AccessToken.js';
+import { MiAd } from '@/models/Ad.js';
+import { MiAnnouncement } from '@/models/Announcement.js';
+import { MiAnnouncementRead } from '@/models/AnnouncementRead.js';
+import { MiAntenna } from '@/models/Antenna.js';
+import { MiApp } from '@/models/App.js';
+import { MiAuthSession } from '@/models/AuthSession.js';
+import { MiBlocking } from '@/models/Blocking.js';
+import { MiChannelFollowing } from '@/models/ChannelFollowing.js';
+import { MiChannelFavorite } from '@/models/ChannelFavorite.js';
+import { MiClip } from '@/models/Clip.js';
+import { MiClipNote } from '@/models/ClipNote.js';
+import { MiClipFavorite } from '@/models/ClipFavorite.js';
+import { MiDriveFile } from '@/models/DriveFile.js';
+import { MiDriveFolder } from '@/models/DriveFolder.js';
+import { MiEmoji } from '@/models/Emoji.js';
+import { MiFollowing } from '@/models/Following.js';
+import { MiFollowRequest } from '@/models/FollowRequest.js';
+import { MiGalleryLike } from '@/models/GalleryLike.js';
+import { MiGalleryPost } from '@/models/GalleryPost.js';
+import { MiHashtag } from '@/models/Hashtag.js';
+import { MiInstance } from '@/models/Instance.js';
+import { MiMeta } from '@/models/Meta.js';
+import { MiModerationLog } from '@/models/ModerationLog.js';
+import { MiMutedNote } from '@/models/MutedNote.js';
+import { MiMuting } from '@/models/Muting.js';
+import { MiRenoteMuting } from '@/models/RenoteMuting.js';
+import { MiNote } from '@/models/Note.js';
+import { MiNoteFavorite } from '@/models/NoteFavorite.js';
+import { MiNoteReaction } from '@/models/NoteReaction.js';
+import { MiNoteThreadMuting } from '@/models/NoteThreadMuting.js';
+import { MiNoteUnread } from '@/models/NoteUnread.js';
+import { MiPage } from '@/models/Page.js';
+import { MiPageLike } from '@/models/PageLike.js';
+import { MiPasswordResetRequest } from '@/models/PasswordResetRequest.js';
+import { MiPoll } from '@/models/Poll.js';
+import { MiPollVote } from '@/models/PollVote.js';
+import { MiPromoNote } from '@/models/PromoNote.js';
+import { MiPromoRead } from '@/models/PromoRead.js';
+import { MiRegistrationTicket } from '@/models/RegistrationTicket.js';
+import { MiRegistryItem } from '@/models/RegistryItem.js';
+import { MiRelay } from '@/models/Relay.js';
+import { MiSignin } from '@/models/Signin.js';
+import { MiSwSubscription } from '@/models/SwSubscription.js';
+import { MiUsedUsername } from '@/models/UsedUsername.js';
+import { MiUser } from '@/models/User.js';
+import { MiUserIp } from '@/models/UserIp.js';
+import { MiUserKeypair } from '@/models/UserKeypair.js';
+import { MiUserList } from '@/models/UserList.js';
+import { MiUserListJoining } from '@/models/UserListJoining.js';
+import { MiUserNotePining } from '@/models/UserNotePining.js';
+import { MiUserPending } from '@/models/UserPending.js';
+import { MiUserProfile } from '@/models/UserProfile.js';
+import { MiUserPublickey } from '@/models/UserPublickey.js';
+import { MiUserSecurityKey } from '@/models/UserSecurityKey.js';
+import { MiUserMemo } from '@/models/UserMemo.js';
+import { MiWebhook } from '@/models/Webhook.js';
+import { MiChannel } from '@/models/Channel.js';
+import { MiRetentionAggregation } from '@/models/RetentionAggregation.js';
+import { MiRole } from '@/models/Role.js';
+import { MiRoleAssignment } from '@/models/RoleAssignment.js';
+import { MiFlash } from '@/models/Flash.js';
+import { MiFlashLike } from '@/models/FlashLike.js';
+import { MiUserListFavorite } from '@/models/UserListFavorite.js';
import type { Repository } from 'typeorm';
export {
diff --git a/packages/backend/src/models/id.ts b/packages/backend/src/models/util/id.ts
similarity index 100%
rename from packages/backend/src/models/id.ts
rename to packages/backend/src/models/util/id.ts
diff --git a/packages/backend/src/postgres.ts b/packages/backend/src/postgres.ts
index c5d9e41463..10126eab2b 100644
--- a/packages/backend/src/postgres.ts
+++ b/packages/backend/src/postgres.ts
@@ -11,71 +11,71 @@ import { DataSource, Logger } from 'typeorm';
import * as highlight from 'cli-highlight';
import { entities as charts } from '@/core/chart/entities.js';
-import { MiAbuseUserReport } from '@/models/entities/AbuseUserReport.js';
-import { MiAccessToken } from '@/models/entities/AccessToken.js';
-import { MiAd } from '@/models/entities/Ad.js';
-import { MiAnnouncement } from '@/models/entities/Announcement.js';
-import { MiAnnouncementRead } from '@/models/entities/AnnouncementRead.js';
-import { MiAntenna } from '@/models/entities/Antenna.js';
-import { MiApp } from '@/models/entities/App.js';
-import { MiAuthSession } from '@/models/entities/AuthSession.js';
-import { MiBlocking } from '@/models/entities/Blocking.js';
-import { MiChannelFollowing } from '@/models/entities/ChannelFollowing.js';
-import { MiChannelFavorite } from '@/models/entities/ChannelFavorite.js';
-import { MiClip } from '@/models/entities/Clip.js';
-import { MiClipNote } from '@/models/entities/ClipNote.js';
-import { MiClipFavorite } from '@/models/entities/ClipFavorite.js';
-import { MiDriveFile } from '@/models/entities/DriveFile.js';
-import { MiDriveFolder } from '@/models/entities/DriveFolder.js';
-import { MiEmoji } from '@/models/entities/Emoji.js';
-import { MiFollowing } from '@/models/entities/Following.js';
-import { MiFollowRequest } from '@/models/entities/FollowRequest.js';
-import { MiGalleryLike } from '@/models/entities/GalleryLike.js';
-import { MiGalleryPost } from '@/models/entities/GalleryPost.js';
-import { MiHashtag } from '@/models/entities/Hashtag.js';
-import { MiInstance } from '@/models/entities/Instance.js';
-import { MiMeta } from '@/models/entities/Meta.js';
-import { MiModerationLog } from '@/models/entities/ModerationLog.js';
-import { MiMutedNote } from '@/models/entities/MutedNote.js';
-import { MiMuting } from '@/models/entities/Muting.js';
-import { MiRenoteMuting } from '@/models/entities/RenoteMuting.js';
-import { MiNote } from '@/models/entities/Note.js';
-import { MiNoteFavorite } from '@/models/entities/NoteFavorite.js';
-import { MiNoteReaction } from '@/models/entities/NoteReaction.js';
-import { MiNoteThreadMuting } from '@/models/entities/NoteThreadMuting.js';
-import { MiNoteUnread } from '@/models/entities/NoteUnread.js';
-import { MiPage } from '@/models/entities/Page.js';
-import { MiPageLike } from '@/models/entities/PageLike.js';
-import { MiPasswordResetRequest } from '@/models/entities/PasswordResetRequest.js';
-import { MiPoll } from '@/models/entities/Poll.js';
-import { MiPollVote } from '@/models/entities/PollVote.js';
-import { MiPromoNote } from '@/models/entities/PromoNote.js';
-import { MiPromoRead } from '@/models/entities/PromoRead.js';
-import { MiRegistrationTicket } from '@/models/entities/RegistrationTicket.js';
-import { MiRegistryItem } from '@/models/entities/RegistryItem.js';
-import { MiRelay } from '@/models/entities/Relay.js';
-import { MiSignin } from '@/models/entities/Signin.js';
-import { MiSwSubscription } from '@/models/entities/SwSubscription.js';
-import { MiUsedUsername } from '@/models/entities/UsedUsername.js';
-import { MiUser } from '@/models/entities/User.js';
-import { MiUserIp } from '@/models/entities/UserIp.js';
-import { MiUserKeypair } from '@/models/entities/UserKeypair.js';
-import { MiUserList } from '@/models/entities/UserList.js';
-import { MiUserListFavorite } from '@/models/entities/UserListFavorite.js';
-import { MiUserListJoining } from '@/models/entities/UserListJoining.js';
-import { MiUserNotePining } from '@/models/entities/UserNotePining.js';
-import { MiUserPending } from '@/models/entities/UserPending.js';
-import { MiUserProfile } from '@/models/entities/UserProfile.js';
-import { MiUserPublickey } from '@/models/entities/UserPublickey.js';
-import { MiUserSecurityKey } from '@/models/entities/UserSecurityKey.js';
-import { MiWebhook } from '@/models/entities/Webhook.js';
-import { MiChannel } from '@/models/entities/Channel.js';
-import { MiRetentionAggregation } from '@/models/entities/RetentionAggregation.js';
-import { MiRole } from '@/models/entities/Role.js';
-import { MiRoleAssignment } from '@/models/entities/RoleAssignment.js';
-import { MiFlash } from '@/models/entities/Flash.js';
-import { MiFlashLike } from '@/models/entities/FlashLike.js';
-import { MiUserMemo } from '@/models/entities/UserMemo.js';
+import { MiAbuseUserReport } from '@/models/AbuseUserReport.js';
+import { MiAccessToken } from '@/models/AccessToken.js';
+import { MiAd } from '@/models/Ad.js';
+import { MiAnnouncement } from '@/models/Announcement.js';
+import { MiAnnouncementRead } from '@/models/AnnouncementRead.js';
+import { MiAntenna } from '@/models/Antenna.js';
+import { MiApp } from '@/models/App.js';
+import { MiAuthSession } from '@/models/AuthSession.js';
+import { MiBlocking } from '@/models/Blocking.js';
+import { MiChannelFollowing } from '@/models/ChannelFollowing.js';
+import { MiChannelFavorite } from '@/models/ChannelFavorite.js';
+import { MiClip } from '@/models/Clip.js';
+import { MiClipNote } from '@/models/ClipNote.js';
+import { MiClipFavorite } from '@/models/ClipFavorite.js';
+import { MiDriveFile } from '@/models/DriveFile.js';
+import { MiDriveFolder } from '@/models/DriveFolder.js';
+import { MiEmoji } from '@/models/Emoji.js';
+import { MiFollowing } from '@/models/Following.js';
+import { MiFollowRequest } from '@/models/FollowRequest.js';
+import { MiGalleryLike } from '@/models/GalleryLike.js';
+import { MiGalleryPost } from '@/models/GalleryPost.js';
+import { MiHashtag } from '@/models/Hashtag.js';
+import { MiInstance } from '@/models/Instance.js';
+import { MiMeta } from '@/models/Meta.js';
+import { MiModerationLog } from '@/models/ModerationLog.js';
+import { MiMutedNote } from '@/models/MutedNote.js';
+import { MiMuting } from '@/models/Muting.js';
+import { MiRenoteMuting } from '@/models/RenoteMuting.js';
+import { MiNote } from '@/models/Note.js';
+import { MiNoteFavorite } from '@/models/NoteFavorite.js';
+import { MiNoteReaction } from '@/models/NoteReaction.js';
+import { MiNoteThreadMuting } from '@/models/NoteThreadMuting.js';
+import { MiNoteUnread } from '@/models/NoteUnread.js';
+import { MiPage } from '@/models/Page.js';
+import { MiPageLike } from '@/models/PageLike.js';
+import { MiPasswordResetRequest } from '@/models/PasswordResetRequest.js';
+import { MiPoll } from '@/models/Poll.js';
+import { MiPollVote } from '@/models/PollVote.js';
+import { MiPromoNote } from '@/models/PromoNote.js';
+import { MiPromoRead } from '@/models/PromoRead.js';
+import { MiRegistrationTicket } from '@/models/RegistrationTicket.js';
+import { MiRegistryItem } from '@/models/RegistryItem.js';
+import { MiRelay } from '@/models/Relay.js';
+import { MiSignin } from '@/models/Signin.js';
+import { MiSwSubscription } from '@/models/SwSubscription.js';
+import { MiUsedUsername } from '@/models/UsedUsername.js';
+import { MiUser } from '@/models/User.js';
+import { MiUserIp } from '@/models/UserIp.js';
+import { MiUserKeypair } from '@/models/UserKeypair.js';
+import { MiUserList } from '@/models/UserList.js';
+import { MiUserListFavorite } from '@/models/UserListFavorite.js';
+import { MiUserListJoining } from '@/models/UserListJoining.js';
+import { MiUserNotePining } from '@/models/UserNotePining.js';
+import { MiUserPending } from '@/models/UserPending.js';
+import { MiUserProfile } from '@/models/UserProfile.js';
+import { MiUserPublickey } from '@/models/UserPublickey.js';
+import { MiUserSecurityKey } from '@/models/UserSecurityKey.js';
+import { MiWebhook } from '@/models/Webhook.js';
+import { MiChannel } from '@/models/Channel.js';
+import { MiRetentionAggregation } from '@/models/RetentionAggregation.js';
+import { MiRole } from '@/models/Role.js';
+import { MiRoleAssignment } from '@/models/RoleAssignment.js';
+import { MiFlash } from '@/models/Flash.js';
+import { MiFlashLike } from '@/models/FlashLike.js';
+import { MiUserMemo } from '@/models/UserMemo.js';
import { Config } from '@/config.js';
import MisskeyLogger from '@/logger.js';
diff --git a/packages/backend/src/queue/processors/DeleteAccountProcessorService.ts b/packages/backend/src/queue/processors/DeleteAccountProcessorService.ts
index 5ffd8cea95..39967165d4 100644
--- a/packages/backend/src/queue/processors/DeleteAccountProcessorService.ts
+++ b/packages/backend/src/queue/processors/DeleteAccountProcessorService.ts
@@ -9,8 +9,8 @@ import { DI } from '@/di-symbols.js';
import type { DriveFilesRepository, NotesRepository, UserProfilesRepository, UsersRepository } from '@/models/_.js';
import type Logger from '@/logger.js';
import { DriveService } from '@/core/DriveService.js';
-import type { MiDriveFile } from '@/models/entities/DriveFile.js';
-import type { MiNote } from '@/models/entities/Note.js';
+import type { MiDriveFile } from '@/models/DriveFile.js';
+import type { MiNote } from '@/models/Note.js';
import { EmailService } from '@/core/EmailService.js';
import { bindThis } from '@/decorators.js';
import { SearchService } from '@/core/SearchService.js';
diff --git a/packages/backend/src/queue/processors/DeliverProcessorService.ts b/packages/backend/src/queue/processors/DeliverProcessorService.ts
index f600bb25c0..4a1d9f28b4 100644
--- a/packages/backend/src/queue/processors/DeliverProcessorService.ts
+++ b/packages/backend/src/queue/processors/DeliverProcessorService.ts
@@ -13,7 +13,7 @@ import { ApRequestService } from '@/core/activitypub/ApRequestService.js';
import { FederatedInstanceService } from '@/core/FederatedInstanceService.js';
import { FetchInstanceMetadataService } from '@/core/FetchInstanceMetadataService.js';
import { MemorySingleCache } from '@/misc/cache.js';
-import type { MiInstance } from '@/models/entities/Instance.js';
+import type { MiInstance } from '@/models/Instance.js';
import InstanceChart from '@/core/chart/charts/instance.js';
import ApRequestChart from '@/core/chart/charts/ap-request.js';
import FederationChart from '@/core/chart/charts/federation.js';
diff --git a/packages/backend/src/queue/processors/ExportFavoritesProcessorService.ts b/packages/backend/src/queue/processors/ExportFavoritesProcessorService.ts
index 68aaf10388..7248c7a649 100644
--- a/packages/backend/src/queue/processors/ExportFavoritesProcessorService.ts
+++ b/packages/backend/src/queue/processors/ExportFavoritesProcessorService.ts
@@ -12,8 +12,8 @@ import type { MiNoteFavorite, NoteFavoritesRepository, PollsRepository, MiUser,
import type Logger from '@/logger.js';
import { DriveService } from '@/core/DriveService.js';
import { createTemp } from '@/misc/create-temp.js';
-import type { MiPoll } from '@/models/entities/Poll.js';
-import type { MiNote } from '@/models/entities/Note.js';
+import type { MiPoll } from '@/models/Poll.js';
+import type { MiNote } from '@/models/Note.js';
import { bindThis } from '@/decorators.js';
import { QueueLoggerService } from '../QueueLoggerService.js';
import type * as Bull from 'bullmq';
diff --git a/packages/backend/src/queue/processors/ExportFollowingProcessorService.ts b/packages/backend/src/queue/processors/ExportFollowingProcessorService.ts
index 1aec36d6de..c9739eb1cb 100644
--- a/packages/backend/src/queue/processors/ExportFollowingProcessorService.ts
+++ b/packages/backend/src/queue/processors/ExportFollowingProcessorService.ts
@@ -12,7 +12,7 @@ import type { UsersRepository, FollowingsRepository, MutingsRepository } from '@
import type Logger from '@/logger.js';
import { DriveService } from '@/core/DriveService.js';
import { createTemp } from '@/misc/create-temp.js';
-import type { MiFollowing } from '@/models/entities/Following.js';
+import type { MiFollowing } from '@/models/Following.js';
import { UtilityService } from '@/core/UtilityService.js';
import { bindThis } from '@/decorators.js';
import { QueueLoggerService } from '../QueueLoggerService.js';
diff --git a/packages/backend/src/queue/processors/ExportNotesProcessorService.ts b/packages/backend/src/queue/processors/ExportNotesProcessorService.ts
index 2c6d2f04d8..e0bc80e190 100644
--- a/packages/backend/src/queue/processors/ExportNotesProcessorService.ts
+++ b/packages/backend/src/queue/processors/ExportNotesProcessorService.ts
@@ -12,8 +12,8 @@ import type { NotesRepository, PollsRepository, UsersRepository } from '@/models
import type Logger from '@/logger.js';
import { DriveService } from '@/core/DriveService.js';
import { createTemp } from '@/misc/create-temp.js';
-import type { MiPoll } from '@/models/entities/Poll.js';
-import type { MiNote } from '@/models/entities/Note.js';
+import type { MiPoll } from '@/models/Poll.js';
+import type { MiNote } from '@/models/Note.js';
import { bindThis } from '@/decorators.js';
import { DriveFileEntityService } from '@/core/entities/DriveFileEntityService.js';
import { Packed } from '@/misc/json-schema.js';
diff --git a/packages/backend/src/queue/processors/InboxProcessorService.ts b/packages/backend/src/queue/processors/InboxProcessorService.ts
index ba00cc2ac8..99e823f9fa 100644
--- a/packages/backend/src/queue/processors/InboxProcessorService.ts
+++ b/packages/backend/src/queue/processors/InboxProcessorService.ts
@@ -15,8 +15,8 @@ import InstanceChart from '@/core/chart/charts/instance.js';
import ApRequestChart from '@/core/chart/charts/ap-request.js';
import FederationChart from '@/core/chart/charts/federation.js';
import { getApId } from '@/core/activitypub/type.js';
-import type { MiRemoteUser } from '@/models/entities/User.js';
-import type { MiUserPublickey } from '@/models/entities/UserPublickey.js';
+import type { MiRemoteUser } from '@/models/User.js';
+import type { MiUserPublickey } from '@/models/UserPublickey.js';
import { ApDbResolverService } from '@/core/activitypub/ApDbResolverService.js';
import { StatusError } from '@/misc/status-error.js';
import { UtilityService } from '@/core/UtilityService.js';
diff --git a/packages/backend/src/queue/processors/RelationshipProcessorService.ts b/packages/backend/src/queue/processors/RelationshipProcessorService.ts
index 6ed3e6c4d4..5b2d2ef313 100644
--- a/packages/backend/src/queue/processors/RelationshipProcessorService.ts
+++ b/packages/backend/src/queue/processors/RelationshipProcessorService.ts
@@ -12,7 +12,7 @@ import type Logger from '@/logger.js';
import type { UsersRepository } from '@/models/_.js';
import { DI } from '@/di-symbols.js';
-import { MiLocalUser, MiRemoteUser } from '@/models/entities/User.js';
+import { MiLocalUser, MiRemoteUser } from '@/models/User.js';
import { RelationshipJobData } from '../types.js';
import { QueueLoggerService } from '../QueueLoggerService.js';
import type * as Bull from 'bullmq';
diff --git a/packages/backend/src/queue/types.ts b/packages/backend/src/queue/types.ts
index 85af9d5315..c9122f5ca2 100644
--- a/packages/backend/src/queue/types.ts
+++ b/packages/backend/src/queue/types.ts
@@ -4,10 +4,10 @@
*/
import type { Antenna } from '@/server/api/endpoints/i/import-antennas.js';
-import type { MiDriveFile } from '@/models/entities/DriveFile.js';
-import type { MiNote } from '@/models/entities/Note.js';
-import type { MiUser } from '@/models/entities/User.js';
-import type { MiWebhook } from '@/models/entities/Webhook.js';
+import type { MiDriveFile } from '@/models/DriveFile.js';
+import type { MiNote } from '@/models/Note.js';
+import type { MiUser } from '@/models/User.js';
+import type { MiWebhook } from '@/models/Webhook.js';
import type { IActivity } from '@/core/activitypub/type.js';
import type httpSignature from '@peertube/http-signature';
diff --git a/packages/backend/src/server/ActivityPubServerService.ts b/packages/backend/src/server/ActivityPubServerService.ts
index a42495db5f..2428fa2792 100644
--- a/packages/backend/src/server/ActivityPubServerService.ts
+++ b/packages/backend/src/server/ActivityPubServerService.ts
@@ -16,11 +16,11 @@ import * as url from '@/misc/prelude/url.js';
import type { Config } from '@/config.js';
import { ApRendererService } from '@/core/activitypub/ApRendererService.js';
import { QueueService } from '@/core/QueueService.js';
-import type { MiLocalUser, MiRemoteUser, MiUser } from '@/models/entities/User.js';
+import type { MiLocalUser, MiRemoteUser, MiUser } from '@/models/User.js';
import { UserKeypairService } from '@/core/UserKeypairService.js';
-import type { MiFollowing } from '@/models/entities/Following.js';
+import type { MiFollowing } from '@/models/Following.js';
import { countIf } from '@/misc/prelude/array.js';
-import type { MiNote } from '@/models/entities/Note.js';
+import type { MiNote } from '@/models/Note.js';
import { QueryService } from '@/core/QueryService.js';
import { UtilityService } from '@/core/UtilityService.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
diff --git a/packages/backend/src/server/WellKnownServerService.ts b/packages/backend/src/server/WellKnownServerService.ts
index 833031e23a..8fc3c96de6 100644
--- a/packages/backend/src/server/WellKnownServerService.ts
+++ b/packages/backend/src/server/WellKnownServerService.ts
@@ -11,7 +11,7 @@ import { DI } from '@/di-symbols.js';
import type { UsersRepository } from '@/models/_.js';
import type { Config } from '@/config.js';
import { escapeAttribute, escapeValue } from '@/misc/prelude/xml.js';
-import type { MiUser } from '@/models/entities/User.js';
+import type { MiUser } from '@/models/User.js';
import * as Acct from '@/misc/acct.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { bindThis } from '@/decorators.js';
diff --git a/packages/backend/src/server/api/ApiCallService.ts b/packages/backend/src/server/api/ApiCallService.ts
index 07ef127322..085a0fd58a 100644
--- a/packages/backend/src/server/api/ApiCallService.ts
+++ b/packages/backend/src/server/api/ApiCallService.ts
@@ -9,8 +9,8 @@ import * as stream from 'node:stream/promises';
import { Inject, Injectable } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import { getIpHash } from '@/misc/get-ip-hash.js';
-import type { MiLocalUser, MiUser } from '@/models/entities/User.js';
-import type { MiAccessToken } from '@/models/entities/AccessToken.js';
+import type { MiLocalUser, MiUser } from '@/models/User.js';
+import type { MiAccessToken } from '@/models/AccessToken.js';
import type Logger from '@/logger.js';
import type { UserIpsRepository } from '@/models/_.js';
import { MetaService } from '@/core/MetaService.js';
diff --git a/packages/backend/src/server/api/AuthenticateService.ts b/packages/backend/src/server/api/AuthenticateService.ts
index c470a20758..f075688194 100644
--- a/packages/backend/src/server/api/AuthenticateService.ts
+++ b/packages/backend/src/server/api/AuthenticateService.ts
@@ -6,10 +6,10 @@
import { Inject, Injectable, OnApplicationShutdown } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import type { AccessTokensRepository, AppsRepository, UsersRepository } from '@/models/_.js';
-import type { MiLocalUser } from '@/models/entities/User.js';
-import type { MiAccessToken } from '@/models/entities/AccessToken.js';
+import type { MiLocalUser } from '@/models/User.js';
+import type { MiAccessToken } from '@/models/AccessToken.js';
import { MemoryKVCache } from '@/misc/cache.js';
-import type { MiApp } from '@/models/entities/App.js';
+import type { MiApp } from '@/models/App.js';
import { CacheService } from '@/core/CacheService.js';
import isNativeToken from '@/misc/is-native-token.js';
import { bindThis } from '@/decorators.js';
diff --git a/packages/backend/src/server/api/GetterService.ts b/packages/backend/src/server/api/GetterService.ts
index 020bcad12d..e2b98c34e7 100644
--- a/packages/backend/src/server/api/GetterService.ts
+++ b/packages/backend/src/server/api/GetterService.ts
@@ -7,8 +7,8 @@ import { Inject, Injectable } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import type { NotesRepository, UsersRepository } from '@/models/_.js';
import { IdentifiableError } from '@/misc/identifiable-error.js';
-import type { MiLocalUser, MiRemoteUser, MiUser } from '@/models/entities/User.js';
-import type { MiNote } from '@/models/entities/Note.js';
+import type { MiLocalUser, MiRemoteUser, MiUser } from '@/models/User.js';
+import type { MiNote } from '@/models/Note.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { bindThis } from '@/decorators.js';
diff --git a/packages/backend/src/server/api/SigninApiService.ts b/packages/backend/src/server/api/SigninApiService.ts
index 9a395a25d6..48d74e2b02 100644
--- a/packages/backend/src/server/api/SigninApiService.ts
+++ b/packages/backend/src/server/api/SigninApiService.ts
@@ -15,7 +15,7 @@ import type {
} from '@/models/_.js';
import type { Config } from '@/config.js';
import { getIpHash } from '@/misc/get-ip-hash.js';
-import type { MiLocalUser } from '@/models/entities/User.js';
+import type { MiLocalUser } from '@/models/User.js';
import { IdService } from '@/core/IdService.js';
import { bindThis } from '@/decorators.js';
import { WebAuthnService } from '@/core/WebAuthnService.js';
diff --git a/packages/backend/src/server/api/SigninService.ts b/packages/backend/src/server/api/SigninService.ts
index 25882fecf3..cebba8c8ee 100644
--- a/packages/backend/src/server/api/SigninService.ts
+++ b/packages/backend/src/server/api/SigninService.ts
@@ -7,7 +7,7 @@ import { Inject, Injectable } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import type { SigninsRepository } from '@/models/_.js';
import { IdService } from '@/core/IdService.js';
-import type { MiLocalUser } from '@/models/entities/User.js';
+import type { MiLocalUser } from '@/models/User.js';
import { GlobalEventService } from '@/core/GlobalEventService.js';
import { SigninEntityService } from '@/core/entities/SigninEntityService.js';
import { bindThis } from '@/decorators.js';
diff --git a/packages/backend/src/server/api/SignupApiService.ts b/packages/backend/src/server/api/SignupApiService.ts
index dac3e02ddb..431df581b5 100644
--- a/packages/backend/src/server/api/SignupApiService.ts
+++ b/packages/backend/src/server/api/SignupApiService.ts
@@ -15,7 +15,7 @@ import { IdService } from '@/core/IdService.js';
import { SignupService } from '@/core/SignupService.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { EmailService } from '@/core/EmailService.js';
-import { MiLocalUser } from '@/models/entities/User.js';
+import { MiLocalUser } from '@/models/User.js';
import { FastifyReplyError } from '@/misc/fastify-reply-error.js';
import { bindThis } from '@/decorators.js';
import { L_CHARS, secureRndstr } from '@/misc/secure-rndstr.js';
diff --git a/packages/backend/src/server/api/StreamingApiServerService.ts b/packages/backend/src/server/api/StreamingApiServerService.ts
index a1766d5889..9acaa688c5 100644
--- a/packages/backend/src/server/api/StreamingApiServerService.ts
+++ b/packages/backend/src/server/api/StreamingApiServerService.ts
@@ -13,7 +13,7 @@ import { NoteReadService } from '@/core/NoteReadService.js';
import { NotificationService } from '@/core/NotificationService.js';
import { bindThis } from '@/decorators.js';
import { CacheService } from '@/core/CacheService.js';
-import { MiLocalUser } from '@/models/entities/User.js';
+import { MiLocalUser } from '@/models/User.js';
import { AuthenticateService, AuthenticationError } from './AuthenticateService.js';
import MainStreamConnection from './stream/Connection.js';
import { ChannelsService } from './stream/ChannelsService.js';
diff --git a/packages/backend/src/server/api/endpoint-base.ts b/packages/backend/src/server/api/endpoint-base.ts
index 531311e475..d5279faa1c 100644
--- a/packages/backend/src/server/api/endpoint-base.ts
+++ b/packages/backend/src/server/api/endpoint-base.ts
@@ -6,8 +6,8 @@
import * as fs from 'node:fs';
import _Ajv from 'ajv';
import type { Schema, SchemaType } from '@/misc/json-schema.js';
-import type { MiLocalUser } from '@/models/entities/User.js';
-import type { MiAccessToken } from '@/models/entities/AccessToken.js';
+import type { MiLocalUser } from '@/models/User.js';
+import type { MiAccessToken } from '@/models/AccessToken.js';
import { ApiError } from './error.js';
import type { IEndpointMeta } from './endpoints.js';
diff --git a/packages/backend/src/server/api/endpoints/admin/accounts/create.ts b/packages/backend/src/server/api/endpoints/admin/accounts/create.ts
index 861a91d6d8..070e88f6f3 100644
--- a/packages/backend/src/server/api/endpoints/admin/accounts/create.ts
+++ b/packages/backend/src/server/api/endpoints/admin/accounts/create.ts
@@ -9,7 +9,7 @@ import { Endpoint } from '@/server/api/endpoint-base.js';
import type { UsersRepository } from '@/models/_.js';
import { SignupService } from '@/core/SignupService.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
-import { localUsernameSchema, passwordSchema } from '@/models/entities/User.js';
+import { localUsernameSchema, passwordSchema } from '@/models/User.js';
import { DI } from '@/di-symbols.js';
export const meta = {
diff --git a/packages/backend/src/server/api/endpoints/admin/announcements/list.ts b/packages/backend/src/server/api/endpoints/admin/announcements/list.ts
index 82dc1fcdff..c82e702eef 100644
--- a/packages/backend/src/server/api/endpoints/admin/announcements/list.ts
+++ b/packages/backend/src/server/api/endpoints/admin/announcements/list.ts
@@ -5,7 +5,7 @@
import { Inject, Injectable } from '@nestjs/common';
import type { AnnouncementsRepository, AnnouncementReadsRepository } from '@/models/_.js';
-import type { MiAnnouncement } from '@/models/entities/Announcement.js';
+import type { MiAnnouncement } from '@/models/Announcement.js';
import { Endpoint } from '@/server/api/endpoint-base.js';
import { QueryService } from '@/core/QueryService.js';
import { DI } from '@/di-symbols.js';
diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts b/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts
index 83b093e931..5a154b6420 100644
--- a/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts
+++ b/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts
@@ -7,7 +7,7 @@ import { Inject, Injectable } from '@nestjs/common';
import { Endpoint } from '@/server/api/endpoint-base.js';
import type { EmojisRepository } from '@/models/_.js';
import { IdService } from '@/core/IdService.js';
-import type { MiDriveFile } from '@/models/entities/DriveFile.js';
+import type { MiDriveFile } from '@/models/DriveFile.js';
import { DI } from '@/di-symbols.js';
import { DriveService } from '@/core/DriveService.js';
import { GlobalEventService } from '@/core/GlobalEventService.js';
diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/list.ts b/packages/backend/src/server/api/endpoints/admin/emoji/list.ts
index 2bd77219b3..ab16d86a3d 100644
--- a/packages/backend/src/server/api/endpoints/admin/emoji/list.ts
+++ b/packages/backend/src/server/api/endpoints/admin/emoji/list.ts
@@ -6,7 +6,7 @@
import { Inject, Injectable } from '@nestjs/common';
import { Endpoint } from '@/server/api/endpoint-base.js';
import type { EmojisRepository } from '@/models/_.js';
-import type { MiEmoji } from '@/models/entities/Emoji.js';
+import type { MiEmoji } from '@/models/Emoji.js';
import { QueryService } from '@/core/QueryService.js';
import { DI } from '@/di-symbols.js';
import { EmojiEntityService } from '@/core/entities/EmojiEntityService.js';
diff --git a/packages/backend/src/server/api/endpoints/admin/suspend-user.ts b/packages/backend/src/server/api/endpoints/admin/suspend-user.ts
index 01c220a93a..bcf12fa4e8 100644
--- a/packages/backend/src/server/api/endpoints/admin/suspend-user.ts
+++ b/packages/backend/src/server/api/endpoints/admin/suspend-user.ts
@@ -7,7 +7,7 @@ import { IsNull, Not } from 'typeorm';
import { Inject, Injectable } from '@nestjs/common';
import { Endpoint } from '@/server/api/endpoint-base.js';
import type { UsersRepository, FollowingsRepository } from '@/models/_.js';
-import type { MiUser } from '@/models/entities/User.js';
+import type { MiUser } from '@/models/User.js';
import type { RelationshipJobData } from '@/queue/types.js';
import { ModerationLogService } from '@/core/ModerationLogService.js';
import { UserSuspendService } from '@/core/UserSuspendService.js';
diff --git a/packages/backend/src/server/api/endpoints/admin/update-meta.ts b/packages/backend/src/server/api/endpoints/admin/update-meta.ts
index 65b7736d1a..614e0a95d7 100644
--- a/packages/backend/src/server/api/endpoints/admin/update-meta.ts
+++ b/packages/backend/src/server/api/endpoints/admin/update-meta.ts
@@ -4,7 +4,7 @@
*/
import { Injectable } from '@nestjs/common';
-import type { MiMeta } from '@/models/entities/Meta.js';
+import type { MiMeta } from '@/models/Meta.js';
import { ModerationLogService } from '@/core/ModerationLogService.js';
import { Endpoint } from '@/server/api/endpoint-base.js';
import { MetaService } from '@/core/MetaService.js';
diff --git a/packages/backend/src/server/api/endpoints/ap/show.ts b/packages/backend/src/server/api/endpoints/ap/show.ts
index f3ca931f24..f442fbdd2f 100644
--- a/packages/backend/src/server/api/endpoints/ap/show.ts
+++ b/packages/backend/src/server/api/endpoints/ap/show.ts
@@ -6,8 +6,8 @@
import { Injectable } from '@nestjs/common';
import ms from 'ms';
import { Endpoint } from '@/server/api/endpoint-base.js';
-import type { MiNote } from '@/models/entities/Note.js';
-import type { MiLocalUser, MiUser } from '@/models/entities/User.js';
+import type { MiNote } from '@/models/Note.js';
+import type { MiLocalUser, MiUser } from '@/models/User.js';
import { isActor, isPost, getApId } from '@/core/activitypub/type.js';
import type { SchemaType } from '@/misc/json-schema.js';
import { ApResolverService } from '@/core/activitypub/ApResolverService.js';
diff --git a/packages/backend/src/server/api/endpoints/channels/create.ts b/packages/backend/src/server/api/endpoints/channels/create.ts
index 9806f90972..e72120e156 100644
--- a/packages/backend/src/server/api/endpoints/channels/create.ts
+++ b/packages/backend/src/server/api/endpoints/channels/create.ts
@@ -7,7 +7,7 @@ import { Inject, Injectable } from '@nestjs/common';
import ms from 'ms';
import { Endpoint } from '@/server/api/endpoint-base.js';
import type { ChannelsRepository, DriveFilesRepository } from '@/models/_.js';
-import type { MiChannel } from '@/models/entities/Channel.js';
+import type { MiChannel } from '@/models/Channel.js';
import { IdService } from '@/core/IdService.js';
import { ChannelEntityService } from '@/core/entities/ChannelEntityService.js';
import { DI } from '@/di-symbols.js';
diff --git a/packages/backend/src/server/api/endpoints/clips/add-note.ts b/packages/backend/src/server/api/endpoints/clips/add-note.ts
index 00b8bb09a8..749593aa65 100644
--- a/packages/backend/src/server/api/endpoints/clips/add-note.ts
+++ b/packages/backend/src/server/api/endpoints/clips/add-note.ts
@@ -6,11 +6,7 @@
import { Inject, Injectable } from '@nestjs/common';
import ms from 'ms';
import { Endpoint } from '@/server/api/endpoint-base.js';
-import { IdService } from '@/core/IdService.js';
-import { DI } from '@/di-symbols.js';
-import type { ClipNotesRepository, ClipsRepository, NotesRepository } from '@/models/_.js';
-import { GetterService } from '@/server/api/GetterService.js';
-import { RoleService } from '@/core/RoleService.js';
+import { ClipService } from '@/core/ClipService.js';
import { ApiError } from '../../error.js';
export const meta = {
@@ -66,63 +62,24 @@ export const paramDef = {
@Injectable()
export default class extends Endpoint { // eslint-disable-line import/no-default-export
constructor(
- @Inject(DI.clipsRepository)
- private clipsRepository: ClipsRepository,
-
- @Inject(DI.clipNotesRepository)
- private clipNotesRepository: ClipNotesRepository,
-
- @Inject(DI.notesRepository)
- private notesRepository: NotesRepository,
-
- private idService: IdService,
- private roleService: RoleService,
- private getterService: GetterService,
+ private clipService: ClipService,
) {
super(meta, paramDef, async (ps, me) => {
- const clip = await this.clipsRepository.findOneBy({
- id: ps.clipId,
- userId: me.id,
- });
-
- if (clip == null) {
- throw new ApiError(meta.errors.noSuchClip);
+ try {
+ await this.clipService.addNote(me, ps.clipId, ps.noteId);
+ } catch (e) {
+ if (e instanceof ClipService.NoSuchClipError) {
+ throw new ApiError(meta.errors.noSuchClip);
+ } else if (e instanceof ClipService.NoSuchNoteError) {
+ throw new ApiError(meta.errors.noSuchNote);
+ } else if (e instanceof ClipService.AlreadyAddedError) {
+ throw new ApiError(meta.errors.alreadyClipped);
+ } else if (e instanceof ClipService.TooManyClipNotesError) {
+ throw new ApiError(meta.errors.tooManyClipNotes);
+ } else {
+ throw e;
+ }
}
-
- const note = await this.getterService.getNote(ps.noteId).catch(e => {
- if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote);
- throw e;
- });
-
- const exist = await this.clipNotesRepository.exist({
- where: {
- noteId: note.id,
- clipId: clip.id,
- },
- });
-
- if (exist) {
- throw new ApiError(meta.errors.alreadyClipped);
- }
-
- const currentCount = await this.clipNotesRepository.countBy({
- clipId: clip.id,
- });
- if (currentCount > (await this.roleService.getUserPolicies(me.id)).noteEachClipsLimit) {
- throw new ApiError(meta.errors.tooManyClipNotes);
- }
-
- await this.clipNotesRepository.insert({
- id: this.idService.genId(),
- noteId: note.id,
- clipId: clip.id,
- });
-
- this.clipsRepository.update(clip.id, {
- lastClippedAt: new Date(),
- });
-
- this.notesRepository.increment({ id: note.id }, 'clippedCount', 1);
});
}
}
diff --git a/packages/backend/src/server/api/endpoints/clips/create.ts b/packages/backend/src/server/api/endpoints/clips/create.ts
index 9677027cc0..b4c7b52e72 100644
--- a/packages/backend/src/server/api/endpoints/clips/create.ts
+++ b/packages/backend/src/server/api/endpoints/clips/create.ts
@@ -5,12 +5,10 @@
import { Inject, Injectable } from '@nestjs/common';
import { Endpoint } from '@/server/api/endpoint-base.js';
-import { IdService } from '@/core/IdService.js';
-import type { ClipsRepository } from '@/models/_.js';
+import type { MiClip } from '@/models/_.js';
import { ClipEntityService } from '@/core/entities/ClipEntityService.js';
-import { DI } from '@/di-symbols.js';
-import { RoleService } from '@/core/RoleService.js';
import { ApiError } from '@/server/api/error.js';
+import { ClipService } from '@/core/ClipService.js';
export const meta = {
tags: ['clips'],
@@ -49,30 +47,19 @@ export const paramDef = {
@Injectable()
export default class extends Endpoint { // eslint-disable-line import/no-default-export
constructor(
- @Inject(DI.clipsRepository)
- private clipsRepository: ClipsRepository,
-
private clipEntityService: ClipEntityService,
- private roleService: RoleService,
- private idService: IdService,
+ private clipService: ClipService,
) {
super(meta, paramDef, async (ps, me) => {
- const currentCount = await this.clipsRepository.countBy({
- userId: me.id,
- });
- if (currentCount > (await this.roleService.getUserPolicies(me.id)).clipLimit) {
- throw new ApiError(meta.errors.tooManyClips);
+ let clip: MiClip;
+ try {
+ clip = await this.clipService.create(me, ps.name, ps.isPublic, ps.description ?? null);
+ } catch (e) {
+ if (e instanceof ClipService.TooManyClipsError) {
+ throw new ApiError(meta.errors.tooManyClips);
+ }
+ throw e;
}
-
- const clip = await this.clipsRepository.insert({
- id: this.idService.genId(),
- createdAt: new Date(),
- userId: me.id,
- name: ps.name,
- isPublic: ps.isPublic,
- description: ps.description,
- }).then(x => this.clipsRepository.findOneByOrFail(x.identifiers[0]));
-
return await this.clipEntityService.pack(clip, me);
});
}
diff --git a/packages/backend/src/server/api/endpoints/clips/delete.ts b/packages/backend/src/server/api/endpoints/clips/delete.ts
index cf3365e1a7..239945e8a4 100644
--- a/packages/backend/src/server/api/endpoints/clips/delete.ts
+++ b/packages/backend/src/server/api/endpoints/clips/delete.ts
@@ -5,8 +5,7 @@
import { Inject, Injectable } from '@nestjs/common';
import { Endpoint } from '@/server/api/endpoint-base.js';
-import type { ClipsRepository } from '@/models/_.js';
-import { DI } from '@/di-symbols.js';
+import { ClipService } from '@/core/ClipService.js';
import { ApiError } from '../../error.js';
export const meta = {
@@ -36,20 +35,17 @@ export const paramDef = {
@Injectable()
export default class extends Endpoint { // eslint-disable-line import/no-default-export
constructor(
- @Inject(DI.clipsRepository)
- private clipsRepository: ClipsRepository,
+ private clipService: ClipService,
) {
super(meta, paramDef, async (ps, me) => {
- const clip = await this.clipsRepository.findOneBy({
- id: ps.clipId,
- userId: me.id,
- });
-
- if (clip == null) {
- throw new ApiError(meta.errors.noSuchClip);
+ try {
+ await this.clipService.delete(me, ps.clipId);
+ } catch (e) {
+ if (e instanceof ClipService.NoSuchClipError) {
+ throw new ApiError(meta.errors.noSuchClip);
+ }
+ throw e;
}
-
- await this.clipsRepository.delete(clip.id);
});
}
}
diff --git a/packages/backend/src/server/api/endpoints/clips/remove-note.ts b/packages/backend/src/server/api/endpoints/clips/remove-note.ts
index 28a2f8ebd5..7b153cb555 100644
--- a/packages/backend/src/server/api/endpoints/clips/remove-note.ts
+++ b/packages/backend/src/server/api/endpoints/clips/remove-note.ts
@@ -5,9 +5,7 @@
import { Inject, Injectable } from '@nestjs/common';
import { Endpoint } from '@/server/api/endpoint-base.js';
-import type { ClipNotesRepository, ClipsRepository, NotesRepository } from '@/models/_.js';
-import { DI } from '@/di-symbols.js';
-import { GetterService } from '@/server/api/GetterService.js';
+import { ClipService } from '@/core/ClipService.js';
import { ApiError } from '../../error.js';
export const meta = {
@@ -46,38 +44,19 @@ export const paramDef = {
@Injectable()
export default class extends Endpoint { // eslint-disable-line import/no-default-export
constructor(
- @Inject(DI.clipsRepository)
- private clipsRepository: ClipsRepository,
-
- @Inject(DI.clipNotesRepository)
- private clipNotesRepository: ClipNotesRepository,
-
- @Inject(DI.notesRepository)
- private notesRepository: NotesRepository,
-
- private getterService: GetterService,
+ private clipService: ClipService,
) {
super(meta, paramDef, async (ps, me) => {
- const clip = await this.clipsRepository.findOneBy({
- id: ps.clipId,
- userId: me.id,
- });
-
- if (clip == null) {
- throw new ApiError(meta.errors.noSuchClip);
+ try {
+ await this.clipService.removeNote(me, ps.clipId, ps.noteId);
+ } catch (e) {
+ if (e instanceof ClipService.NoSuchClipError) {
+ throw new ApiError(meta.errors.noSuchClip);
+ } else if (e instanceof ClipService.NoSuchNoteError) {
+ throw new ApiError(meta.errors.noSuchNote);
+ }
+ throw e;
}
-
- const note = await this.getterService.getNote(ps.noteId).catch(err => {
- if (err.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote);
- throw err;
- });
-
- await this.clipNotesRepository.delete({
- noteId: note.id,
- clipId: clip.id,
- });
-
- this.notesRepository.decrement({ id: note.id }, 'clippedCount', 1);
});
}
}
diff --git a/packages/backend/src/server/api/endpoints/clips/update.ts b/packages/backend/src/server/api/endpoints/clips/update.ts
index 7dda865609..0b9878578c 100644
--- a/packages/backend/src/server/api/endpoints/clips/update.ts
+++ b/packages/backend/src/server/api/endpoints/clips/update.ts
@@ -5,9 +5,8 @@
import { Inject, Injectable } from '@nestjs/common';
import { Endpoint } from '@/server/api/endpoint-base.js';
-import type { ClipsRepository } from '@/models/_.js';
import { ClipEntityService } from '@/core/entities/ClipEntityService.js';
-import { DI } from '@/di-symbols.js';
+import { ClipService } from '@/core/ClipService.js';
import { ApiError } from '../../error.js';
export const meta = {
@@ -48,29 +47,21 @@ export const paramDef = {
@Injectable()
export default class extends Endpoint { // eslint-disable-line import/no-default-export
constructor(
- @Inject(DI.clipsRepository)
- private clipsRepository: ClipsRepository,
+ private clipService: ClipService,
private clipEntityService: ClipEntityService,
) {
super(meta, paramDef, async (ps, me) => {
- // Fetch the clip
- const clip = await this.clipsRepository.findOneBy({
- id: ps.clipId,
- userId: me.id,
- });
-
- if (clip == null) {
- throw new ApiError(meta.errors.noSuchClip);
+ try {
+ await this.clipService.update(me, ps.clipId, ps.name, ps.isPublic, ps.description);
+ } catch (e) {
+ if (e instanceof ClipService.NoSuchClipError) {
+ throw new ApiError(meta.errors.noSuchClip);
+ }
+ throw e;
}
- await this.clipsRepository.update(clip.id, {
- name: ps.name,
- description: ps.description,
- isPublic: ps.isPublic,
- });
-
- return await this.clipEntityService.pack(clip.id, me);
+ return await this.clipEntityService.pack(ps.clipId, me);
});
}
}
diff --git a/packages/backend/src/server/api/endpoints/drive/files/show.ts b/packages/backend/src/server/api/endpoints/drive/files/show.ts
index c52fa28732..474c7f02d3 100644
--- a/packages/backend/src/server/api/endpoints/drive/files/show.ts
+++ b/packages/backend/src/server/api/endpoints/drive/files/show.ts
@@ -4,7 +4,7 @@
*/
import { Inject, Injectable } from '@nestjs/common';
-import type { MiDriveFile } from '@/models/entities/DriveFile.js';
+import type { MiDriveFile } from '@/models/DriveFile.js';
import type { DriveFilesRepository } from '@/models/_.js';
import { Endpoint } from '@/server/api/endpoint-base.js';
import { DriveFileEntityService } from '@/core/entities/DriveFileEntityService.js';
diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/create.ts b/packages/backend/src/server/api/endpoints/gallery/posts/create.ts
index 3a0590f1d1..94701712de 100644
--- a/packages/backend/src/server/api/endpoints/gallery/posts/create.ts
+++ b/packages/backend/src/server/api/endpoints/gallery/posts/create.ts
@@ -7,8 +7,8 @@ import ms from 'ms';
import { Inject, Injectable } from '@nestjs/common';
import { Endpoint } from '@/server/api/endpoint-base.js';
import type { DriveFilesRepository, GalleryPostsRepository } from '@/models/_.js';
-import { MiGalleryPost } from '@/models/entities/GalleryPost.js';
-import type { MiDriveFile } from '@/models/entities/DriveFile.js';
+import { MiGalleryPost } from '@/models/GalleryPost.js';
+import type { MiDriveFile } from '@/models/DriveFile.js';
import { IdService } from '@/core/IdService.js';
import { GalleryPostEntityService } from '@/core/entities/GalleryPostEntityService.js';
import { DI } from '@/di-symbols.js';
diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/update.ts b/packages/backend/src/server/api/endpoints/gallery/posts/update.ts
index 4ef414a83c..632214a0c2 100644
--- a/packages/backend/src/server/api/endpoints/gallery/posts/update.ts
+++ b/packages/backend/src/server/api/endpoints/gallery/posts/update.ts
@@ -7,7 +7,7 @@ import ms from 'ms';
import { Inject, Injectable } from '@nestjs/common';
import { Endpoint } from '@/server/api/endpoint-base.js';
import type { DriveFilesRepository, GalleryPostsRepository } from '@/models/_.js';
-import type { MiDriveFile } from '@/models/entities/DriveFile.js';
+import type { MiDriveFile } from '@/models/DriveFile.js';
import { GalleryPostEntityService } from '@/core/entities/GalleryPostEntityService.js';
import { DI } from '@/di-symbols.js';
diff --git a/packages/backend/src/server/api/endpoints/hashtags/trend.ts b/packages/backend/src/server/api/endpoints/hashtags/trend.ts
index ab65699a5a..75d4fe3819 100644
--- a/packages/backend/src/server/api/endpoints/hashtags/trend.ts
+++ b/packages/backend/src/server/api/endpoints/hashtags/trend.ts
@@ -7,7 +7,7 @@ import { Brackets } from 'typeorm';
import { Inject, Injectable } from '@nestjs/common';
import { Endpoint } from '@/server/api/endpoint-base.js';
import type { NotesRepository } from '@/models/_.js';
-import type { MiNote } from '@/models/entities/Note.js';
+import type { MiNote } from '@/models/Note.js';
import { safeForSql } from '@/misc/safe-for-sql.js';
import { normalizeForSearch } from '@/misc/normalize-for-search.js';
import { MetaService } from '@/core/MetaService.js';
diff --git a/packages/backend/src/server/api/endpoints/i/move.ts b/packages/backend/src/server/api/endpoints/i/move.ts
index eb67e171fe..86b726e054 100644
--- a/packages/backend/src/server/api/endpoints/i/move.ts
+++ b/packages/backend/src/server/api/endpoints/i/move.ts
@@ -9,7 +9,7 @@ import ms from 'ms';
import { Endpoint } from '@/server/api/endpoint-base.js';
import { ApiError } from '@/server/api/error.js';
-import { MiLocalUser, MiRemoteUser } from '@/models/entities/User.js';
+import { MiLocalUser, MiRemoteUser } from '@/models/User.js';
import { AccountMoveService } from '@/core/AccountMoveService.js';
import { RemoteUserResolveService } from '@/core/RemoteUserResolveService.js';
diff --git a/packages/backend/src/server/api/endpoints/i/notifications.ts b/packages/backend/src/server/api/endpoints/i/notifications.ts
index 51de5205c3..91dd72e805 100644
--- a/packages/backend/src/server/api/endpoints/i/notifications.ts
+++ b/packages/backend/src/server/api/endpoints/i/notifications.ts
@@ -14,7 +14,7 @@ import { NotificationEntityService } from '@/core/entities/NotificationEntitySer
import { NotificationService } from '@/core/NotificationService.js';
import { DI } from '@/di-symbols.js';
import { IdService } from '@/core/IdService.js';
-import { MiNotification } from '@/models/entities/Notification.js';
+import { MiNotification } from '@/models/Notification.js';
export const meta = {
tags: ['account', 'notifications'],
diff --git a/packages/backend/src/server/api/endpoints/i/update.ts b/packages/backend/src/server/api/endpoints/i/update.ts
index 6c5d8eaa4c..3953b19002 100644
--- a/packages/backend/src/server/api/endpoints/i/update.ts
+++ b/packages/backend/src/server/api/endpoints/i/update.ts
@@ -10,9 +10,9 @@ import { extractCustomEmojisFromMfm } from '@/misc/extract-custom-emojis-from-mf
import { extractHashtags } from '@/misc/extract-hashtags.js';
import * as Acct from '@/misc/acct.js';
import type { UsersRepository, DriveFilesRepository, UserProfilesRepository, PagesRepository } from '@/models/_.js';
-import type { MiUser } from '@/models/entities/User.js';
-import { birthdaySchema, descriptionSchema, locationSchema, nameSchema } from '@/models/entities/User.js';
-import type { MiUserProfile } from '@/models/entities/UserProfile.js';
+import type { MiUser } from '@/models/User.js';
+import { birthdaySchema, descriptionSchema, locationSchema, nameSchema } from '@/models/User.js';
+import type { MiUserProfile } from '@/models/UserProfile.js';
import { notificationTypes } from '@/types.js';
import { normalizeForSearch } from '@/misc/normalize-for-search.js';
import { langmap } from '@/misc/langmap.js';
diff --git a/packages/backend/src/server/api/endpoints/i/webhooks/create.ts b/packages/backend/src/server/api/endpoints/i/webhooks/create.ts
index 1bf0d666df..48eaeff406 100644
--- a/packages/backend/src/server/api/endpoints/i/webhooks/create.ts
+++ b/packages/backend/src/server/api/endpoints/i/webhooks/create.ts
@@ -7,7 +7,7 @@ import { Inject, Injectable } from '@nestjs/common';
import { Endpoint } from '@/server/api/endpoint-base.js';
import { IdService } from '@/core/IdService.js';
import type { WebhooksRepository } from '@/models/_.js';
-import { webhookEventTypes } from '@/models/entities/Webhook.js';
+import { webhookEventTypes } from '@/models/Webhook.js';
import { GlobalEventService } from '@/core/GlobalEventService.js';
import { DI } from '@/di-symbols.js';
import { RoleService } from '@/core/RoleService.js';
diff --git a/packages/backend/src/server/api/endpoints/i/webhooks/update.ts b/packages/backend/src/server/api/endpoints/i/webhooks/update.ts
index ccd247d550..b3e000524d 100644
--- a/packages/backend/src/server/api/endpoints/i/webhooks/update.ts
+++ b/packages/backend/src/server/api/endpoints/i/webhooks/update.ts
@@ -6,7 +6,7 @@
import { Inject, Injectable } from '@nestjs/common';
import { Endpoint } from '@/server/api/endpoint-base.js';
import type { WebhooksRepository } from '@/models/_.js';
-import { webhookEventTypes } from '@/models/entities/Webhook.js';
+import { webhookEventTypes } from '@/models/Webhook.js';
import { GlobalEventService } from '@/core/GlobalEventService.js';
import { DI } from '@/di-symbols.js';
import { ApiError } from '../../../error.js';
diff --git a/packages/backend/src/server/api/endpoints/notes/conversation.ts b/packages/backend/src/server/api/endpoints/notes/conversation.ts
index 5f4db5ca79..b94a019da4 100644
--- a/packages/backend/src/server/api/endpoints/notes/conversation.ts
+++ b/packages/backend/src/server/api/endpoints/notes/conversation.ts
@@ -4,7 +4,7 @@
*/
import { Inject, Injectable } from '@nestjs/common';
-import type { MiNote } from '@/models/entities/Note.js';
+import type { MiNote } from '@/models/Note.js';
import type { NotesRepository } from '@/models/_.js';
import { Endpoint } from '@/server/api/endpoint-base.js';
import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
diff --git a/packages/backend/src/server/api/endpoints/notes/create.ts b/packages/backend/src/server/api/endpoints/notes/create.ts
index aa963ec3e2..8deb7ebf38 100644
--- a/packages/backend/src/server/api/endpoints/notes/create.ts
+++ b/packages/backend/src/server/api/endpoints/notes/create.ts
@@ -6,11 +6,11 @@
import ms from 'ms';
import { In } from 'typeorm';
import { Inject, Injectable } from '@nestjs/common';
-import type { MiUser } from '@/models/entities/User.js';
+import type { MiUser } from '@/models/User.js';
import type { UsersRepository, NotesRepository, BlockingsRepository, DriveFilesRepository, ChannelsRepository } from '@/models/_.js';
-import type { MiDriveFile } from '@/models/entities/DriveFile.js';
-import type { MiNote } from '@/models/entities/Note.js';
-import type { MiChannel } from '@/models/entities/Channel.js';
+import type { MiDriveFile } from '@/models/DriveFile.js';
+import type { MiNote } from '@/models/Note.js';
+import type { MiChannel } from '@/models/Channel.js';
import { MAX_NOTE_TEXT_LENGTH } from '@/const.js';
import { Endpoint } from '@/server/api/endpoint-base.js';
import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
diff --git a/packages/backend/src/server/api/endpoints/notes/polls/vote.ts b/packages/backend/src/server/api/endpoints/notes/polls/vote.ts
index 82195a10b4..a58bf09b85 100644
--- a/packages/backend/src/server/api/endpoints/notes/polls/vote.ts
+++ b/packages/backend/src/server/api/endpoints/notes/polls/vote.ts
@@ -5,7 +5,7 @@
import { Inject, Injectable } from '@nestjs/common';
import type { UsersRepository, PollsRepository, PollVotesRepository } from '@/models/_.js';
-import type { MiRemoteUser } from '@/models/entities/User.js';
+import type { MiRemoteUser } from '@/models/User.js';
import { IdService } from '@/core/IdService.js';
import { Endpoint } from '@/server/api/endpoint-base.js';
import { GetterService } from '@/server/api/GetterService.js';
diff --git a/packages/backend/src/server/api/endpoints/notes/reactions.ts b/packages/backend/src/server/api/endpoints/notes/reactions.ts
index 92ee06b7da..dae31364ee 100644
--- a/packages/backend/src/server/api/endpoints/notes/reactions.ts
+++ b/packages/backend/src/server/api/endpoints/notes/reactions.ts
@@ -5,7 +5,7 @@
import { Inject, Injectable } from '@nestjs/common';
import type { NoteReactionsRepository } from '@/models/_.js';
-import type { MiNoteReaction } from '@/models/entities/NoteReaction.js';
+import type { MiNoteReaction } from '@/models/NoteReaction.js';
import { Endpoint } from '@/server/api/endpoint-base.js';
import { NoteReactionEntityService } from '@/core/entities/NoteReactionEntityService.js';
import { DI } from '@/di-symbols.js';
diff --git a/packages/backend/src/server/api/endpoints/pages/create.ts b/packages/backend/src/server/api/endpoints/pages/create.ts
index 67ebceb0d5..c0e8fab16c 100644
--- a/packages/backend/src/server/api/endpoints/pages/create.ts
+++ b/packages/backend/src/server/api/endpoints/pages/create.ts
@@ -7,7 +7,7 @@ import ms from 'ms';
import { Inject, Injectable } from '@nestjs/common';
import type { DriveFilesRepository, PagesRepository } from '@/models/_.js';
import { IdService } from '@/core/IdService.js';
-import { MiPage } from '@/models/entities/Page.js';
+import { MiPage } from '@/models/Page.js';
import { Endpoint } from '@/server/api/endpoint-base.js';
import { PageEntityService } from '@/core/entities/PageEntityService.js';
import { DI } from '@/di-symbols.js';
diff --git a/packages/backend/src/server/api/endpoints/pages/show.ts b/packages/backend/src/server/api/endpoints/pages/show.ts
index 5279088cf0..efb0bd0677 100644
--- a/packages/backend/src/server/api/endpoints/pages/show.ts
+++ b/packages/backend/src/server/api/endpoints/pages/show.ts
@@ -6,7 +6,7 @@
import { IsNull } from 'typeorm';
import { Inject, Injectable } from '@nestjs/common';
import type { UsersRepository, PagesRepository } from '@/models/_.js';
-import type { MiPage } from '@/models/entities/Page.js';
+import type { MiPage } from '@/models/Page.js';
import { Endpoint } from '@/server/api/endpoint-base.js';
import { PageEntityService } from '@/core/entities/PageEntityService.js';
import { DI } from '@/di-symbols.js';
diff --git a/packages/backend/src/server/api/endpoints/pinned-users.ts b/packages/backend/src/server/api/endpoints/pinned-users.ts
index 610d606d97..390042c815 100644
--- a/packages/backend/src/server/api/endpoints/pinned-users.ts
+++ b/packages/backend/src/server/api/endpoints/pinned-users.ts
@@ -7,7 +7,7 @@ import { IsNull } from 'typeorm';
import { Inject, Injectable } from '@nestjs/common';
import type { UsersRepository } from '@/models/_.js';
import * as Acct from '@/misc/acct.js';
-import type { MiUser } from '@/models/entities/User.js';
+import type { MiUser } from '@/models/User.js';
import { Endpoint } from '@/server/api/endpoint-base.js';
import { MetaService } from '@/core/MetaService.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
diff --git a/packages/backend/src/server/api/endpoints/renote-mute/create.ts b/packages/backend/src/server/api/endpoints/renote-mute/create.ts
index 0ebf6937d4..3c9d266e21 100644
--- a/packages/backend/src/server/api/endpoints/renote-mute/create.ts
+++ b/packages/backend/src/server/api/endpoints/renote-mute/create.ts
@@ -8,7 +8,7 @@ import ms from 'ms';
import { Endpoint } from '@/server/api/endpoint-base.js';
import { IdService } from '@/core/IdService.js';
import type { RenoteMutingsRepository } from '@/models/_.js';
-import type { MiRenoteMuting } from '@/models/entities/RenoteMuting.js';
+import type { MiRenoteMuting } from '@/models/RenoteMuting.js';
import { DI } from '@/di-symbols.js';
import { GetterService } from '@/server/api/GetterService.js';
import { ApiError } from '../../error.js';
diff --git a/packages/backend/src/server/api/endpoints/username/available.ts b/packages/backend/src/server/api/endpoints/username/available.ts
index da8c844e64..e37df62c0c 100644
--- a/packages/backend/src/server/api/endpoints/username/available.ts
+++ b/packages/backend/src/server/api/endpoints/username/available.ts
@@ -7,7 +7,7 @@ import { IsNull } from 'typeorm';
import { Inject, Injectable } from '@nestjs/common';
import type { UsedUsernamesRepository, UsersRepository } from '@/models/_.js';
import { Endpoint } from '@/server/api/endpoint-base.js';
-import { localUsernameSchema } from '@/models/entities/User.js';
+import { localUsernameSchema } from '@/models/User.js';
import { DI } from '@/di-symbols.js';
import { MetaService } from '@/core/MetaService.js';
diff --git a/packages/backend/src/server/api/endpoints/users/lists/create-from-public.ts b/packages/backend/src/server/api/endpoints/users/lists/create-from-public.ts
index dc60552f6f..fd1bb48a4e 100644
--- a/packages/backend/src/server/api/endpoints/users/lists/create-from-public.ts
+++ b/packages/backend/src/server/api/endpoints/users/lists/create-from-public.ts
@@ -6,7 +6,7 @@
import { Inject, Injectable } from '@nestjs/common';
import type { UserListsRepository, UserListJoiningsRepository, BlockingsRepository } from '@/models/_.js';
import { IdService } from '@/core/IdService.js';
-import type { MiUserList } from '@/models/entities/UserList.js';
+import type { MiUserList } from '@/models/UserList.js';
import { Endpoint } from '@/server/api/endpoint-base.js';
import { GetterService } from '@/server/api/GetterService.js';
import { UserListEntityService } from '@/core/entities/UserListEntityService.js';
diff --git a/packages/backend/src/server/api/endpoints/users/lists/create.ts b/packages/backend/src/server/api/endpoints/users/lists/create.ts
index 02d29ae0b3..60b2b3f17e 100644
--- a/packages/backend/src/server/api/endpoints/users/lists/create.ts
+++ b/packages/backend/src/server/api/endpoints/users/lists/create.ts
@@ -6,7 +6,7 @@
import { Inject, Injectable } from '@nestjs/common';
import type { UserListsRepository } from '@/models/_.js';
import { IdService } from '@/core/IdService.js';
-import type { MiUserList } from '@/models/entities/UserList.js';
+import type { MiUserList } from '@/models/UserList.js';
import { Endpoint } from '@/server/api/endpoint-base.js';
import { UserListEntityService } from '@/core/entities/UserListEntityService.js';
import { DI } from '@/di-symbols.js';
diff --git a/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts b/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts
index 1842b77ce1..74408cc64a 100644
--- a/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts
+++ b/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts
@@ -7,7 +7,7 @@ import { Brackets } from 'typeorm';
import { Inject, Injectable } from '@nestjs/common';
import type { UsersRepository, FollowingsRepository } from '@/models/_.js';
import type { Config } from '@/config.js';
-import type { MiUser } from '@/models/entities/User.js';
+import type { MiUser } from '@/models/User.js';
import { Endpoint } from '@/server/api/endpoint-base.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { DI } from '@/di-symbols.js';
diff --git a/packages/backend/src/server/api/endpoints/users/search.ts b/packages/backend/src/server/api/endpoints/users/search.ts
index 3da3324c7e..aff5b98779 100644
--- a/packages/backend/src/server/api/endpoints/users/search.ts
+++ b/packages/backend/src/server/api/endpoints/users/search.ts
@@ -6,7 +6,7 @@
import { Brackets } from 'typeorm';
import { Inject, Injectable } from '@nestjs/common';
import type { UsersRepository, UserProfilesRepository } from '@/models/_.js';
-import type { MiUser } from '@/models/entities/User.js';
+import type { MiUser } from '@/models/User.js';
import { Endpoint } from '@/server/api/endpoint-base.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { DI } from '@/di-symbols.js';
diff --git a/packages/backend/src/server/api/endpoints/users/show.ts b/packages/backend/src/server/api/endpoints/users/show.ts
index 25f18037ec..389497301d 100644
--- a/packages/backend/src/server/api/endpoints/users/show.ts
+++ b/packages/backend/src/server/api/endpoints/users/show.ts
@@ -6,7 +6,7 @@
import { In, IsNull } from 'typeorm';
import { Inject, Injectable } from '@nestjs/common';
import type { UsersRepository } from '@/models/_.js';
-import type { MiUser } from '@/models/entities/User.js';
+import type { MiUser } from '@/models/User.js';
import { Endpoint } from '@/server/api/endpoint-base.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { RemoteUserResolveService } from '@/core/RemoteUserResolveService.js';
diff --git a/packages/backend/src/server/api/stream/Connection.ts b/packages/backend/src/server/api/stream/Connection.ts
index 9ada6c559e..fd91681fc1 100644
--- a/packages/backend/src/server/api/stream/Connection.ts
+++ b/packages/backend/src/server/api/stream/Connection.ts
@@ -4,8 +4,8 @@
*/
import * as WebSocket from 'ws';
-import type { MiUser } from '@/models/entities/User.js';
-import type { MiAccessToken } from '@/models/entities/AccessToken.js';
+import type { MiUser } from '@/models/User.js';
+import type { MiAccessToken } from '@/models/AccessToken.js';
import type { Packed } from '@/misc/json-schema.js';
import type { NoteReadService } from '@/core/NoteReadService.js';
import type { NotificationService } from '@/core/NotificationService.js';
diff --git a/packages/backend/src/server/api/stream/channels/user-list.ts b/packages/backend/src/server/api/stream/channels/user-list.ts
index 051b0bf502..8bbba0b6db 100644
--- a/packages/backend/src/server/api/stream/channels/user-list.ts
+++ b/packages/backend/src/server/api/stream/channels/user-list.ts
@@ -5,7 +5,7 @@
import { Inject, Injectable } from '@nestjs/common';
import type { UserListJoiningsRepository, UserListsRepository } from '@/models/_.js';
-import type { MiUser } from '@/models/entities/User.js';
+import type { MiUser } from '@/models/User.js';
import { isUserRelated } from '@/misc/is-user-related.js';
import type { Packed } from '@/misc/json-schema.js';
import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
diff --git a/packages/backend/src/server/api/stream/types.ts b/packages/backend/src/server/api/stream/types.ts
index c8e168519a..90e0a61f26 100644
--- a/packages/backend/src/server/api/stream/types.ts
+++ b/packages/backend/src/server/api/stream/types.ts
@@ -3,20 +3,20 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
-import type { MiChannel } from '@/models/entities/Channel.js';
-import type { MiUser } from '@/models/entities/User.js';
-import type { MiUserProfile } from '@/models/entities/UserProfile.js';
-import type { MiNote } from '@/models/entities/Note.js';
-import type { MiAntenna } from '@/models/entities/Antenna.js';
-import type { MiDriveFile } from '@/models/entities/DriveFile.js';
-import type { MiDriveFolder } from '@/models/entities/DriveFolder.js';
-import type { MiUserList } from '@/models/entities/UserList.js';
-import type { MiAbuseUserReport } from '@/models/entities/AbuseUserReport.js';
-import type { MiSignin } from '@/models/entities/Signin.js';
-import type { MiPage } from '@/models/entities/Page.js';
+import type { MiChannel } from '@/models/Channel.js';
+import type { MiUser } from '@/models/User.js';
+import type { MiUserProfile } from '@/models/UserProfile.js';
+import type { MiNote } from '@/models/Note.js';
+import type { MiAntenna } from '@/models/Antenna.js';
+import type { MiDriveFile } from '@/models/DriveFile.js';
+import type { MiDriveFolder } from '@/models/DriveFolder.js';
+import type { MiUserList } from '@/models/UserList.js';
+import type { MiAbuseUserReport } from '@/models/AbuseUserReport.js';
+import type { MiSignin } from '@/models/Signin.js';
+import type { MiPage } from '@/models/Page.js';
import type { Packed } from '@/misc/json-schema.js';
-import type { MiWebhook } from '@/models/entities/Webhook.js';
-import type { MiMeta } from '@/models/entities/Meta.js';
+import type { MiWebhook } from '@/models/Webhook.js';
+import type { MiMeta } from '@/models/Meta.js';
import { MiRole, MiRoleAssignment } from '@/models/_.js';
import type Emitter from 'strict-event-emitter-types';
import type { EventEmitter } from 'events';
diff --git a/packages/backend/src/server/oauth/OAuth2ProviderService.ts b/packages/backend/src/server/oauth/OAuth2ProviderService.ts
index f2991b3aa5..c3a78561c2 100644
--- a/packages/backend/src/server/oauth/OAuth2ProviderService.ts
+++ b/packages/backend/src/server/oauth/OAuth2ProviderService.ts
@@ -26,7 +26,7 @@ import { bindThis } from '@/decorators.js';
import type { AccessTokensRepository, UsersRepository } from '@/models/_.js';
import { IdService } from '@/core/IdService.js';
import { CacheService } from '@/core/CacheService.js';
-import type { MiLocalUser } from '@/models/entities/User.js';
+import type { MiLocalUser } from '@/models/User.js';
import { MemoryKVCache } from '@/misc/cache.js';
import { LoggerService } from '@/core/LoggerService.js';
import Logger from '@/logger.js';
@@ -125,7 +125,7 @@ async function discoverClientInformation(logger: Logger, httpRequestService: Htt
let name = id;
if (text) {
const microformats = mf2(text, { baseUrl: res.url });
- const nameProperty = microformats.items.find(item => item.type?.includes('h-app') && item.properties.url?.includes(id))?.properties.name[0];
+ const nameProperty = microformats.items.find(item => item.type?.includes('h-app') && item.properties.url.includes(id))?.properties.name[0];
if (typeof nameProperty === 'string') {
name = nameProperty;
}
diff --git a/packages/backend/src/server/web/FeedService.ts b/packages/backend/src/server/web/FeedService.ts
index f0f4e6bf3d..78551e800b 100644
--- a/packages/backend/src/server/web/FeedService.ts
+++ b/packages/backend/src/server/web/FeedService.ts
@@ -9,7 +9,7 @@ import { Feed } from 'feed';
import { DI } from '@/di-symbols.js';
import type { DriveFilesRepository, NotesRepository, UserProfilesRepository } from '@/models/_.js';
import type { Config } from '@/config.js';
-import type { MiUser } from '@/models/entities/User.js';
+import type { MiUser } from '@/models/User.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { DriveFileEntityService } from '@/core/entities/DriveFileEntityService.js';
import { bindThis } from '@/decorators.js';
diff --git a/packages/backend/test/e2e/note.ts b/packages/backend/test/e2e/note.ts
index 20208c4571..961df99cc2 100644
--- a/packages/backend/test/e2e/note.ts
+++ b/packages/backend/test/e2e/note.ts
@@ -6,7 +6,7 @@
process.env.NODE_ENV = 'test';
import * as assert from 'assert';
-import { MiNote } from '@/models/entities/Note.js';
+import { MiNote } from '@/models/Note.js';
import { MAX_NOTE_TEXT_LENGTH } from '@/const.js';
import { signup, post, uploadUrl, startServer, initTestDb, api, uploadFile } from '../utils.js';
import type { INestApplicationContext } from '@nestjs/common';
diff --git a/packages/backend/test/e2e/streaming.ts b/packages/backend/test/e2e/streaming.ts
index 0dd97069a0..77de144882 100644
--- a/packages/backend/test/e2e/streaming.ts
+++ b/packages/backend/test/e2e/streaming.ts
@@ -6,7 +6,7 @@
process.env.NODE_ENV = 'test';
import * as assert from 'assert';
-import { MiFollowing } from '@/models/entities/Following.js';
+import { MiFollowing } from '@/models/Following.js';
import { connectStream, signup, api, post, startServer, initTestDb, waitFire } from '../utils.js';
import type { INestApplicationContext } from '@nestjs/common';
import type * as misskey from 'misskey-js';
diff --git a/packages/backend/test/unit/activitypub.ts b/packages/backend/test/unit/activitypub.ts
index 75235b7948..dbc446d12d 100644
--- a/packages/backend/test/unit/activitypub.ts
+++ b/packages/backend/test/unit/activitypub.ts
@@ -22,7 +22,7 @@ import { MiMeta, MiNote } from '@/models/_.js';
import { secureRndstr } from '@/misc/secure-rndstr.js';
import { DownloadService } from '@/core/DownloadService.js';
import { MetaService } from '@/core/MetaService.js';
-import type { MiRemoteUser } from '@/models/entities/User.js';
+import type { MiRemoteUser } from '@/models/User.js';
import { MockResolver } from '../misc/mock-resolver.js';
const host = 'https://host1.test';
diff --git a/packages/frontend/.eslintrc.js b/packages/frontend/.eslintrc.cjs
similarity index 100%
rename from packages/frontend/.eslintrc.js
rename to packages/frontend/.eslintrc.cjs
diff --git a/packages/frontend/@types/theme.d.ts b/packages/frontend/@types/theme.d.ts
index f4ba42b89d..376bbb0e9c 100644
--- a/packages/frontend/@types/theme.d.ts
+++ b/packages/frontend/@types/theme.d.ts
@@ -4,7 +4,7 @@
*/
declare module '@/themes/*.json5' {
- import { Theme } from '@/scripts/theme';
+ import { Theme } from '@/scripts/theme.js';
const theme: Theme;
diff --git a/packages/frontend/package.json b/packages/frontend/package.json
index 6cffc44fb7..45dd740e53 100644
--- a/packages/frontend/package.json
+++ b/packages/frontend/package.json
@@ -1,6 +1,7 @@
{
"name": "frontend",
"private": true,
+ "type": "module",
"scripts": {
"watch": "vite",
"build": "vite build",
@@ -37,7 +38,7 @@
"chartjs-chart-matrix": "2.0.1",
"chartjs-plugin-gradient": "0.6.1",
"chartjs-plugin-zoom": "2.0.1",
- "chromatic": "7.1.0",
+ "chromatic": "7.2.0",
"compare-versions": "6.1.0",
"cropperjs": "2.0.0-beta.4",
"date-fns": "2.30.0",
@@ -52,11 +53,11 @@
"matter-js": "0.19.0",
"mfm-js": "0.23.3",
"misskey-js": "workspace:*",
- "photoswipe": "5.4.0",
+ "photoswipe": "5.4.1",
"prismjs": "1.29.0",
"punycode": "2.3.0",
"querystring": "0.2.1",
- "rollup": "3.29.1",
+ "rollup": "3.29.2",
"sanitize-html": "2.11.0",
"sass": "1.67.0",
"strict-event-emitter-types": "2.0.0",
@@ -76,30 +77,30 @@
"vuedraggable": "next"
},
"devDependencies": {
- "@storybook/addon-actions": "7.4.1",
- "@storybook/addon-essentials": "7.4.1",
- "@storybook/addon-interactions": "7.4.1",
- "@storybook/addon-links": "7.4.1",
- "@storybook/addon-storysource": "7.4.1",
- "@storybook/addons": "7.4.1",
- "@storybook/blocks": "7.4.1",
- "@storybook/core-events": "7.4.1",
+ "@storybook/addon-actions": "7.4.2",
+ "@storybook/addon-essentials": "7.4.2",
+ "@storybook/addon-interactions": "7.4.2",
+ "@storybook/addon-links": "7.4.2",
+ "@storybook/addon-storysource": "7.4.2",
+ "@storybook/addons": "7.4.2",
+ "@storybook/blocks": "7.4.2",
+ "@storybook/core-events": "7.4.2",
"@storybook/jest": "0.2.2",
- "@storybook/manager-api": "7.4.1",
- "@storybook/preview-api": "7.4.1",
- "@storybook/react": "7.4.1",
- "@storybook/react-vite": "7.4.1",
- "@storybook/testing-library": "0.2.0",
- "@storybook/theming": "7.4.1",
- "@storybook/types": "7.4.1",
- "@storybook/vue3": "7.4.1",
- "@storybook/vue3-vite": "7.4.1",
+ "@storybook/manager-api": "7.4.2",
+ "@storybook/preview-api": "7.4.2",
+ "@storybook/react": "7.4.2",
+ "@storybook/react-vite": "7.4.2",
+ "@storybook/testing-library": "0.2.1",
+ "@storybook/theming": "7.4.2",
+ "@storybook/types": "7.4.2",
+ "@storybook/vue3": "7.4.2",
+ "@storybook/vue3-vite": "7.4.2",
"@testing-library/vue": "7.0.0",
"@types/escape-regexp": "0.0.1",
"@types/estree": "1.0.1",
"@types/matter-js": "0.19.0",
"@types/micromatch": "4.0.2",
- "@types/node": "20.6.0",
+ "@types/node": "20.6.3",
"@types/punycode": "2.1.0",
"@types/sanitize-html": "2.9.0",
"@types/throttle-debounce": "5.0.0",
@@ -107,8 +108,8 @@
"@types/uuid": "9.0.4",
"@types/websocket": "1.0.6",
"@types/ws": "8.5.5",
- "@typescript-eslint/eslint-plugin": "6.7.0",
- "@typescript-eslint/parser": "6.7.0",
+ "@typescript-eslint/eslint-plugin": "6.7.2",
+ "@typescript-eslint/parser": "6.7.2",
"@vitest/coverage-v8": "0.34.4",
"@vue/runtime-core": "3.3.4",
"acorn": "8.10.0",
@@ -127,7 +128,7 @@
"react": "18.2.0",
"react-dom": "18.2.0",
"start-server-and-test": "2.0.0",
- "storybook": "7.4.1",
+ "storybook": "7.4.2",
"storybook-addon-misskey-theme": "github:misskey-dev/storybook-addon-misskey-theme",
"summaly": "github:misskey-dev/summaly",
"vite-plugin-compression2": "^0.10.4",
diff --git a/packages/frontend/src/_boot_.ts b/packages/frontend/src/_boot_.ts
index a397e57ad3..efb78fe447 100644
--- a/packages/frontend/src/_boot_.ts
+++ b/packages/frontend/src/_boot_.ts
@@ -7,8 +7,8 @@
import 'vite/modulepreload-polyfill';
import '@/style.scss';
-import { mainBoot } from './boot/main-boot';
-import { subBoot } from './boot/sub-boot';
+import { mainBoot } from '@/boot/main-boot.js';
+import { subBoot } from '@/boot/sub-boot.js';
const subBootPaths = ['/share', '/auth', '/miauth', '/signup-complete'];
diff --git a/packages/frontend/src/account.ts b/packages/frontend/src/account.ts
index 43bda37b6c..0e4e4b50ff 100644
--- a/packages/frontend/src/account.ts
+++ b/packages/frontend/src/account.ts
@@ -5,14 +5,14 @@
import { defineAsyncComponent, reactive, ref } from 'vue';
import * as Misskey from 'misskey-js';
-import { showSuspendedDialog } from './scripts/show-suspended-dialog';
-import { i18n } from './i18n';
-import { miLocalStorage } from './local-storage';
-import { MenuButton } from './types/menu';
-import { del, get, set } from '@/scripts/idb-proxy';
-import { apiUrl } from '@/config';
-import { waiting, api, popup, popupMenu, success, alert } from '@/os';
-import { unisonReload, reloadChannel } from '@/scripts/unison-reload';
+import { showSuspendedDialog } from '@/scripts/show-suspended-dialog.js';
+import { i18n } from '@/i18n.js';
+import { miLocalStorage } from '@/local-storage.js';
+import { MenuButton } from '@/types/menu.js';
+import { del, get, set } from '@/scripts/idb-proxy.js';
+import { apiUrl } from '@/config.js';
+import { waiting, api, popup, popupMenu, success, alert } from '@/os.js';
+import { unisonReload, reloadChannel } from '@/scripts/unison-reload.js';
// TODO: 他のタブと永続化されたstateを同期
diff --git a/packages/frontend/src/boot/common.ts b/packages/frontend/src/boot/common.ts
index 8f5de88ccd..8346962e06 100644
--- a/packages/frontend/src/boot/common.ts
+++ b/packages/frontend/src/boot/common.ts
@@ -5,26 +5,26 @@
import { computed, createApp, watch, markRaw, version as vueVersion, defineAsyncComponent, App } from 'vue';
import { compareVersions } from 'compare-versions';
-import widgets from '@/widgets';
-import directives from '@/directives';
-import components from '@/components';
-import { version, ui, lang, updateLocale } from '@/config';
-import { applyTheme } from '@/scripts/theme';
-import { isDeviceDarkmode } from '@/scripts/is-device-darkmode';
-import { i18n, updateI18n } from '@/i18n';
-import { confirm, alert, post, popup, toast } from '@/os';
-import { $i, refreshAccount, login, updateAccount, signout } from '@/account';
-import { defaultStore, ColdDeviceStorage } from '@/store';
-import { fetchInstance, instance } from '@/instance';
-import { deviceKind } from '@/scripts/device-kind';
-import { reloadChannel } from '@/scripts/unison-reload';
-import { reactionPicker } from '@/scripts/reaction-picker';
-import { getUrlWithoutLoginId } from '@/scripts/login-id';
-import { getAccountFromId } from '@/scripts/get-account-from-id';
-import { deckStore } from '@/ui/deck/deck-store';
-import { miLocalStorage } from '@/local-storage';
-import { fetchCustomEmojis } from '@/custom-emojis';
-import { mainRouter } from '@/router';
+import widgets from '@/widgets/index.js';
+import directives from '@/directives/index.js';
+import components from '@/components/index.js';
+import { version, ui, lang, updateLocale } from '@/config.js';
+import { applyTheme } from '@/scripts/theme.js';
+import { isDeviceDarkmode } from '@/scripts/is-device-darkmode.js';
+import { i18n, updateI18n } from '@/i18n.js';
+import { confirm, alert, post, popup, toast } from '@/os.js';
+import { $i, refreshAccount, login, updateAccount, signout } from '@/account.js';
+import { defaultStore, ColdDeviceStorage } from '@/store.js';
+import { fetchInstance, instance } from '@/instance.js';
+import { deviceKind } from '@/scripts/device-kind.js';
+import { reloadChannel } from '@/scripts/unison-reload.js';
+import { reactionPicker } from '@/scripts/reaction-picker.js';
+import { getUrlWithoutLoginId } from '@/scripts/login-id.js';
+import { getAccountFromId } from '@/scripts/get-account-from-id.js';
+import { deckStore } from '@/ui/deck/deck-store.js';
+import { miLocalStorage } from '@/local-storage.js';
+import { fetchCustomEmojis } from '@/custom-emojis.js';
+import { mainRouter } from '@/router.js';
export async function common(createVue: () => App) {
console.info(`Misskey v${version}`);
@@ -202,6 +202,18 @@ export async function common(createVue: () => App) {
}
}, { immediate: true });
+ if (defaultStore.state.keepScreenOn) {
+ if ('wakeLock' in navigator) {
+ navigator.wakeLock.request('screen');
+
+ document.addEventListener('visibilitychange', async () => {
+ if (document.visibilityState === 'visible') {
+ navigator.wakeLock.request('screen');
+ }
+ });
+ }
+ }
+
//#region Fetch user
if ($i && $i.token) {
if (_DEV_) {
diff --git a/packages/frontend/src/boot/main-boot.ts b/packages/frontend/src/boot/main-boot.ts
index 9ab1f6e14c..f2af951d63 100644
--- a/packages/frontend/src/boot/main-boot.ts
+++ b/packages/frontend/src/boot/main-boot.ts
@@ -4,21 +4,21 @@
*/
import { computed, createApp, watch, markRaw, version as vueVersion, defineAsyncComponent } from 'vue';
-import { common } from './common';
-import { version, ui, lang, updateLocale } from '@/config';
-import { i18n, updateI18n } from '@/i18n';
-import { confirm, alert, post, popup, toast } from '@/os';
-import { useStream } from '@/stream';
-import * as sound from '@/scripts/sound';
-import { $i, refreshAccount, login, updateAccount, signout } from '@/account';
-import { defaultStore, ColdDeviceStorage } from '@/store';
-import { makeHotkey } from '@/scripts/hotkey';
-import { reactionPicker } from '@/scripts/reaction-picker';
-import { miLocalStorage } from '@/local-storage';
-import { claimAchievement, claimedAchievements } from '@/scripts/achievements';
-import { mainRouter } from '@/router';
-import { initializeSw } from '@/scripts/initialize-sw';
-import { deckStore } from '@/ui/deck/deck-store';
+import { common } from './common.js';
+import { version, ui, lang, updateLocale } from '@/config.js';
+import { i18n, updateI18n } from '@/i18n.js';
+import { confirm, alert, post, popup, toast } from '@/os.js';
+import { useStream } from '@/stream.js';
+import * as sound from '@/scripts/sound.js';
+import { $i, refreshAccount, login, updateAccount, signout } from '@/account.js';
+import { defaultStore, ColdDeviceStorage } from '@/store.js';
+import { makeHotkey } from '@/scripts/hotkey.js';
+import { reactionPicker } from '@/scripts/reaction-picker.js';
+import { miLocalStorage } from '@/local-storage.js';
+import { claimAchievement, claimedAchievements } from '@/scripts/achievements.js';
+import { mainRouter } from '@/router.js';
+import { initializeSw } from '@/scripts/initialize-sw.js';
+import { deckStore } from '@/ui/deck/deck-store.js';
export async function mainBoot() {
const { isClientUpdated } = await common(() => createApp(
diff --git a/packages/frontend/src/boot/sub-boot.ts b/packages/frontend/src/boot/sub-boot.ts
index 2cc19f2df3..9b4670e130 100644
--- a/packages/frontend/src/boot/sub-boot.ts
+++ b/packages/frontend/src/boot/sub-boot.ts
@@ -4,7 +4,7 @@
*/
import { computed, createApp, watch, markRaw, version as vueVersion, defineAsyncComponent } from 'vue';
-import { common } from './common';
+import { common } from './common.js';
export async function subBoot() {
const { isClientUpdated } = await common(() => createApp(
diff --git a/packages/frontend/src/cache.ts b/packages/frontend/src/cache.ts
index 1f3d28ba57..25d2b3c15f 100644
--- a/packages/frontend/src/cache.ts
+++ b/packages/frontend/src/cache.ts
@@ -4,8 +4,8 @@
*/
import * as Misskey from 'misskey-js';
-import { Cache } from '@/scripts/cache';
-import { api } from '@/os';
+import { Cache } from '@/scripts/cache.js';
+import { api } from '@/os.js';
export const clipsCache = new Cache(1000 * 60 * 30, () => api('clips/list'));
export const rolesCache = new Cache(1000 * 60 * 30, () => api('admin/roles/list'));
diff --git a/packages/frontend/src/components/MkAbuseReport.vue b/packages/frontend/src/components/MkAbuseReport.vue
index cb97875bcd..66114b8734 100644
--- a/packages/frontend/src/components/MkAbuseReport.vue
+++ b/packages/frontend/src/components/MkAbuseReport.vue
@@ -44,9 +44,9 @@ SPDX-License-Identifier: AGPL-3.0-only
import MkButton from '@/components/MkButton.vue';
import MkSwitch from '@/components/MkSwitch.vue';
import MkKeyValue from '@/components/MkKeyValue.vue';
-import * as os from '@/os';
-import { i18n } from '@/i18n';
-import { dateString } from '@/filters/date';
+import * as os from '@/os.js';
+import { i18n } from '@/i18n.js';
+import { dateString } from '@/filters/date.js';
const props = defineProps<{
report: any;
diff --git a/packages/frontend/src/components/MkAbuseReportWindow.vue b/packages/frontend/src/components/MkAbuseReportWindow.vue
index 6e0dee6973..7814681ea2 100644
--- a/packages/frontend/src/components/MkAbuseReportWindow.vue
+++ b/packages/frontend/src/components/MkAbuseReportWindow.vue
@@ -35,8 +35,8 @@ import * as Misskey from 'misskey-js';
import MkWindow from '@/components/MkWindow.vue';
import MkTextarea from '@/components/MkTextarea.vue';
import MkButton from '@/components/MkButton.vue';
-import * as os from '@/os';
-import { i18n } from '@/i18n';
+import * as os from '@/os.js';
+import { i18n } from '@/i18n.js';
const props = defineProps<{
user: Misskey.entities.User;
diff --git a/packages/frontend/src/components/MkAccountMoved.vue b/packages/frontend/src/components/MkAccountMoved.vue
index e68efb1a3b..155d9fe3a9 100644
--- a/packages/frontend/src/components/MkAccountMoved.vue
+++ b/packages/frontend/src/components/MkAccountMoved.vue
@@ -15,9 +15,9 @@ SPDX-License-Identifier: AGPL-3.0-only
import { ref } from 'vue';
import * as Misskey from 'misskey-js';
import MkMention from './MkMention.vue';
-import { i18n } from '@/i18n';
-import { host as localHost } from '@/config';
-import { api } from '@/os';
+import { i18n } from '@/i18n.js';
+import { host as localHost } from '@/config.js';
+import { api } from '@/os.js';
const user = ref();
diff --git a/packages/frontend/src/components/MkAchievements.stories.impl.ts b/packages/frontend/src/components/MkAchievements.stories.impl.ts
index fd971e5ac6..a67e1def13 100644
--- a/packages/frontend/src/components/MkAchievements.stories.impl.ts
+++ b/packages/frontend/src/components/MkAchievements.stories.impl.ts
@@ -9,7 +9,7 @@ import { rest } from 'msw';
import { userDetailed } from '../../.storybook/fakes';
import { commonHandlers } from '../../.storybook/mocks';
import MkAchievements from './MkAchievements.vue';
-import { ACHIEVEMENT_TYPES } from '@/scripts/achievements';
+import { ACHIEVEMENT_TYPES } from '@/scripts/achievements.js';
export const Empty = {
render(args) {
return {
diff --git a/packages/frontend/src/components/MkAchievements.vue b/packages/frontend/src/components/MkAchievements.vue
index f9d62773f5..bea0ed26d8 100644
--- a/packages/frontend/src/components/MkAchievements.vue
+++ b/packages/frontend/src/components/MkAchievements.vue
@@ -54,9 +54,9 @@ SPDX-License-Identifier: AGPL-3.0-only
diff --git a/packages/frontend/src/components/MkMiniChart.vue b/packages/frontend/src/components/MkMiniChart.vue
index eee1e10399..8d2a147306 100644
--- a/packages/frontend/src/components/MkMiniChart.vue
+++ b/packages/frontend/src/components/MkMiniChart.vue
@@ -34,7 +34,7 @@ SPDX-License-Identifier: AGPL-3.0-only
import { watch } from 'vue';
import { v4 as uuid } from 'uuid';
import tinycolor from 'tinycolor2';
-import { useInterval } from '@/scripts/use-interval';
+import { useInterval } from '@/scripts/use-interval.js';
const props = defineProps<{
src: number[];
diff --git a/packages/frontend/src/components/MkModal.vue b/packages/frontend/src/components/MkModal.vue
index 4ba078d4eb..ec5039c504 100644
--- a/packages/frontend/src/components/MkModal.vue
+++ b/packages/frontend/src/components/MkModal.vue
@@ -43,10 +43,10 @@ SPDX-License-Identifier: AGPL-3.0-only