This commit is contained in:
syuilo 2023-08-15 17:38:39 +09:00
parent fd8d9f322c
commit 77e4feb507
66 changed files with 66 additions and 66 deletions

View File

@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typ
import { id } from '../id.js'; import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
@Entity() @Entity('abuse_user_report')
export class MiAbuseUserReport { export class MiAbuseUserReport {
@PrimaryColumn(id()) @PrimaryColumn(id())
public id: string; public id: string;

View File

@ -8,7 +8,7 @@ import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
import { MiApp } from './App.js'; import { MiApp } from './App.js';
@Entity() @Entity('access_token')
export class MiAccessToken { export class MiAccessToken {
@PrimaryColumn(id()) @PrimaryColumn(id())
public id: string; public id: string;

View File

@ -6,7 +6,7 @@
import { Entity, Index, Column, PrimaryColumn } from 'typeorm'; import { Entity, Index, Column, PrimaryColumn } from 'typeorm';
import { id } from '../id.js'; import { id } from '../id.js';
@Entity() @Entity('ad')
export class MiAd { export class MiAd {
@PrimaryColumn(id()) @PrimaryColumn(id())
public id: string; public id: string;

View File

@ -7,7 +7,7 @@ import { Entity, Index, Column, PrimaryColumn, ManyToOne, JoinColumn } from 'typ
import { id } from '../id.js'; import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
@Entity() @Entity('announcement')
export class MiAnnouncement { export class MiAnnouncement {
@PrimaryColumn(id()) @PrimaryColumn(id())
public id: string; public id: string;

View File

@ -8,7 +8,7 @@ import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
import { MiAnnouncement } from './Announcement.js'; import { MiAnnouncement } from './Announcement.js';
@Entity() @Entity('announcement_read')
@Index(['userId', 'announcementId'], { unique: true }) @Index(['userId', 'announcementId'], { unique: true })
export class MiAnnouncementRead { export class MiAnnouncementRead {
@PrimaryColumn(id()) @PrimaryColumn(id())

View File

@ -8,7 +8,7 @@ import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
import { MiUserList } from './UserList.js'; import { MiUserList } from './UserList.js';
@Entity() @Entity('antenna')
export class MiAntenna { export class MiAntenna {
@PrimaryColumn(id()) @PrimaryColumn(id())
public id: string; public id: string;

View File

@ -7,7 +7,7 @@ import { Entity, PrimaryColumn, Column, Index, ManyToOne } from 'typeorm';
import { id } from '../id.js'; import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
@Entity() @Entity('app')
export class MiApp { export class MiApp {
@PrimaryColumn(id()) @PrimaryColumn(id())
public id: string; public id: string;

View File

@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, JoinColumn, Column, ManyToOne, Index } from 'typ
import { id } from '../id.js'; import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
@Entity() @Entity('attestation_challenge')
export class MiAttestationChallenge { export class MiAttestationChallenge {
@PrimaryColumn(id()) @PrimaryColumn(id())
public id: string; public id: string;

View File

@ -8,7 +8,7 @@ import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
import { MiApp } from './App.js'; import { MiApp } from './App.js';
@Entity() @Entity('auth_session')
export class MiAuthSession { export class MiAuthSession {
@PrimaryColumn(id()) @PrimaryColumn(id())
public id: string; public id: string;

View File

@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typ
import { id } from '../id.js'; import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
@Entity() @Entity('blocking')
@Index(['blockerId', 'blockeeId'], { unique: true }) @Index(['blockerId', 'blockeeId'], { unique: true })
export class MiBlocking { export class MiBlocking {
@PrimaryColumn(id()) @PrimaryColumn(id())

View File

@ -8,7 +8,7 @@ import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
import { MiDriveFile } from './DriveFile.js'; import { MiDriveFile } from './DriveFile.js';
@Entity() @Entity('channel')
export class MiChannel { export class MiChannel {
@PrimaryColumn(id()) @PrimaryColumn(id())
public id: string; public id: string;

View File

@ -8,7 +8,7 @@ import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
import { MiChannel } from './Channel.js'; import { MiChannel } from './Channel.js';
@Entity() @Entity('channel_favorite')
@Index(['userId', 'channelId'], { unique: true }) @Index(['userId', 'channelId'], { unique: true })
export class MiChannelFavorite { export class MiChannelFavorite {
@PrimaryColumn(id()) @PrimaryColumn(id())

View File

@ -8,7 +8,7 @@ import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
import { MiChannel } from './Channel.js'; import { MiChannel } from './Channel.js';
@Entity() @Entity('channel_following')
@Index(['followerId', 'followeeId'], { unique: true }) @Index(['followerId', 'followeeId'], { unique: true })
export class MiChannelFollowing { export class MiChannelFollowing {
@PrimaryColumn(id()) @PrimaryColumn(id())

View File

@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typ
import { id } from '../id.js'; import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
@Entity() @Entity('clip')
export class MiClip { export class MiClip {
@PrimaryColumn(id()) @PrimaryColumn(id())
public id: string; public id: string;

View File

@ -8,7 +8,7 @@ import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
import { MiClip } from './Clip.js'; import { MiClip } from './Clip.js';
@Entity() @Entity('clip_favorite')
@Index(['userId', 'clipId'], { unique: true }) @Index(['userId', 'clipId'], { unique: true })
export class MiClipFavorite { export class MiClipFavorite {
@PrimaryColumn(id()) @PrimaryColumn(id())

View File

@ -8,7 +8,7 @@ import { id } from '../id.js';
import { MiNote } from './Note.js'; import { MiNote } from './Note.js';
import { MiClip } from './Clip.js'; import { MiClip } from './Clip.js';
@Entity() @Entity('clip_note')
@Index(['noteId', 'clipId'], { unique: true }) @Index(['noteId', 'clipId'], { unique: true })
export class MiClipNote { export class MiClipNote {
@PrimaryColumn(id()) @PrimaryColumn(id())

View File

@ -8,7 +8,7 @@ import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
import { MiDriveFolder } from './DriveFolder.js'; import { MiDriveFolder } from './DriveFolder.js';
@Entity() @Entity('drive_file')
@Index(['userId', 'folderId', 'id']) @Index(['userId', 'folderId', 'id'])
export class MiDriveFile { export class MiDriveFile {
@PrimaryColumn(id()) @PrimaryColumn(id())

View File

@ -7,7 +7,7 @@ import { JoinColumn, ManyToOne, Entity, PrimaryColumn, Index, Column } from 'typ
import { id } from '../id.js'; import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
@Entity() @Entity('drive_folder')
export class MiDriveFolder { export class MiDriveFolder {
@PrimaryColumn(id()) @PrimaryColumn(id())
public id: string; public id: string;

View File

@ -6,7 +6,7 @@
import { PrimaryColumn, Entity, Index, Column } from 'typeorm'; import { PrimaryColumn, Entity, Index, Column } from 'typeorm';
import { id } from '../id.js'; import { id } from '../id.js';
@Entity() @Entity('emoji')
@Index(['name', 'host'], { unique: true }) @Index(['name', 'host'], { unique: true })
export class MiEmoji { export class MiEmoji {
@PrimaryColumn(id()) @PrimaryColumn(id())

View File

@ -7,7 +7,7 @@ import { Entity, Index, JoinColumn, Column, PrimaryColumn, ManyToOne } from 'typ
import { id } from '../id.js'; import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
@Entity() @Entity('flash')
export class MiFlash { export class MiFlash {
@PrimaryColumn(id()) @PrimaryColumn(id())
public id: string; public id: string;

View File

@ -8,7 +8,7 @@ import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
import { MiFlash } from './Flash.js'; import { MiFlash } from './Flash.js';
@Entity() @Entity('flash_like')
@Index(['userId', 'flashId'], { unique: true }) @Index(['userId', 'flashId'], { unique: true })
export class MiFlashLike { export class MiFlashLike {
@PrimaryColumn(id()) @PrimaryColumn(id())

View File

@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typ
import { id } from '../id.js'; import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
@Entity() @Entity('follow_request')
@Index(['followerId', 'followeeId'], { unique: true }) @Index(['followerId', 'followeeId'], { unique: true })
export class MiFollowRequest { export class MiFollowRequest {
@PrimaryColumn(id()) @PrimaryColumn(id())

View File

@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typ
import { id } from '../id.js'; import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
@Entity() @Entity('following')
@Index(['followerId', 'followeeId'], { unique: true }) @Index(['followerId', 'followeeId'], { unique: true })
export class MiFollowing { export class MiFollowing {
@PrimaryColumn(id()) @PrimaryColumn(id())

View File

@ -8,7 +8,7 @@ import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
import { MiGalleryPost } from './GalleryPost.js'; import { MiGalleryPost } from './GalleryPost.js';
@Entity() @Entity('gallery_like')
@Index(['userId', 'postId'], { unique: true }) @Index(['userId', 'postId'], { unique: true })
export class MiGalleryLike { export class MiGalleryLike {
@PrimaryColumn(id()) @PrimaryColumn(id())

View File

@ -8,7 +8,7 @@ import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
import type { MiDriveFile } from './DriveFile.js'; import type { MiDriveFile } from './DriveFile.js';
@Entity() @Entity('gallery_post')
export class MiGalleryPost { export class MiGalleryPost {
@PrimaryColumn(id()) @PrimaryColumn(id())
public id: string; public id: string;

View File

@ -7,7 +7,7 @@ import { Entity, PrimaryColumn, Index, Column } from 'typeorm';
import { id } from '../id.js'; import { id } from '../id.js';
import type { MiUser } from './User.js'; import type { MiUser } from './User.js';
@Entity() @Entity('hashtag')
export class MiHashtag { export class MiHashtag {
@PrimaryColumn(id()) @PrimaryColumn(id())
public id: string; public id: string;

View File

@ -6,7 +6,7 @@
import { Entity, PrimaryColumn, Index, Column } from 'typeorm'; import { Entity, PrimaryColumn, Index, Column } from 'typeorm';
import { id } from '../id.js'; import { id } from '../id.js';
@Entity() @Entity('instance')
export class MiInstance { export class MiInstance {
@PrimaryColumn(id()) @PrimaryColumn(id())
public id: string; public id: string;

View File

@ -7,7 +7,7 @@ import { Entity, Column, PrimaryColumn, ManyToOne, JoinColumn } from 'typeorm';
import { id } from '../id.js'; import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
@Entity() @Entity('meta')
export class MiMeta { export class MiMeta {
@PrimaryColumn({ @PrimaryColumn({
type: 'varchar', type: 'varchar',

View File

@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typ
import { id } from '../id.js'; import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
@Entity() @Entity('moderation_log')
export class MiModerationLog { export class MiModerationLog {
@PrimaryColumn(id()) @PrimaryColumn(id())
public id: string; public id: string;

View File

@ -9,7 +9,7 @@ import { mutedNoteReasons } from '../../types.js';
import { MiNote } from './Note.js'; import { MiNote } from './Note.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
@Entity() @Entity('muted_note')
@Index(['noteId', 'userId'], { unique: true }) @Index(['noteId', 'userId'], { unique: true })
export class MiMutedNote { export class MiMutedNote {
@PrimaryColumn(id()) @PrimaryColumn(id())

View File

@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typ
import { id } from '../id.js'; import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
@Entity() @Entity('muting')
@Index(['muterId', 'muteeId'], { unique: true }) @Index(['muterId', 'muteeId'], { unique: true })
export class MiMuting { export class MiMuting {
@PrimaryColumn(id()) @PrimaryColumn(id())

View File

@ -10,7 +10,7 @@ import { MiUser } from './User.js';
import { MiChannel } from './Channel.js'; import { MiChannel } from './Channel.js';
import type { MiDriveFile } from './DriveFile.js'; import type { MiDriveFile } from './DriveFile.js';
@Entity() @Entity('note')
@Index('IDX_NOTE_TAGS', { synchronize: false }) @Index('IDX_NOTE_TAGS', { synchronize: false })
@Index('IDX_NOTE_MENTIONS', { synchronize: false }) @Index('IDX_NOTE_MENTIONS', { synchronize: false })
@Index('IDX_NOTE_VISIBLE_USER_IDS', { synchronize: false }) @Index('IDX_NOTE_VISIBLE_USER_IDS', { synchronize: false })

View File

@ -8,7 +8,7 @@ import { id } from '../id.js';
import { MiNote } from './Note.js'; import { MiNote } from './Note.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
@Entity() @Entity('note_favorite')
@Index(['userId', 'noteId'], { unique: true }) @Index(['userId', 'noteId'], { unique: true })
export class MiNoteFavorite { export class MiNoteFavorite {
@PrimaryColumn(id()) @PrimaryColumn(id())

View File

@ -8,7 +8,7 @@ import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
import { MiNote } from './Note.js'; import { MiNote } from './Note.js';
@Entity() @Entity('note_reaction')
@Index(['userId', 'noteId'], { unique: true }) @Index(['userId', 'noteId'], { unique: true })
export class MiNoteReaction { export class MiNoteReaction {
@PrimaryColumn(id()) @PrimaryColumn(id())

View File

@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typ
import { id } from '../id.js'; import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
@Entity() @Entity('note_thread_muting')
@Index(['userId', 'threadId'], { unique: true }) @Index(['userId', 'threadId'], { unique: true })
export class MiNoteThreadMuting { export class MiNoteThreadMuting {
@PrimaryColumn(id()) @PrimaryColumn(id())

View File

@ -9,7 +9,7 @@ import { MiUser } from './User.js';
import { MiNote } from './Note.js'; import { MiNote } from './Note.js';
import type { MiChannel } from './Channel.js'; import type { MiChannel } from './Channel.js';
@Entity() @Entity('note_unread')
@Index(['userId', 'noteId'], { unique: true }) @Index(['userId', 'noteId'], { unique: true })
export class MiNoteUnread { export class MiNoteUnread {
@PrimaryColumn(id()) @PrimaryColumn(id())

View File

@ -8,7 +8,7 @@ import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
import { MiDriveFile } from './DriveFile.js'; import { MiDriveFile } from './DriveFile.js';
@Entity() @Entity('page')
@Index(['userId', 'name'], { unique: true }) @Index(['userId', 'name'], { unique: true })
export class MiPage { export class MiPage {
@PrimaryColumn(id()) @PrimaryColumn(id())

View File

@ -8,7 +8,7 @@ import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
import { MiPage } from './Page.js'; import { MiPage } from './Page.js';
@Entity() @Entity('page_like')
@Index(['userId', 'pageId'], { unique: true }) @Index(['userId', 'pageId'], { unique: true })
export class MiPageLike { export class MiPageLike {
@PrimaryColumn(id()) @PrimaryColumn(id())

View File

@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, Index, Column, ManyToOne, JoinColumn } from 'typ
import { id } from '../id.js'; import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
@Entity() @Entity('password_reset_request')
export class MiPasswordResetRequest { export class MiPasswordResetRequest {
@PrimaryColumn(id()) @PrimaryColumn(id())
public id: string; public id: string;

View File

@ -9,7 +9,7 @@ import { noteVisibilities } from '../../types.js';
import { MiNote } from './Note.js'; import { MiNote } from './Note.js';
import type { MiUser } from './User.js'; import type { MiUser } from './User.js';
@Entity() @Entity('poll')
export class MiPoll { export class MiPoll {
@PrimaryColumn(id()) @PrimaryColumn(id())
public noteId: MiNote['id']; public noteId: MiNote['id'];

View File

@ -8,7 +8,7 @@ import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
import { MiNote } from './Note.js'; import { MiNote } from './Note.js';
@Entity() @Entity('poll_vote')
@Index(['userId', 'noteId', 'choice'], { unique: true }) @Index(['userId', 'noteId', 'choice'], { unique: true })
export class MiPollVote { export class MiPollVote {
@PrimaryColumn(id()) @PrimaryColumn(id())

View File

@ -8,7 +8,7 @@ import { id } from '../id.js';
import { MiNote } from './Note.js'; import { MiNote } from './Note.js';
import type { MiUser } from './User.js'; import type { MiUser } from './User.js';
@Entity() @Entity('promo_note')
export class MiPromoNote { export class MiPromoNote {
@PrimaryColumn(id()) @PrimaryColumn(id())
public noteId: MiNote['id']; public noteId: MiNote['id'];

View File

@ -8,7 +8,7 @@ import { id } from '../id.js';
import { MiNote } from './Note.js'; import { MiNote } from './Note.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
@Entity() @Entity('promo_read')
@Index(['userId', 'noteId'], { unique: true }) @Index(['userId', 'noteId'], { unique: true })
export class MiPromoRead { export class MiPromoRead {
@PrimaryColumn(id()) @PrimaryColumn(id())

View File

@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, Index, Column, ManyToOne, JoinColumn, OneToOne }
import { id } from '../id.js'; import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
@Entity() @Entity('registration_ticket')
export class MiRegistrationTicket { export class MiRegistrationTicket {
@PrimaryColumn(id()) @PrimaryColumn(id())
public id: string; public id: string;

View File

@ -8,7 +8,7 @@ import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
// TODO: 同じdomain、同じscope、同じkeyのレコードは二つ以上存在しないように制約付けたい // TODO: 同じdomain、同じscope、同じkeyのレコードは二つ以上存在しないように制約付けたい
@Entity() @Entity('registry_item')
export class MiRegistryItem { export class MiRegistryItem {
@PrimaryColumn(id()) @PrimaryColumn(id())
public id: string; public id: string;

View File

@ -6,7 +6,7 @@
import { PrimaryColumn, Entity, Index, Column } from 'typeorm'; import { PrimaryColumn, Entity, Index, Column } from 'typeorm';
import { id } from '../id.js'; import { id } from '../id.js';
@Entity() @Entity('relay')
export class MiRelay { export class MiRelay {
@PrimaryColumn(id()) @PrimaryColumn(id())
public id: string; public id: string;

View File

@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typ
import { id } from '../id.js'; import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
@Entity() @Entity('renote_muting')
@Index(['muterId', 'muteeId'], { unique: true }) @Index(['muterId', 'muteeId'], { unique: true })
export class MiRenoteMuting { export class MiRenoteMuting {
@PrimaryColumn(id()) @PrimaryColumn(id())

View File

@ -7,7 +7,7 @@ import { Entity, PrimaryColumn, Index, Column } from 'typeorm';
import { id } from '../id.js'; import { id } from '../id.js';
import type { MiUser } from './User.js'; import type { MiUser } from './User.js';
@Entity() @Entity('retention_aggregation')
export class MiRetentionAggregation { export class MiRetentionAggregation {
@PrimaryColumn(id()) @PrimaryColumn(id())
public id: string; public id: string;

View File

@ -84,7 +84,7 @@ export type RoleCondFormulaValue =
CondFormulaValueNotesLessThanOrEq | CondFormulaValueNotesLessThanOrEq |
CondFormulaValueNotesMoreThanOrEq; CondFormulaValueNotesMoreThanOrEq;
@Entity() @Entity('role')
export class MiRole { export class MiRole {
@PrimaryColumn(id()) @PrimaryColumn(id())
public id: string; public id: string;

View File

@ -8,7 +8,7 @@ import { id } from '../id.js';
import { MiRole } from './Role.js'; import { MiRole } from './Role.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
@Entity() @Entity('role_assignment')
@Index(['userId', 'roleId'], { unique: true }) @Index(['userId', 'roleId'], { unique: true })
export class MiRoleAssignment { export class MiRoleAssignment {
@PrimaryColumn(id()) @PrimaryColumn(id())

View File

@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typ
import { id } from '../id.js'; import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
@Entity() @Entity('signin')
export class MiSignin { export class MiSignin {
@PrimaryColumn(id()) @PrimaryColumn(id())
public id: string; public id: string;

View File

@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typ
import { id } from '../id.js'; import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
@Entity() @Entity('sw_subscription')
export class MiSwSubscription { export class MiSwSubscription {
@PrimaryColumn(id()) @PrimaryColumn(id())
public id: string; public id: string;

View File

@ -5,7 +5,7 @@
import { PrimaryColumn, Entity, Column } from 'typeorm'; import { PrimaryColumn, Entity, Column } from 'typeorm';
@Entity() @Entity('used_username')
export class MiUsedUsername { export class MiUsedUsername {
@PrimaryColumn('varchar', { @PrimaryColumn('varchar', {
length: 128, length: 128,

View File

@ -7,7 +7,7 @@ import { Entity, Column, Index, OneToOne, JoinColumn, PrimaryColumn } from 'type
import { id } from '../id.js'; import { id } from '../id.js';
import { MiDriveFile } from './DriveFile.js'; import { MiDriveFile } from './DriveFile.js';
@Entity() @Entity('user')
@Index(['usernameLower', 'host'], { unique: true }) @Index(['usernameLower', 'host'], { unique: true })
export class MiUser { export class MiUser {
@PrimaryColumn(id()) @PrimaryColumn(id())

View File

@ -7,7 +7,7 @@ import { Entity, Index, Column, PrimaryGeneratedColumn } from 'typeorm';
import { id } from '../id.js'; import { id } from '../id.js';
import type { MiUser } from './User.js'; import type { MiUser } from './User.js';
@Entity() @Entity('user_ip')
@Index(['userId', 'ip'], { unique: true }) @Index(['userId', 'ip'], { unique: true })
export class MiUserIp { export class MiUserIp {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()

View File

@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, JoinColumn, Column, OneToOne } from 'typeorm';
import { id } from '../id.js'; import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
@Entity() @Entity('user_keypair')
export class MiUserKeypair { export class MiUserKeypair {
@PrimaryColumn(id()) @PrimaryColumn(id())
public userId: MiUser['id']; public userId: MiUser['id'];

View File

@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typ
import { id } from '../id.js'; import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
@Entity() @Entity('user_list')
export class MiUserList { export class MiUserList {
@PrimaryColumn(id()) @PrimaryColumn(id())
public id: string; public id: string;

View File

@ -8,7 +8,7 @@ import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
import { MiUserList } from './UserList.js'; import { MiUserList } from './UserList.js';
@Entity() @Entity('user_list_favorite')
@Index(['userId', 'userListId'], { unique: true }) @Index(['userId', 'userListId'], { unique: true })
export class MiUserListFavorite { export class MiUserListFavorite {
@PrimaryColumn(id()) @PrimaryColumn(id())

View File

@ -8,7 +8,7 @@ import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
import { MiUserList } from './UserList.js'; import { MiUserList } from './UserList.js';
@Entity() @Entity('user_list_joining')
@Index(['userId', 'userListId'], { unique: true }) @Index(['userId', 'userListId'], { unique: true })
export class MiUserListJoining { export class MiUserListJoining {
@PrimaryColumn(id()) @PrimaryColumn(id())

View File

@ -7,7 +7,7 @@ import { Column, Entity, Index, JoinColumn, ManyToOne, PrimaryColumn } from 'typ
import { id } from '../id.js'; import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
@Entity() @Entity('user_memo')
@Index(['userId', 'targetUserId'], { unique: true }) @Index(['userId', 'targetUserId'], { unique: true })
export class MiUserMemo { export class MiUserMemo {
@PrimaryColumn(id()) @PrimaryColumn(id())

View File

@ -8,7 +8,7 @@ import { id } from '../id.js';
import { MiNote } from './Note.js'; import { MiNote } from './Note.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
@Entity() @Entity('user_note_pining')
@Index(['userId', 'noteId'], { unique: true }) @Index(['userId', 'noteId'], { unique: true })
export class MiUserNotePining { export class MiUserNotePining {
@PrimaryColumn(id()) @PrimaryColumn(id())

View File

@ -6,7 +6,7 @@
import { PrimaryColumn, Entity, Index, Column } from 'typeorm'; import { PrimaryColumn, Entity, Index, Column } from 'typeorm';
import { id } from '../id.js'; import { id } from '../id.js';
@Entity() @Entity('user_pending')
export class MiUserPending { export class MiUserPending {
@PrimaryColumn(id()) @PrimaryColumn(id())
public id: string; public id: string;

View File

@ -11,7 +11,7 @@ import { MiPage } from './Page.js';
// TODO: このテーブルで管理している情報すべてレジストリで管理するようにしても良いかも // TODO: このテーブルで管理している情報すべてレジストリで管理するようにしても良いかも
// ただ、「emailVerified が true なユーザーを find する」のようなクエリは書けなくなるからウーン // ただ、「emailVerified が true なユーザーを find する」のようなクエリは書けなくなるからウーン
@Entity() @Entity('user_profile')
export class MiUserProfile { export class MiUserProfile {
@PrimaryColumn(id()) @PrimaryColumn(id())
public userId: MiUser['id']; public userId: MiUser['id'];

View File

@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, OneToOne } from 'type
import { id } from '../id.js'; import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
@Entity() @Entity('user_publickey')
export class MiUserPublickey { export class MiUserPublickey {
@PrimaryColumn(id()) @PrimaryColumn(id())
public userId: MiUser['id']; public userId: MiUser['id'];

View File

@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, JoinColumn, Column, ManyToOne, Index } from 'typ
import { id } from '../id.js'; import { id } from '../id.js';
import { MiUser } from './User.js'; import { MiUser } from './User.js';
@Entity() @Entity('user_security_key')
export class MiUserSecurityKey { export class MiUserSecurityKey {
@PrimaryColumn('varchar', { @PrimaryColumn('varchar', {
comment: 'Variable-length id given to navigator.credentials.get()', comment: 'Variable-length id given to navigator.credentials.get()',

View File

@ -9,7 +9,7 @@ import { MiUser } from './User.js';
export const webhookEventTypes = ['mention', 'unfollow', 'follow', 'followed', 'note', 'reply', 'renote', 'reaction'] as const; export const webhookEventTypes = ['mention', 'unfollow', 'follow', 'followed', 'note', 'reply', 'renote', 'reaction'] as const;
@Entity() @Entity('webhook')
export class MiWebhook { export class MiWebhook {
@PrimaryColumn(id()) @PrimaryColumn(id())
public id: string; public id: string;