Merge branch 'refactor/sea-orm-entities' into 'develop'
Make it possible to manipulate the database in backend-rs See merge request firefish/firefish!10735
This commit is contained in:
commit
9ea5fcd1bf
|
@ -10,6 +10,7 @@ I have updated...
|
|||
- [ ] `docs/changelog.md`
|
||||
- [ ] `docs/notice-for-admins.md`
|
||||
- [ ] `docs/api-change.md`
|
||||
- [ ] `packages/backend-rs/index.js`
|
||||
- [ ] OCI container image
|
||||
|
||||
<!-- TODO: Add automated tests (task runners are currently down) -->
|
||||
|
|
6
Makefile
6
Makefile
|
@ -3,7 +3,7 @@ export
|
|||
|
||||
|
||||
.PHONY: pre-commit
|
||||
pre-commit: format entities update-index-js
|
||||
pre-commit: format entities index-js
|
||||
|
||||
.PHONY: format
|
||||
format:
|
||||
|
@ -14,8 +14,8 @@ entities:
|
|||
pnpm run migrate
|
||||
$(MAKE) -C ./packages/backend-rs regenerate-entities
|
||||
|
||||
.PHONY: update-index-js
|
||||
update-index-js:
|
||||
.PHONY: index-js
|
||||
index-js:
|
||||
$(MAKE) -C ./packages/backend-rs index.js
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
BEGIN;
|
||||
|
||||
DELETE FROM "migrations" WHERE name IN (
|
||||
'DropTimeZone1712425488543',
|
||||
'ExpandNoteEdit1711936358554',
|
||||
'markLocalFilesNsfwByDefault1709305200000',
|
||||
'FixMutingIndices1710690239308',
|
||||
|
@ -20,6 +21,83 @@ DELETE FROM "migrations" WHERE name IN (
|
|||
'RemoveNativeUtilsMigration1705877093218'
|
||||
);
|
||||
|
||||
-- drop-time-zone
|
||||
ALTER TABLE "abuse_user_report" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "access_token" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "access_token" ALTER "lastUsedAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "ad" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "ad" ALTER "expiresAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "announcement" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "announcement" ALTER "updatedAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "announcement_read" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "antenna" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "app" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "attestation_challenge" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "auth_session" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "blocking" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "channel" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "channel" ALTER "lastNotedAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "channel_following" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "channel_note_pining" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "clip" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "drive_file" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "drive_folder" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "emoji" ALTER "updatedAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "following" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "follow_request" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "gallery_like" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "gallery_post" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "gallery_post" ALTER "updatedAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "instance" ALTER "caughtAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "instance" ALTER "infoUpdatedAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "instance" ALTER "lastCommunicatedAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "instance" ALTER "latestRequestReceivedAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "instance" ALTER "latestRequestSentAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "messaging_message" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "moderation_log" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "muting" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "muting" ALTER "expiresAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "note" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "note" ALTER "updatedAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "note_edit" ALTER "updatedAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "note_favorite" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "note_reaction" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "note_thread_muting" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "note_watching" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "notification" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "page" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "page" ALTER "updatedAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "page_like" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "password_reset_request" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "poll" ALTER "expiresAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "poll_vote" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "promo_note" ALTER "expiresAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "promo_read" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "registration_ticket" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "registry_item" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "registry_item" ALTER "updatedAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "renote_muting" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "reply_muting" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "signin" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "sw_subscription" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "used_username" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "user" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "user" ALTER "lastActiveDate" TYPE timestamp with time zone;
|
||||
ALTER TABLE "user" ALTER "lastFetchedAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "user" ALTER "updatedAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "user_group" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "user_group_invitation" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "user_group_invite" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "user_group_joining" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "user_ip" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "user_list" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "user_list_joining" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "user_note_pining" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "user_pending" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "user_security_key" ALTER "lastUsed" TYPE timestamp with time zone;
|
||||
ALTER TABLE "webhook" ALTER "createdAt" TYPE timestamp with time zone;
|
||||
ALTER TABLE "webhook" ALTER "latestSentAt" TYPE timestamp with time zone;
|
||||
|
||||
-- expand-note-edit
|
||||
ALTER TABLE "note_edit" DROP COLUMN "emojis";
|
||||
|
||||
|
|
|
@ -2,6 +2,22 @@
|
|||
|
||||
You can skip intermediate versions when upgrading from an old version, but please read the notices and follow the instructions for each intermediate version before [upgrading](./upgrade.md).
|
||||
|
||||
## Unreleased
|
||||
|
||||
### For all users
|
||||
|
||||
Upgrading may take a long time due to the large changes in the database. Please make sure to perform the operations when you have time.
|
||||
|
||||
The time required to upgrade varies greatly depending on the database size and the environment. For reference, on a server with 2 GB of RAM storing 10 million posts, the process took approximately 30 minutes. The number of posts stored on the server can be found at `https://yourserver.example.com/admin/database` (or `notesCount` of `stats` API response).
|
||||
|
||||
### For systemd/pm2 users
|
||||
|
||||
Please do not terminate `pnpm run migrate` even if it appears to be frozen.
|
||||
|
||||
### For Docker/Podman users
|
||||
|
||||
You may not be able to access your server for a while after starting the container.
|
||||
|
||||
## v20240326
|
||||
|
||||
### For Docker/Podman users
|
||||
|
|
|
@ -1266,10 +1266,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "c4ca998356d8ff9fba7a070dae4508a2298439c98c9f3bc9c07669538b999e8f"
|
||||
dependencies = [
|
||||
"bitflags 2.5.0",
|
||||
"chrono",
|
||||
"ctor",
|
||||
"napi-derive",
|
||||
"napi-sys",
|
||||
"once_cell",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tokio",
|
||||
]
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ thiserror = "1.0.58"
|
|||
tokio = { version = "1.36.0", features = ["full"] }
|
||||
|
||||
# Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix
|
||||
napi = { version = "2.16.1", default-features = false, features = ["napi9", "tokio_rt"], optional = true }
|
||||
napi = { version = "2.16.1", default-features = false, features = ["napi9", "tokio_rt", "chrono_date", "serde-json"], optional = true }
|
||||
napi-derive = { version = "2.16.1", optional = true }
|
||||
basen = "0.1.0"
|
||||
|
||||
|
|
|
@ -1,10 +1,27 @@
|
|||
recursive_wildcard = $(foreach d, $(wildcard $(1:=/*)), $(call recursive_wildcard, $d, $2) $(filter $(subst *, %, $2), $d))
|
||||
|
||||
SRC := Cargo.toml
|
||||
SRC += $(call recursive_wildcard, src, *)
|
||||
|
||||
|
||||
.PHONY: regenerate-entities
|
||||
regenerate-entities:
|
||||
sea-orm-cli generate entity \
|
||||
--output-dir='src/model/entity' \
|
||||
--database-url='postgres://$(POSTGRES_USER):$(POSTGRES_PASSWORD)@localhost:25432/$(POSTGRES_DB)'
|
||||
--database-url='postgres://$(POSTGRES_USER):$(POSTGRES_PASSWORD)@localhost:25432/$(POSTGRES_DB)' \
|
||||
--date-time-crate='chrono' \
|
||||
--model-extra-attributes='NAPI_EXTRA_ATTR_PLACEHOLDER' && \
|
||||
for file in src/model/entity/*; do \
|
||||
base=$$(basename -- "$${file}"); \
|
||||
jsname=$$(printf '%s\n' "$${base%.*}" | perl -pe 's/(^|_)./uc($$&)/ge;s/_//g'); \
|
||||
attribute=$$(printf 'cfg_attr(feature = "napi", napi_derive::napi(object, js_name = "%s", use_nullable = true))' "$${jsname}"); \
|
||||
sed -i "s/NAPI_EXTRA_ATTR_PLACEHOLDER/$${attribute}/" "$${file}"; \
|
||||
done
|
||||
sed -i 's/#\[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum)\]/#[derive(Debug, PartialEq, Eq, EnumIter, DeriveActiveEnum)]\n#[cfg_attr(not(feature = "napi"), derive(Clone))]\n#[cfg_attr(feature = "napi", napi_derive::napi)]/' \
|
||||
src/model/entity/sea_orm_active_enums.rs
|
||||
pnpm run format
|
||||
|
||||
index.js:
|
||||
index.js: $(SRC)
|
||||
NODE_OPTIONS='--max_old_space_size=3072' pnpm run build:debug
|
||||
[ -f built/index.js ]
|
||||
rm --force index.js
|
||||
|
|
|
@ -295,8 +295,18 @@ if (!nativeBinding) {
|
|||
throw new Error(`Failed to load native binding`)
|
||||
}
|
||||
|
||||
const { nativeRandomStr, IdConvertType, convertId, nativeGetTimestamp, nativeCreateId, nativeInitIdGenerator } = nativeBinding
|
||||
const { AntennaSrcEnum, MutedNoteReasonEnum, NoteVisibilityEnum, NotificationTypeEnum, PageVisibilityEnum, PollNotevisibilityEnum, RelayStatusEnum, UserEmojimodpermEnum, UserProfileFfvisibilityEnum, UserProfileMutingnotificationtypesEnum, nativeRandomStr, IdConvertType, convertId, nativeGetTimestamp, nativeCreateId, nativeInitIdGenerator } = nativeBinding
|
||||
|
||||
module.exports.AntennaSrcEnum = AntennaSrcEnum
|
||||
module.exports.MutedNoteReasonEnum = MutedNoteReasonEnum
|
||||
module.exports.NoteVisibilityEnum = NoteVisibilityEnum
|
||||
module.exports.NotificationTypeEnum = NotificationTypeEnum
|
||||
module.exports.PageVisibilityEnum = PageVisibilityEnum
|
||||
module.exports.PollNotevisibilityEnum = PollNotevisibilityEnum
|
||||
module.exports.RelayStatusEnum = RelayStatusEnum
|
||||
module.exports.UserEmojimodpermEnum = UserEmojimodpermEnum
|
||||
module.exports.UserProfileFfvisibilityEnum = UserProfileFfvisibilityEnum
|
||||
module.exports.UserProfileMutingnotificationtypesEnum = UserProfileMutingnotificationtypesEnum
|
||||
module.exports.nativeRandomStr = nativeRandomStr
|
||||
module.exports.IdConvertType = IdConvertType
|
||||
module.exports.convertId = convertId
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "abuse_user_report")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "AbuseUserReport", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "targetUserId")]
|
||||
pub target_user_id: String,
|
||||
#[sea_orm(column_name = "reporterId")]
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "access_token")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "AccessToken", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
pub token: String,
|
||||
pub hash: String,
|
||||
#[sea_orm(column_name = "userId")]
|
||||
|
@ -16,7 +20,7 @@ pub struct Model {
|
|||
#[sea_orm(column_name = "appId")]
|
||||
pub app_id: Option<String>,
|
||||
#[sea_orm(column_name = "lastUsedAt")]
|
||||
pub last_used_at: Option<DateTimeWithTimeZone>,
|
||||
pub last_used_at: Option<DateTime>,
|
||||
pub session: Option<String>,
|
||||
pub name: Option<String>,
|
||||
pub description: Option<String>,
|
||||
|
|
|
@ -4,13 +4,17 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "ad")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "Ad", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "expiresAt")]
|
||||
pub expires_at: DateTimeWithTimeZone,
|
||||
pub expires_at: DateTime,
|
||||
pub place: String,
|
||||
pub priority: String,
|
||||
pub url: String,
|
||||
|
|
|
@ -4,17 +4,21 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "announcement")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "Announcement", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
pub text: String,
|
||||
pub title: String,
|
||||
#[sea_orm(column_name = "imageUrl")]
|
||||
pub image_url: Option<String>,
|
||||
#[sea_orm(column_name = "updatedAt")]
|
||||
pub updated_at: Option<DateTimeWithTimeZone>,
|
||||
pub updated_at: Option<DateTime>,
|
||||
#[sea_orm(column_name = "showPopup")]
|
||||
pub show_popup: bool,
|
||||
#[sea_orm(column_name = "isGoodNews")]
|
||||
|
|
|
@ -4,6 +4,10 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "announcement_read")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "AnnouncementRead", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
|
@ -12,7 +16,7 @@ pub struct Model {
|
|||
#[sea_orm(column_name = "announcementId")]
|
||||
pub announcement_id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
||||
|
|
|
@ -5,11 +5,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "antenna")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "Antenna", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "userId")]
|
||||
pub user_id: String,
|
||||
pub name: String,
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "app")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "App", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "userId")]
|
||||
pub user_id: Option<String>,
|
||||
pub secret: String,
|
||||
|
|
|
@ -4,6 +4,10 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "attestation_challenge")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "AttestationChallenge", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
|
@ -11,7 +15,7 @@ pub struct Model {
|
|||
pub user_id: String,
|
||||
pub challenge: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "registrationChallenge")]
|
||||
pub registration_challenge: bool,
|
||||
}
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "auth_session")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "AuthSession", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
pub token: String,
|
||||
#[sea_orm(column_name = "userId")]
|
||||
pub user_id: Option<String>,
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "blocking")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "Blocking", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "blockeeId")]
|
||||
pub blockee_id: String,
|
||||
#[sea_orm(column_name = "blockerId")]
|
||||
|
|
|
@ -4,13 +4,17 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "channel")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "Channel", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "lastNotedAt")]
|
||||
pub last_noted_at: Option<DateTimeWithTimeZone>,
|
||||
pub last_noted_at: Option<DateTime>,
|
||||
#[sea_orm(column_name = "userId")]
|
||||
pub user_id: Option<String>,
|
||||
pub name: String,
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "channel_following")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "ChannelFollowing", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "followeeId")]
|
||||
pub followee_id: String,
|
||||
#[sea_orm(column_name = "followerId")]
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "channel_note_pining")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "ChannelNotePining", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "channelId")]
|
||||
pub channel_id: String,
|
||||
#[sea_orm(column_name = "noteId")]
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "clip")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "Clip", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "userId")]
|
||||
pub user_id: String,
|
||||
pub name: String,
|
||||
|
|
|
@ -4,6 +4,10 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "clip_note")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "ClipNote", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "drive_file")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "DriveFile", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "userId")]
|
||||
pub user_id: Option<String>,
|
||||
#[sea_orm(column_name = "userHost")]
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "drive_folder")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "DriveFolder", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
pub name: String,
|
||||
#[sea_orm(column_name = "userId")]
|
||||
pub user_id: Option<String>,
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "emoji")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "Emoji", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "updatedAt")]
|
||||
pub updated_at: Option<DateTimeWithTimeZone>,
|
||||
pub updated_at: Option<DateTime>,
|
||||
pub name: String,
|
||||
pub host: Option<String>,
|
||||
#[sea_orm(column_name = "originalUrl")]
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "follow_request")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "FollowRequest", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "followeeId")]
|
||||
pub followee_id: String,
|
||||
#[sea_orm(column_name = "followerId")]
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "following")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "Following", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "followeeId")]
|
||||
pub followee_id: String,
|
||||
#[sea_orm(column_name = "followerId")]
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "gallery_like")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "GalleryLike", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "userId")]
|
||||
pub user_id: String,
|
||||
#[sea_orm(column_name = "postId")]
|
||||
|
|
|
@ -4,13 +4,17 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "gallery_post")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "GalleryPost", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "updatedAt")]
|
||||
pub updated_at: DateTimeWithTimeZone,
|
||||
pub updated_at: DateTime,
|
||||
pub title: String,
|
||||
pub description: Option<String>,
|
||||
#[sea_orm(column_name = "userId")]
|
||||
|
|
|
@ -4,6 +4,10 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "hashtag")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "Hashtag", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "instance")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "Instance", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "caughtAt")]
|
||||
pub caught_at: DateTimeWithTimeZone,
|
||||
pub caught_at: DateTime,
|
||||
pub host: String,
|
||||
#[sea_orm(column_name = "usersCount")]
|
||||
pub users_count: i32,
|
||||
|
@ -19,13 +23,13 @@ pub struct Model {
|
|||
#[sea_orm(column_name = "followersCount")]
|
||||
pub followers_count: i32,
|
||||
#[sea_orm(column_name = "latestRequestSentAt")]
|
||||
pub latest_request_sent_at: Option<DateTimeWithTimeZone>,
|
||||
pub latest_request_sent_at: Option<DateTime>,
|
||||
#[sea_orm(column_name = "latestStatus")]
|
||||
pub latest_status: Option<i32>,
|
||||
#[sea_orm(column_name = "latestRequestReceivedAt")]
|
||||
pub latest_request_received_at: Option<DateTimeWithTimeZone>,
|
||||
pub latest_request_received_at: Option<DateTime>,
|
||||
#[sea_orm(column_name = "lastCommunicatedAt")]
|
||||
pub last_communicated_at: DateTimeWithTimeZone,
|
||||
pub last_communicated_at: DateTime,
|
||||
#[sea_orm(column_name = "isNotResponding")]
|
||||
pub is_not_responding: bool,
|
||||
#[sea_orm(column_name = "softwareName")]
|
||||
|
@ -41,7 +45,7 @@ pub struct Model {
|
|||
#[sea_orm(column_name = "maintainerEmail")]
|
||||
pub maintainer_email: Option<String>,
|
||||
#[sea_orm(column_name = "infoUpdatedAt")]
|
||||
pub info_updated_at: Option<DateTimeWithTimeZone>,
|
||||
pub info_updated_at: Option<DateTime>,
|
||||
#[sea_orm(column_name = "isSuspended")]
|
||||
pub is_suspended: bool,
|
||||
#[sea_orm(column_name = "iconUrl")]
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "messaging_message")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "MessagingMessage", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "userId")]
|
||||
pub user_id: String,
|
||||
#[sea_orm(column_name = "recipientId")]
|
||||
|
|
|
@ -4,6 +4,10 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "meta")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "Meta", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
|
|
|
@ -4,6 +4,10 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "migrations")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "Migrations", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key)]
|
||||
pub id: i32,
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "moderation_log")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "ModerationLog", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "userId")]
|
||||
pub user_id: String,
|
||||
pub r#type: String,
|
||||
|
|
|
@ -5,6 +5,10 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "muted_note")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "MutedNote", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
|
|
|
@ -4,17 +4,21 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "muting")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "Muting", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "muteeId")]
|
||||
pub mutee_id: String,
|
||||
#[sea_orm(column_name = "muterId")]
|
||||
pub muter_id: String,
|
||||
#[sea_orm(column_name = "expiresAt")]
|
||||
pub expires_at: Option<DateTimeWithTimeZone>,
|
||||
pub expires_at: Option<DateTime>,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
||||
|
|
|
@ -5,11 +5,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "note")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "Note", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "replyId")]
|
||||
pub reply_id: Option<String>,
|
||||
#[sea_orm(column_name = "renoteId")]
|
||||
|
@ -60,7 +64,7 @@ pub struct Model {
|
|||
#[sea_orm(column_name = "threadId")]
|
||||
pub thread_id: Option<String>,
|
||||
#[sea_orm(column_name = "updatedAt")]
|
||||
pub updated_at: Option<DateTimeWithTimeZone>,
|
||||
pub updated_at: Option<DateTime>,
|
||||
pub lang: Option<String>,
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,10 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "note_edit")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "NoteEdit", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
|
@ -15,7 +19,7 @@ pub struct Model {
|
|||
#[sea_orm(column_name = "fileIds")]
|
||||
pub file_ids: Vec<String>,
|
||||
#[sea_orm(column_name = "updatedAt")]
|
||||
pub updated_at: DateTimeWithTimeZone,
|
||||
pub updated_at: DateTime,
|
||||
pub emojis: Vec<String>,
|
||||
}
|
||||
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "note_favorite")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "NoteFavorite", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "userId")]
|
||||
pub user_id: String,
|
||||
#[sea_orm(column_name = "noteId")]
|
||||
|
|
|
@ -4,6 +4,10 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "note_file")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "NoteFile", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(column_name = "serialNo", primary_key)]
|
||||
pub serial_no: i64,
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "note_reaction")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "NoteReaction", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "userId")]
|
||||
pub user_id: String,
|
||||
#[sea_orm(column_name = "noteId")]
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "note_thread_muting")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "NoteThreadMuting", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "userId")]
|
||||
pub user_id: String,
|
||||
#[sea_orm(column_name = "threadId")]
|
||||
|
|
|
@ -4,6 +4,10 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "note_unread")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "NoteUnread", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "note_watching")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "NoteWatching", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "userId")]
|
||||
pub user_id: String,
|
||||
#[sea_orm(column_name = "noteId")]
|
||||
|
|
|
@ -5,11 +5,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "notification")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "Notification", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "notifieeId")]
|
||||
pub notifiee_id: String,
|
||||
#[sea_orm(column_name = "notifierId")]
|
||||
|
|
|
@ -5,13 +5,17 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "page")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "Page", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "updatedAt")]
|
||||
pub updated_at: DateTimeWithTimeZone,
|
||||
pub updated_at: DateTime,
|
||||
pub title: String,
|
||||
pub name: String,
|
||||
pub summary: Option<String>,
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "page_like")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "PageLike", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "userId")]
|
||||
pub user_id: String,
|
||||
#[sea_orm(column_name = "pageId")]
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "password_reset_request")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "PasswordResetRequest", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
pub token: String,
|
||||
#[sea_orm(column_name = "userId")]
|
||||
pub user_id: String,
|
||||
|
|
|
@ -5,11 +5,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "poll")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "Poll", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(column_name = "noteId", primary_key, auto_increment = false, unique)]
|
||||
pub note_id: String,
|
||||
#[sea_orm(column_name = "expiresAt")]
|
||||
pub expires_at: Option<DateTimeWithTimeZone>,
|
||||
pub expires_at: Option<DateTime>,
|
||||
pub multiple: bool,
|
||||
pub choices: Vec<String>,
|
||||
pub votes: Vec<i32>,
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "poll_vote")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "PollVote", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "userId")]
|
||||
pub user_id: String,
|
||||
#[sea_orm(column_name = "noteId")]
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "promo_note")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "PromoNote", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(column_name = "noteId", primary_key, auto_increment = false, unique)]
|
||||
pub note_id: String,
|
||||
#[sea_orm(column_name = "expiresAt")]
|
||||
pub expires_at: DateTimeWithTimeZone,
|
||||
pub expires_at: DateTime,
|
||||
#[sea_orm(column_name = "userId")]
|
||||
pub user_id: String,
|
||||
}
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "promo_read")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "PromoRead", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "userId")]
|
||||
pub user_id: String,
|
||||
#[sea_orm(column_name = "noteId")]
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "registration_ticket")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "RegistrationTicket", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
pub code: String,
|
||||
}
|
||||
|
||||
|
|
|
@ -4,13 +4,17 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "registry_item")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "RegistryItem", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "updatedAt")]
|
||||
pub updated_at: DateTimeWithTimeZone,
|
||||
pub updated_at: DateTime,
|
||||
#[sea_orm(column_name = "userId")]
|
||||
pub user_id: String,
|
||||
pub key: String,
|
||||
|
|
|
@ -5,6 +5,10 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "relay")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "Relay", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "renote_muting")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "RenoteMuting", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "muteeId")]
|
||||
pub mutee_id: String,
|
||||
#[sea_orm(column_name = "muterId")]
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "reply_muting")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "ReplyMuting", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "muteeId")]
|
||||
pub mutee_id: String,
|
||||
#[sea_orm(column_name = "muterId")]
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
|
||||
use sea_orm::entity::prelude::*;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum)]
|
||||
#[derive(Debug, PartialEq, Eq, EnumIter, DeriveActiveEnum)]
|
||||
#[cfg_attr(not(feature = "napi"), derive(Clone))]
|
||||
#[cfg_attr(feature = "napi", napi_derive::napi)]
|
||||
#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "antenna_src_enum")]
|
||||
pub enum AntennaSrcEnum {
|
||||
#[sea_orm(string_value = "all")]
|
||||
|
@ -18,7 +20,9 @@ pub enum AntennaSrcEnum {
|
|||
#[sea_orm(string_value = "users")]
|
||||
Users,
|
||||
}
|
||||
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum)]
|
||||
#[derive(Debug, PartialEq, Eq, EnumIter, DeriveActiveEnum)]
|
||||
#[cfg_attr(not(feature = "napi"), derive(Clone))]
|
||||
#[cfg_attr(feature = "napi", napi_derive::napi)]
|
||||
#[sea_orm(
|
||||
rs_type = "String",
|
||||
db_type = "Enum",
|
||||
|
@ -34,7 +38,9 @@ pub enum MutedNoteReasonEnum {
|
|||
#[sea_orm(string_value = "word")]
|
||||
Word,
|
||||
}
|
||||
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum)]
|
||||
#[derive(Debug, PartialEq, Eq, EnumIter, DeriveActiveEnum)]
|
||||
#[cfg_attr(not(feature = "napi"), derive(Clone))]
|
||||
#[cfg_attr(feature = "napi", napi_derive::napi)]
|
||||
#[sea_orm(
|
||||
rs_type = "String",
|
||||
db_type = "Enum",
|
||||
|
@ -52,7 +58,9 @@ pub enum NoteVisibilityEnum {
|
|||
#[sea_orm(string_value = "specified")]
|
||||
Specified,
|
||||
}
|
||||
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum)]
|
||||
#[derive(Debug, PartialEq, Eq, EnumIter, DeriveActiveEnum)]
|
||||
#[cfg_attr(not(feature = "napi"), derive(Clone))]
|
||||
#[cfg_attr(feature = "napi", napi_derive::napi)]
|
||||
#[sea_orm(
|
||||
rs_type = "String",
|
||||
db_type = "Enum",
|
||||
|
@ -84,7 +92,9 @@ pub enum NotificationTypeEnum {
|
|||
#[sea_orm(string_value = "reply")]
|
||||
Reply,
|
||||
}
|
||||
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum)]
|
||||
#[derive(Debug, PartialEq, Eq, EnumIter, DeriveActiveEnum)]
|
||||
#[cfg_attr(not(feature = "napi"), derive(Clone))]
|
||||
#[cfg_attr(feature = "napi", napi_derive::napi)]
|
||||
#[sea_orm(
|
||||
rs_type = "String",
|
||||
db_type = "Enum",
|
||||
|
@ -98,7 +108,9 @@ pub enum PageVisibilityEnum {
|
|||
#[sea_orm(string_value = "specified")]
|
||||
Specified,
|
||||
}
|
||||
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum)]
|
||||
#[derive(Debug, PartialEq, Eq, EnumIter, DeriveActiveEnum)]
|
||||
#[cfg_attr(not(feature = "napi"), derive(Clone))]
|
||||
#[cfg_attr(feature = "napi", napi_derive::napi)]
|
||||
#[sea_orm(
|
||||
rs_type = "String",
|
||||
db_type = "Enum",
|
||||
|
@ -114,7 +126,9 @@ pub enum PollNotevisibilityEnum {
|
|||
#[sea_orm(string_value = "specified")]
|
||||
Specified,
|
||||
}
|
||||
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum)]
|
||||
#[derive(Debug, PartialEq, Eq, EnumIter, DeriveActiveEnum)]
|
||||
#[cfg_attr(not(feature = "napi"), derive(Clone))]
|
||||
#[cfg_attr(feature = "napi", napi_derive::napi)]
|
||||
#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "relay_status_enum")]
|
||||
pub enum RelayStatusEnum {
|
||||
#[sea_orm(string_value = "accepted")]
|
||||
|
@ -124,7 +138,9 @@ pub enum RelayStatusEnum {
|
|||
#[sea_orm(string_value = "requesting")]
|
||||
Requesting,
|
||||
}
|
||||
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum)]
|
||||
#[derive(Debug, PartialEq, Eq, EnumIter, DeriveActiveEnum)]
|
||||
#[cfg_attr(not(feature = "napi"), derive(Clone))]
|
||||
#[cfg_attr(feature = "napi", napi_derive::napi)]
|
||||
#[sea_orm(
|
||||
rs_type = "String",
|
||||
db_type = "Enum",
|
||||
|
@ -140,7 +156,9 @@ pub enum UserEmojimodpermEnum {
|
|||
#[sea_orm(string_value = "unauthorized")]
|
||||
Unauthorized,
|
||||
}
|
||||
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum)]
|
||||
#[derive(Debug, PartialEq, Eq, EnumIter, DeriveActiveEnum)]
|
||||
#[cfg_attr(not(feature = "napi"), derive(Clone))]
|
||||
#[cfg_attr(feature = "napi", napi_derive::napi)]
|
||||
#[sea_orm(
|
||||
rs_type = "String",
|
||||
db_type = "Enum",
|
||||
|
@ -154,7 +172,9 @@ pub enum UserProfileFfvisibilityEnum {
|
|||
#[sea_orm(string_value = "public")]
|
||||
Public,
|
||||
}
|
||||
#[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum)]
|
||||
#[derive(Debug, PartialEq, Eq, EnumIter, DeriveActiveEnum)]
|
||||
#[cfg_attr(not(feature = "napi"), derive(Clone))]
|
||||
#[cfg_attr(feature = "napi", napi_derive::napi)]
|
||||
#[sea_orm(
|
||||
rs_type = "String",
|
||||
db_type = "Enum",
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "signin")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "Signin", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "userId")]
|
||||
pub user_id: String,
|
||||
pub ip: String,
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "sw_subscription")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "SwSubscription", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "userId")]
|
||||
pub user_id: String,
|
||||
pub endpoint: String,
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "used_username")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "UsedUsername", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub username: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
||||
|
|
|
@ -5,15 +5,19 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "user")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "User", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "updatedAt")]
|
||||
pub updated_at: Option<DateTimeWithTimeZone>,
|
||||
pub updated_at: Option<DateTime>,
|
||||
#[sea_orm(column_name = "lastFetchedAt")]
|
||||
pub last_fetched_at: Option<DateTimeWithTimeZone>,
|
||||
pub last_fetched_at: Option<DateTime>,
|
||||
pub username: String,
|
||||
#[sea_orm(column_name = "usernameLower")]
|
||||
pub username_lower: String,
|
||||
|
@ -57,7 +61,7 @@ pub struct Model {
|
|||
#[sea_orm(column_name = "followersUri")]
|
||||
pub followers_uri: Option<String>,
|
||||
#[sea_orm(column_name = "lastActiveDate")]
|
||||
pub last_active_date: Option<DateTimeWithTimeZone>,
|
||||
pub last_active_date: Option<DateTime>,
|
||||
#[sea_orm(column_name = "hideOnlineStatus")]
|
||||
pub hide_online_status: bool,
|
||||
#[sea_orm(column_name = "isDeleted")]
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "user_group")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "UserGroup", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
pub name: String,
|
||||
#[sea_orm(column_name = "userId")]
|
||||
pub user_id: String,
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "user_group_invitation")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "UserGroupInvitation", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "userId")]
|
||||
pub user_id: String,
|
||||
#[sea_orm(column_name = "userGroupId")]
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "user_group_invite")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "UserGroupInvite", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "userId")]
|
||||
pub user_id: String,
|
||||
#[sea_orm(column_name = "userGroupId")]
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "user_group_joining")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "UserGroupJoining", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "userId")]
|
||||
pub user_id: String,
|
||||
#[sea_orm(column_name = "userGroupId")]
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "user_ip")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "UserIp", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key)]
|
||||
pub id: i32,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "userId")]
|
||||
pub user_id: String,
|
||||
pub ip: String,
|
||||
|
|
|
@ -4,6 +4,10 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "user_keypair")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "UserKeypair", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(column_name = "userId", primary_key, auto_increment = false, unique)]
|
||||
pub user_id: String,
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "user_list")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "UserList", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "userId")]
|
||||
pub user_id: String,
|
||||
pub name: String,
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "user_list_joining")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "UserListJoining", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "userId")]
|
||||
pub user_id: String,
|
||||
#[sea_orm(column_name = "userListId")]
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "user_note_pining")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "UserNotePining", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "userId")]
|
||||
pub user_id: String,
|
||||
#[sea_orm(column_name = "noteId")]
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "user_pending")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "UserPending", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
pub code: String,
|
||||
pub username: String,
|
||||
pub email: String,
|
||||
|
|
|
@ -6,6 +6,10 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "user_profile")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "UserProfile", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(column_name = "userId", primary_key, auto_increment = false, unique)]
|
||||
pub user_id: String,
|
||||
|
|
|
@ -4,6 +4,10 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "user_publickey")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "UserPublickey", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(column_name = "userId", primary_key, auto_increment = false, unique)]
|
||||
pub user_id: String,
|
||||
|
|
|
@ -4,6 +4,10 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "user_security_key")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "UserSecurityKey", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
|
@ -12,7 +16,7 @@ pub struct Model {
|
|||
#[sea_orm(column_name = "publicKey")]
|
||||
pub public_key: String,
|
||||
#[sea_orm(column_name = "lastUsed")]
|
||||
pub last_used: DateTimeWithTimeZone,
|
||||
pub last_used: DateTime,
|
||||
pub name: String,
|
||||
}
|
||||
|
||||
|
|
|
@ -4,11 +4,15 @@ use sea_orm::entity::prelude::*;
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "webhook")]
|
||||
#[cfg_attr(
|
||||
feature = "napi",
|
||||
napi_derive::napi(object, js_name = "Webhook", use_nullable = true)
|
||||
)]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
#[sea_orm(column_name = "createdAt")]
|
||||
pub created_at: DateTimeWithTimeZone,
|
||||
pub created_at: DateTime,
|
||||
#[sea_orm(column_name = "userId")]
|
||||
pub user_id: String,
|
||||
pub name: String,
|
||||
|
@ -17,7 +21,7 @@ pub struct Model {
|
|||
pub secret: String,
|
||||
pub active: bool,
|
||||
#[sea_orm(column_name = "latestSentAt")]
|
||||
pub latest_sent_at: Option<DateTimeWithTimeZone>,
|
||||
pub latest_sent_at: Option<DateTime>,
|
||||
#[sea_orm(column_name = "latestStatus")]
|
||||
pub latest_status: Option<i32>,
|
||||
}
|
||||
|
|
|
@ -0,0 +1,459 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class DropTimeZone1712425488543 implements MigrationInterface {
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "abuse_user_report" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "access_token" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "access_token" ALTER "lastUsedAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "ad" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "ad" ALTER "expiresAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "announcement" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "announcement" ALTER "updatedAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "announcement_read" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "antenna" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "app" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "attestation_challenge" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "auth_session" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "blocking" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "channel" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "channel" ALTER "lastNotedAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "channel_following" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "channel_note_pining" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "clip" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "drive_file" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "drive_folder" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "emoji" ALTER "updatedAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "following" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "follow_request" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "gallery_like" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "gallery_post" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "gallery_post" ALTER "updatedAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "instance" ALTER "caughtAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "instance" ALTER "infoUpdatedAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "instance" ALTER "lastCommunicatedAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "instance" ALTER "latestRequestReceivedAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "instance" ALTER "latestRequestSentAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "messaging_message" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "moderation_log" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "muting" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "muting" ALTER "expiresAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "note" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "note" ALTER "updatedAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "note_edit" ALTER "updatedAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "note_favorite" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "note_reaction" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "note_thread_muting" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "note_watching" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "notification" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "page" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "page" ALTER "updatedAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "page_like" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "password_reset_request" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "poll" ALTER "expiresAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "poll_vote" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "promo_note" ALTER "expiresAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "promo_read" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "registration_ticket" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "registry_item" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "registry_item" ALTER "updatedAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "renote_muting" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "reply_muting" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "signin" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "sw_subscription" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "used_username" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "user" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "user" ALTER "lastActiveDate" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "user" ALTER "lastFetchedAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "user" ALTER "updatedAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "user_group" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "user_group_invitation" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "user_group_invite" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "user_group_joining" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "user_ip" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "user_list" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "user_list_joining" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "user_note_pining" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "user_pending" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "user_security_key" ALTER "lastUsed" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "webhook" ALTER "createdAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "webhook" ALTER "latestSentAt" TYPE timestamp without time zone`,
|
||||
);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "abuse_user_report" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "access_token" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "access_token" ALTER "lastUsedAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "ad" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "ad" ALTER "expiresAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "announcement" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "announcement" ALTER "updatedAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "announcement_read" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "antenna" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "app" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "attestation_challenge" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "auth_session" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "blocking" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "channel" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "channel" ALTER "lastNotedAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "channel_following" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "channel_note_pining" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "clip" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "drive_file" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "drive_folder" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "emoji" ALTER "updatedAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "following" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "follow_request" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "gallery_like" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "gallery_post" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "gallery_post" ALTER "updatedAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "instance" ALTER "caughtAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "instance" ALTER "infoUpdatedAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "instance" ALTER "lastCommunicatedAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "instance" ALTER "latestRequestReceivedAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "instance" ALTER "latestRequestSentAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "messaging_message" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "moderation_log" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "muting" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "muting" ALTER "expiresAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "note" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "note" ALTER "updatedAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "note_edit" ALTER "updatedAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "note_favorite" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "note_reaction" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "note_thread_muting" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "note_watching" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "notification" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "page" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "page" ALTER "updatedAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "page_like" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "password_reset_request" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "poll" ALTER "expiresAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "poll_vote" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "promo_note" ALTER "expiresAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "promo_read" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "registration_ticket" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "registry_item" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "registry_item" ALTER "updatedAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "renote_muting" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "reply_muting" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "signin" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "sw_subscription" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "used_username" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "user" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "user" ALTER "lastActiveDate" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "user" ALTER "lastFetchedAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "user" ALTER "updatedAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "user_group" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "user_group_invitation" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "user_group_invite" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "user_group_joining" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "user_ip" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "user_list" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "user_list_joining" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "user_note_pining" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "user_pending" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "user_security_key" ALTER "lastUsed" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "webhook" ALTER "createdAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "webhook" ALTER "latestSentAt" TYPE timestamp with time zone`,
|
||||
);
|
||||
}
|
||||
}
|
|
@ -15,7 +15,7 @@ export class AbuseUserReport {
|
|||
public id: string;
|
||||
|
||||
@Index()
|
||||
@Column("timestamp with time zone", {
|
||||
@Column("timestamp without time zone", {
|
||||
comment: "The created date of the AbuseUserReport.",
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
|
|
@ -15,12 +15,12 @@ export class AccessToken {
|
|||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@Column("timestamp with time zone", {
|
||||
@Column("timestamp without time zone", {
|
||||
comment: "The created date of the AccessToken.",
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@Column("timestamp with time zone", {
|
||||
@Column("timestamp without time zone", {
|
||||
nullable: true,
|
||||
})
|
||||
public lastUsedAt: Date | null;
|
||||
|
|
|
@ -7,13 +7,13 @@ export class Ad {
|
|||
public id: string;
|
||||
|
||||
@Index()
|
||||
@Column("timestamp with time zone", {
|
||||
@Column("timestamp without time zone", {
|
||||
comment: "The created date of the Ad.",
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@Index()
|
||||
@Column("timestamp with time zone", {
|
||||
@Column("timestamp without time zone", {
|
||||
comment: "The expired date of the Ad.",
|
||||
})
|
||||
public expiresAt: Date;
|
||||
|
|
|
@ -16,7 +16,7 @@ export class AnnouncementRead {
|
|||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@Column("timestamp with time zone", {
|
||||
@Column("timestamp without time zone", {
|
||||
comment: "The created date of the AnnouncementRead.",
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
|
|
@ -7,12 +7,12 @@ export class Announcement {
|
|||
public id: string;
|
||||
|
||||
@Index()
|
||||
@Column("timestamp with time zone", {
|
||||
@Column("timestamp without time zone", {
|
||||
comment: "The created date of the Announcement.",
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@Column("timestamp with time zone", {
|
||||
@Column("timestamp without time zone", {
|
||||
comment: "The updated date of the Announcement.",
|
||||
nullable: true,
|
||||
})
|
||||
|
|
|
@ -16,7 +16,7 @@ export class Antenna {
|
|||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@Column("timestamp with time zone", {
|
||||
@Column("timestamp without time zone", {
|
||||
comment: "The created date of the Antenna.",
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
|
|
@ -8,7 +8,7 @@ export class App {
|
|||
public id: string;
|
||||
|
||||
@Index()
|
||||
@Column("timestamp with time zone", {
|
||||
@Column("timestamp without time zone", {
|
||||
comment: "The created date of the App.",
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
|
|
@ -31,7 +31,7 @@ export class AttestationChallenge {
|
|||
})
|
||||
public challenge: string;
|
||||
|
||||
@Column("timestamp with time zone", {
|
||||
@Column("timestamp without time zone", {
|
||||
comment: "The date challenge was created for expiry purposes.",
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
|
|
@ -15,7 +15,7 @@ export class AuthSession {
|
|||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@Column("timestamp with time zone", {
|
||||
@Column("timestamp without time zone", {
|
||||
comment: "The created date of the AuthSession.",
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
|
|
@ -16,7 +16,7 @@ export class Blocking {
|
|||
public id: string;
|
||||
|
||||
@Index()
|
||||
@Column("timestamp with time zone", {
|
||||
@Column("timestamp without time zone", {
|
||||
comment: "The created date of the Blocking.",
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
|
|
@ -17,7 +17,7 @@ export class ChannelFollowing {
|
|||
public id: string;
|
||||
|
||||
@Index()
|
||||
@Column("timestamp with time zone", {
|
||||
@Column("timestamp without time zone", {
|
||||
comment: "The created date of the ChannelFollowing.",
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
|
|
@ -16,7 +16,7 @@ export class ChannelNotePining {
|
|||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@Column("timestamp with time zone", {
|
||||
@Column("timestamp without time zone", {
|
||||
comment: "The created date of the ChannelNotePining.",
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
|
|
@ -16,13 +16,13 @@ export class Channel {
|
|||
public id: string;
|
||||
|
||||
@Index()
|
||||
@Column("timestamp with time zone", {
|
||||
@Column("timestamp without time zone", {
|
||||
comment: "The created date of the Channel.",
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@Index()
|
||||
@Column("timestamp with time zone", {
|
||||
@Column("timestamp without time zone", {
|
||||
nullable: true,
|
||||
})
|
||||
public lastNotedAt: Date | null;
|
||||
|
|
|
@ -14,7 +14,7 @@ export class Clip {
|
|||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@Column("timestamp with time zone", {
|
||||
@Column("timestamp without time zone", {
|
||||
comment: "The created date of the Clip.",
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
|
|
@ -23,7 +23,7 @@ export class DriveFile {
|
|||
public id: string;
|
||||
|
||||
@Index()
|
||||
@Column("timestamp with time zone", {
|
||||
@Column("timestamp without time zone", {
|
||||
comment: "The created date of the DriveFile.",
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
|
|
@ -15,7 +15,7 @@ export class DriveFolder {
|
|||
public id: string;
|
||||
|
||||
@Index()
|
||||
@Column("timestamp with time zone", {
|
||||
@Column("timestamp without time zone", {
|
||||
comment: "The created date of the DriveFolder.",
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
|
|
@ -7,7 +7,7 @@ export class Emoji {
|
|||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@Column("timestamp with time zone", {
|
||||
@Column("timestamp without time zone", {
|
||||
nullable: true,
|
||||
})
|
||||
public updatedAt: Date | null;
|
||||
|
|
|
@ -15,7 +15,7 @@ export class FollowRequest {
|
|||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@Column("timestamp with time zone", {
|
||||
@Column("timestamp without time zone", {
|
||||
comment: "The created date of the FollowRequest.",
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
|
|
@ -16,7 +16,7 @@ export class Following {
|
|||
public id: string;
|
||||
|
||||
@Index()
|
||||
@Column("timestamp with time zone", {
|
||||
@Column("timestamp without time zone", {
|
||||
comment: "The created date of the Following.",
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
|
|
@ -16,7 +16,7 @@ export class GalleryLike {
|
|||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@Column("timestamp with time zone")
|
||||
@Column("timestamp without time zone")
|
||||
public createdAt: Date;
|
||||
|
||||
@Index()
|
||||
|
|
|
@ -16,13 +16,13 @@ export class GalleryPost {
|
|||
public id: string;
|
||||
|
||||
@Index()
|
||||
@Column("timestamp with time zone", {
|
||||
@Column("timestamp without time zone", {
|
||||
comment: "The created date of the GalleryPost.",
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@Index()
|
||||
@Column("timestamp with time zone", {
|
||||
@Column("timestamp without time zone", {
|
||||
comment: "The updated date of the GalleryPost.",
|
||||
})
|
||||
public updatedAt: Date;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue