mirror of
https://github.com/sim1222/misskey.git
synced 2025-08-05 16:24:41 +09:00
fix lint
This commit is contained in:
@ -9,7 +9,7 @@ export class AbuseUserReport {
|
||||
|
||||
@Index()
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the AbuseUserReport.'
|
||||
comment: 'The created date of the AbuseUserReport.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@ -18,7 +18,7 @@ export class AbuseUserReport {
|
||||
public targetUserId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public targetUser: User | null;
|
||||
@ -28,26 +28,26 @@ export class AbuseUserReport {
|
||||
public reporterId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public reporter: User | null;
|
||||
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public assigneeId: User['id'] | null;
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'SET NULL'
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
public assignee: User | null;
|
||||
|
||||
@Index()
|
||||
@Column('boolean', {
|
||||
default: false
|
||||
default: false,
|
||||
})
|
||||
public resolved: boolean;
|
||||
|
||||
@ -60,14 +60,14 @@ export class AbuseUserReport {
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true,
|
||||
comment: '[Denormalized]'
|
||||
comment: '[Denormalized]',
|
||||
})
|
||||
public targetUserHost: string | null;
|
||||
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true,
|
||||
comment: '[Denormalized]'
|
||||
comment: '[Denormalized]',
|
||||
})
|
||||
public reporterHost: string | null;
|
||||
//#endregion
|
||||
|
@ -9,7 +9,7 @@ export class AccessToken {
|
||||
public id: string;
|
||||
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the AccessToken.'
|
||||
comment: 'The created date of the AccessToken.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@ -21,7 +21,7 @@ export class AccessToken {
|
||||
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
length: 128
|
||||
length: 128,
|
||||
})
|
||||
public token: string;
|
||||
|
||||
@ -29,13 +29,13 @@ export class AccessToken {
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
nullable: true,
|
||||
default: null
|
||||
default: null,
|
||||
})
|
||||
public session: string | null;
|
||||
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
length: 128
|
||||
length: 128,
|
||||
})
|
||||
public hash: string;
|
||||
|
||||
@ -44,7 +44,7 @@ export class AccessToken {
|
||||
public userId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
@ -52,12 +52,12 @@ export class AccessToken {
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true,
|
||||
default: null
|
||||
default: null,
|
||||
})
|
||||
public appId: App['id'] | null;
|
||||
|
||||
@ManyToOne(type => App, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public app: App | null;
|
||||
@ -65,32 +65,32 @@ export class AccessToken {
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
nullable: true,
|
||||
default: null
|
||||
default: null,
|
||||
})
|
||||
public name: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512,
|
||||
nullable: true,
|
||||
default: null
|
||||
default: null,
|
||||
})
|
||||
public description: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512,
|
||||
nullable: true,
|
||||
default: null
|
||||
default: null,
|
||||
})
|
||||
public iconUrl: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 64, array: true,
|
||||
default: '{}'
|
||||
default: '{}',
|
||||
})
|
||||
public permission: string[];
|
||||
|
||||
@Column('boolean', {
|
||||
default: false
|
||||
default: false,
|
||||
})
|
||||
public fetched: boolean;
|
||||
}
|
||||
|
@ -8,44 +8,44 @@ export class Ad {
|
||||
|
||||
@Index()
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the Ad.'
|
||||
comment: 'The created date of the Ad.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@Index()
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The expired date of the Ad.'
|
||||
comment: 'The expired date of the Ad.',
|
||||
})
|
||||
public expiresAt: Date;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 32, nullable: false
|
||||
length: 32, nullable: false,
|
||||
})
|
||||
public place: string;
|
||||
|
||||
// 今は使われていないが将来的に活用される可能性はある
|
||||
@Column('varchar', {
|
||||
length: 32, nullable: false
|
||||
length: 32, nullable: false,
|
||||
})
|
||||
public priority: string;
|
||||
|
||||
@Column('integer', {
|
||||
default: 1, nullable: false
|
||||
default: 1, nullable: false,
|
||||
})
|
||||
public ratio: number;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 1024, nullable: false
|
||||
length: 1024, nullable: false,
|
||||
})
|
||||
public url: string;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 1024, nullable: false
|
||||
length: 1024, nullable: false,
|
||||
})
|
||||
public imageUrl: string;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 8192, nullable: false
|
||||
length: 8192, nullable: false,
|
||||
})
|
||||
public memo: string;
|
||||
|
||||
|
@ -10,7 +10,7 @@ export class AnnouncementRead {
|
||||
public id: string;
|
||||
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the AnnouncementRead.'
|
||||
comment: 'The created date of the AnnouncementRead.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@ -19,7 +19,7 @@ export class AnnouncementRead {
|
||||
public userId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
@ -29,7 +29,7 @@ export class AnnouncementRead {
|
||||
public announcementId: Announcement['id'];
|
||||
|
||||
@ManyToOne(type => Announcement, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public announcement: Announcement | null;
|
||||
|
@ -8,28 +8,28 @@ export class Announcement {
|
||||
|
||||
@Index()
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the Announcement.'
|
||||
comment: 'The created date of the Announcement.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The updated date of the Announcement.',
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public updatedAt: Date | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 8192, nullable: false
|
||||
length: 8192, nullable: false,
|
||||
})
|
||||
public text: string;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 256, nullable: false
|
||||
length: 256, nullable: false,
|
||||
})
|
||||
public title: string;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 1024, nullable: true
|
||||
length: 1024, nullable: true,
|
||||
})
|
||||
public imageUrl: string | null;
|
||||
|
||||
|
@ -12,12 +12,12 @@ export class AntennaNote {
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The note ID.'
|
||||
comment: 'The note ID.',
|
||||
})
|
||||
public noteId: Note['id'];
|
||||
|
||||
@ManyToOne(type => Note, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public note: Note | null;
|
||||
@ -25,19 +25,19 @@ export class AntennaNote {
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The antenna ID.'
|
||||
comment: 'The antenna ID.',
|
||||
})
|
||||
public antennaId: Antenna['id'];
|
||||
|
||||
@ManyToOne(type => Antenna, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public antenna: Antenna | null;
|
||||
|
||||
@Index()
|
||||
@Column('boolean', {
|
||||
default: false
|
||||
default: false,
|
||||
})
|
||||
public read: boolean;
|
||||
}
|
||||
|
@ -10,26 +10,26 @@ export class Antenna {
|
||||
public id: string;
|
||||
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the Antenna.'
|
||||
comment: 'The created date of the Antenna.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The owner ID.'
|
||||
comment: 'The owner ID.',
|
||||
})
|
||||
public userId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
comment: 'The name of the Antenna.'
|
||||
comment: 'The name of the Antenna.',
|
||||
})
|
||||
public name: string;
|
||||
|
||||
@ -38,51 +38,51 @@ export class Antenna {
|
||||
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public userListId: UserList['id'] | null;
|
||||
|
||||
@ManyToOne(type => UserList, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public userList: UserList | null;
|
||||
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public userGroupJoiningId: UserGroupJoining['id'] | null;
|
||||
|
||||
@ManyToOne(type => UserGroupJoining, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public userGroupJoining: UserGroupJoining | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 1024, array: true,
|
||||
default: '{}'
|
||||
default: '{}',
|
||||
})
|
||||
public users: string[];
|
||||
|
||||
@Column('jsonb', {
|
||||
default: []
|
||||
default: [],
|
||||
})
|
||||
public keywords: string[][];
|
||||
|
||||
@Column('jsonb', {
|
||||
default: []
|
||||
default: [],
|
||||
})
|
||||
public excludeKeywords: string[][];
|
||||
|
||||
@Column('boolean', {
|
||||
default: false
|
||||
default: false,
|
||||
})
|
||||
public caseSensitive: boolean;
|
||||
|
||||
@Column('boolean', {
|
||||
default: false
|
||||
default: false,
|
||||
})
|
||||
public withReplies: boolean;
|
||||
|
||||
|
@ -9,7 +9,7 @@ export class App {
|
||||
|
||||
@Index()
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the App.'
|
||||
comment: 'The created date of the App.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@ -17,7 +17,7 @@ export class App {
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true,
|
||||
comment: 'The owner ID.'
|
||||
comment: 'The owner ID.',
|
||||
})
|
||||
public userId: User['id'] | null;
|
||||
|
||||
@ -30,31 +30,31 @@ export class App {
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
length: 64,
|
||||
comment: 'The secret key of the App.'
|
||||
comment: 'The secret key of the App.',
|
||||
})
|
||||
public secret: string;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
comment: 'The name of the App.'
|
||||
comment: 'The name of the App.',
|
||||
})
|
||||
public name: string;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512,
|
||||
comment: 'The description of the App.'
|
||||
comment: 'The description of the App.',
|
||||
})
|
||||
public description: string;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 64, array: true,
|
||||
comment: 'The permission of the App.'
|
||||
comment: 'The permission of the App.',
|
||||
})
|
||||
public permission: string[];
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512, nullable: true,
|
||||
comment: 'The callbackUrl of the App.'
|
||||
comment: 'The callbackUrl of the App.',
|
||||
})
|
||||
public callbackUrl: string | null;
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ export class AttestationChallenge {
|
||||
public userId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
@ -20,19 +20,19 @@ export class AttestationChallenge {
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
length: 64,
|
||||
comment: 'Hex-encoded sha256 hash of the challenge.'
|
||||
comment: 'Hex-encoded sha256 hash of the challenge.',
|
||||
})
|
||||
public challenge: string;
|
||||
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The date challenge was created for expiry purposes.'
|
||||
comment: 'The date challenge was created for expiry purposes.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@Column('boolean', {
|
||||
comment:
|
||||
'Indicates that the challenge is only for registration purposes if true to prevent the challenge for being used as authentication.',
|
||||
default: false
|
||||
default: false,
|
||||
})
|
||||
public registrationChallenge: boolean;
|
||||
|
||||
|
@ -9,25 +9,25 @@ export class AuthSession {
|
||||
public id: string;
|
||||
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the AuthSession.'
|
||||
comment: 'The created date of the AuthSession.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
length: 128
|
||||
length: 128,
|
||||
})
|
||||
public token: string;
|
||||
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public userId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE',
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
@ -36,7 +36,7 @@ export class AuthSession {
|
||||
public appId: App['id'];
|
||||
|
||||
@ManyToOne(type => App, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public app: App | null;
|
||||
|
@ -10,19 +10,19 @@ export class Blocking {
|
||||
|
||||
@Index()
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the Blocking.'
|
||||
comment: 'The created date of the Blocking.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The blockee user ID.'
|
||||
comment: 'The blockee user ID.',
|
||||
})
|
||||
public blockeeId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public blockee: User | null;
|
||||
@ -30,12 +30,12 @@ export class Blocking {
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The blocker user ID.'
|
||||
comment: 'The blocker user ID.',
|
||||
})
|
||||
public blockerId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public blocker: User | null;
|
||||
|
@ -11,19 +11,19 @@ export class ChannelFollowing {
|
||||
|
||||
@Index()
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the ChannelFollowing.'
|
||||
comment: 'The created date of the ChannelFollowing.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The followee channel ID.'
|
||||
comment: 'The followee channel ID.',
|
||||
})
|
||||
public followeeId: Channel['id'];
|
||||
|
||||
@ManyToOne(type => Channel, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public followee: Channel | null;
|
||||
@ -31,12 +31,12 @@ export class ChannelFollowing {
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The follower user ID.'
|
||||
comment: 'The follower user ID.',
|
||||
})
|
||||
public followerId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public follower: User | null;
|
||||
|
@ -10,7 +10,7 @@ export class ChannelNotePining {
|
||||
public id: string;
|
||||
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the ChannelNotePining.'
|
||||
comment: 'The created date of the ChannelNotePining.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@ -19,7 +19,7 @@ export class ChannelNotePining {
|
||||
public channelId: Channel['id'];
|
||||
|
||||
@ManyToOne(type => Channel, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public channel: Channel | null;
|
||||
@ -28,7 +28,7 @@ export class ChannelNotePining {
|
||||
public noteId: Note['id'];
|
||||
|
||||
@ManyToOne(type => Note, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public note: Note | null;
|
||||
|
@ -10,13 +10,13 @@ export class Channel {
|
||||
|
||||
@Index()
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the Channel.'
|
||||
comment: 'The created date of the Channel.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@Index()
|
||||
@Column('timestamp with time zone', {
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public lastNotedAt: Date | null;
|
||||
|
||||
@ -24,37 +24,37 @@ export class Channel {
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true,
|
||||
comment: 'The owner ID.'
|
||||
comment: 'The owner ID.',
|
||||
})
|
||||
public userId: User['id'] | null;
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'SET NULL'
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
comment: 'The name of the Channel.'
|
||||
comment: 'The name of the Channel.',
|
||||
})
|
||||
public name: string;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 2048, nullable: true,
|
||||
comment: 'The description of the Channel.'
|
||||
comment: 'The description of the Channel.',
|
||||
})
|
||||
public description: string | null;
|
||||
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true,
|
||||
comment: 'The ID of banner Channel.'
|
||||
comment: 'The ID of banner Channel.',
|
||||
})
|
||||
public bannerId: DriveFile['id'] | null;
|
||||
|
||||
@ManyToOne(type => DriveFile, {
|
||||
onDelete: 'SET NULL'
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
public banner: DriveFile | null;
|
||||
@ -62,14 +62,14 @@ export class Channel {
|
||||
@Index()
|
||||
@Column('integer', {
|
||||
default: 0,
|
||||
comment: 'The count of notes.'
|
||||
comment: 'The count of notes.',
|
||||
})
|
||||
public notesCount: number;
|
||||
|
||||
@Index()
|
||||
@Column('integer', {
|
||||
default: 0,
|
||||
comment: 'The count of users.'
|
||||
comment: 'The count of users.',
|
||||
})
|
||||
public usersCount: number;
|
||||
}
|
||||
|
@ -12,12 +12,12 @@ export class ClipNote {
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The note ID.'
|
||||
comment: 'The note ID.',
|
||||
})
|
||||
public noteId: Note['id'];
|
||||
|
||||
@ManyToOne(type => Note, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public note: Note | null;
|
||||
@ -25,12 +25,12 @@ export class ClipNote {
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The clip ID.'
|
||||
comment: 'The clip ID.',
|
||||
})
|
||||
public clipId: Clip['id'];
|
||||
|
||||
@ManyToOne(type => Clip, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public clip: Clip | null;
|
||||
|
@ -8,37 +8,37 @@ export class Clip {
|
||||
public id: string;
|
||||
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the Clip.'
|
||||
comment: 'The created date of the Clip.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The owner ID.'
|
||||
comment: 'The owner ID.',
|
||||
})
|
||||
public userId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
comment: 'The name of the Clip.'
|
||||
comment: 'The name of the Clip.',
|
||||
})
|
||||
public name: string;
|
||||
|
||||
@Column('boolean', {
|
||||
default: false
|
||||
default: false,
|
||||
})
|
||||
public isPublic: boolean;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 2048, nullable: true, default: null,
|
||||
comment: 'The description of the Clip.'
|
||||
comment: 'The description of the Clip.',
|
||||
})
|
||||
public description: string | null;
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ export class DriveFile {
|
||||
|
||||
@Index()
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the DriveFile.'
|
||||
comment: 'The created date of the DriveFile.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@ -19,12 +19,12 @@ export class DriveFile {
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true,
|
||||
comment: 'The owner ID.'
|
||||
comment: 'The owner ID.',
|
||||
})
|
||||
public userId: User['id'] | null;
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'SET NULL'
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
@ -32,50 +32,50 @@ export class DriveFile {
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true,
|
||||
comment: 'The host of owner. It will be null if the user in local.'
|
||||
comment: 'The host of owner. It will be null if the user in local.',
|
||||
})
|
||||
public userHost: string | null;
|
||||
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
length: 32,
|
||||
comment: 'The MD5 hash of the DriveFile.'
|
||||
comment: 'The MD5 hash of the DriveFile.',
|
||||
})
|
||||
public md5: string;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 256,
|
||||
comment: 'The file name of the DriveFile.'
|
||||
comment: 'The file name of the DriveFile.',
|
||||
})
|
||||
public name: string;
|
||||
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
comment: 'The content type (MIME) of the DriveFile.'
|
||||
comment: 'The content type (MIME) of the DriveFile.',
|
||||
})
|
||||
public type: string;
|
||||
|
||||
@Column('integer', {
|
||||
comment: 'The file size (bytes) of the DriveFile.'
|
||||
comment: 'The file size (bytes) of the DriveFile.',
|
||||
})
|
||||
public size: number;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512, nullable: true,
|
||||
comment: 'The comment of the DriveFile.'
|
||||
comment: 'The comment of the DriveFile.',
|
||||
})
|
||||
public comment: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true,
|
||||
comment: 'The BlurHash string.'
|
||||
comment: 'The BlurHash string.',
|
||||
})
|
||||
public blurhash: string | null;
|
||||
|
||||
@Column('jsonb', {
|
||||
default: {},
|
||||
comment: 'The any properties of the DriveFile. For example, it includes image width/height.'
|
||||
comment: 'The any properties of the DriveFile. For example, it includes image width/height.',
|
||||
})
|
||||
public properties: { width?: number; height?: number; orientation?: number; avgColor?: string };
|
||||
|
||||
@ -85,19 +85,19 @@ export class DriveFile {
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512,
|
||||
comment: 'The URL of the DriveFile.'
|
||||
comment: 'The URL of the DriveFile.',
|
||||
})
|
||||
public url: string;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512, nullable: true,
|
||||
comment: 'The URL of the thumbnail of the DriveFile.'
|
||||
comment: 'The URL of the thumbnail of the DriveFile.',
|
||||
})
|
||||
public thumbnailUrl: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512, nullable: true,
|
||||
comment: 'The URL of the webpublic of the DriveFile.'
|
||||
comment: 'The URL of the webpublic of the DriveFile.',
|
||||
})
|
||||
public webpublicUrl: string | null;
|
||||
|
||||
@ -122,7 +122,7 @@ export class DriveFile {
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
length: 512, nullable: true,
|
||||
comment: 'The URI of the DriveFile. it will be null when the DriveFile is local.'
|
||||
comment: 'The URI of the DriveFile. it will be null when the DriveFile is local.',
|
||||
})
|
||||
public uri: string | null;
|
||||
|
||||
@ -135,12 +135,12 @@ export class DriveFile {
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true,
|
||||
comment: 'The parent folder ID. If null, it means the DriveFile is located in root.'
|
||||
comment: 'The parent folder ID. If null, it means the DriveFile is located in root.',
|
||||
})
|
||||
public folderId: DriveFolder['id'] | null;
|
||||
|
||||
@ManyToOne(type => DriveFolder, {
|
||||
onDelete: 'SET NULL'
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
public folder: DriveFolder | null;
|
||||
@ -148,7 +148,7 @@ export class DriveFile {
|
||||
@Index()
|
||||
@Column('boolean', {
|
||||
default: false,
|
||||
comment: 'Whether the DriveFile is NSFW.'
|
||||
comment: 'Whether the DriveFile is NSFW.',
|
||||
})
|
||||
public isSensitive: boolean;
|
||||
|
||||
@ -158,7 +158,7 @@ export class DriveFile {
|
||||
@Index()
|
||||
@Column('boolean', {
|
||||
default: false,
|
||||
comment: 'Whether the DriveFile is direct link to remote server.'
|
||||
comment: 'Whether the DriveFile is direct link to remote server.',
|
||||
})
|
||||
public isLink: boolean;
|
||||
}
|
||||
|
@ -9,13 +9,13 @@ export class DriveFolder {
|
||||
|
||||
@Index()
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the DriveFolder.'
|
||||
comment: 'The created date of the DriveFolder.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
comment: 'The name of the DriveFolder.'
|
||||
comment: 'The name of the DriveFolder.',
|
||||
})
|
||||
public name: string;
|
||||
|
||||
@ -23,12 +23,12 @@ export class DriveFolder {
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true,
|
||||
comment: 'The owner ID.'
|
||||
comment: 'The owner ID.',
|
||||
})
|
||||
public userId: User['id'] | null;
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
@ -37,12 +37,12 @@ export class DriveFolder {
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true,
|
||||
comment: 'The parent folder ID. If null, it means the DriveFolder is located in root.'
|
||||
comment: 'The parent folder ID. If null, it means the DriveFolder is located in root.',
|
||||
})
|
||||
public parentId: DriveFolder['id'] | null;
|
||||
|
||||
@ManyToOne(type => DriveFolder, {
|
||||
onDelete: 'SET NULL'
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
public parent: DriveFolder | null;
|
||||
|
@ -8,24 +8,24 @@ export class Emoji {
|
||||
public id: string;
|
||||
|
||||
@Column('timestamp with time zone', {
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public updatedAt: Date | null;
|
||||
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
length: 128
|
||||
length: 128,
|
||||
})
|
||||
public name: string;
|
||||
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true
|
||||
length: 128, nullable: true,
|
||||
})
|
||||
public host: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true
|
||||
length: 128, nullable: true,
|
||||
})
|
||||
public category: string | null;
|
||||
|
||||
@ -35,17 +35,17 @@ export class Emoji {
|
||||
public url: string;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512, nullable: true
|
||||
length: 512, nullable: true,
|
||||
})
|
||||
public uri: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 64, nullable: true
|
||||
length: 64, nullable: true,
|
||||
})
|
||||
public type: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
array: true, length: 128, default: '{}'
|
||||
array: true, length: 128, default: '{}',
|
||||
})
|
||||
public aliases: string[];
|
||||
}
|
||||
|
@ -9,19 +9,19 @@ export class FollowRequest {
|
||||
public id: string;
|
||||
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the FollowRequest.'
|
||||
comment: 'The created date of the FollowRequest.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The followee user ID.'
|
||||
comment: 'The followee user ID.',
|
||||
})
|
||||
public followeeId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public followee: User | null;
|
||||
@ -29,56 +29,56 @@ export class FollowRequest {
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The follower user ID.'
|
||||
comment: 'The follower user ID.',
|
||||
})
|
||||
public followerId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public follower: User | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true,
|
||||
comment: 'id of Follow Activity.'
|
||||
comment: 'id of Follow Activity.',
|
||||
})
|
||||
public requestId: string | null;
|
||||
|
||||
//#region Denormalized fields
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true,
|
||||
comment: '[Denormalized]'
|
||||
comment: '[Denormalized]',
|
||||
})
|
||||
public followerHost: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512, nullable: true,
|
||||
comment: '[Denormalized]'
|
||||
comment: '[Denormalized]',
|
||||
})
|
||||
public followerInbox: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512, nullable: true,
|
||||
comment: '[Denormalized]'
|
||||
comment: '[Denormalized]',
|
||||
})
|
||||
public followerSharedInbox: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true,
|
||||
comment: '[Denormalized]'
|
||||
comment: '[Denormalized]',
|
||||
})
|
||||
public followeeHost: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512, nullable: true,
|
||||
comment: '[Denormalized]'
|
||||
comment: '[Denormalized]',
|
||||
})
|
||||
public followeeInbox: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512, nullable: true,
|
||||
comment: '[Denormalized]'
|
||||
comment: '[Denormalized]',
|
||||
})
|
||||
public followeeSharedInbox: string | null;
|
||||
//#endregion
|
||||
|
@ -10,19 +10,19 @@ export class Following {
|
||||
|
||||
@Index()
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the Following.'
|
||||
comment: 'The created date of the Following.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The followee user ID.'
|
||||
comment: 'The followee user ID.',
|
||||
})
|
||||
public followeeId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public followee: User | null;
|
||||
@ -30,12 +30,12 @@ export class Following {
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The follower user ID.'
|
||||
comment: 'The follower user ID.',
|
||||
})
|
||||
public followerId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public follower: User | null;
|
||||
@ -43,37 +43,37 @@ export class Following {
|
||||
//#region Denormalized fields
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true,
|
||||
comment: '[Denormalized]'
|
||||
comment: '[Denormalized]',
|
||||
})
|
||||
public followerHost: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512, nullable: true,
|
||||
comment: '[Denormalized]'
|
||||
comment: '[Denormalized]',
|
||||
})
|
||||
public followerInbox: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512, nullable: true,
|
||||
comment: '[Denormalized]'
|
||||
comment: '[Denormalized]',
|
||||
})
|
||||
public followerSharedInbox: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true,
|
||||
comment: '[Denormalized]'
|
||||
comment: '[Denormalized]',
|
||||
})
|
||||
public followeeHost: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512, nullable: true,
|
||||
comment: '[Denormalized]'
|
||||
comment: '[Denormalized]',
|
||||
})
|
||||
public followeeInbox: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512, nullable: true,
|
||||
comment: '[Denormalized]'
|
||||
comment: '[Denormalized]',
|
||||
})
|
||||
public followeeSharedInbox: string | null;
|
||||
//#endregion
|
||||
|
@ -17,7 +17,7 @@ export class GalleryLike {
|
||||
public userId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
@ -26,7 +26,7 @@ export class GalleryLike {
|
||||
public postId: GalleryPost['id'];
|
||||
|
||||
@ManyToOne(type => GalleryPost, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public post: GalleryPost | null;
|
||||
|
@ -10,13 +10,13 @@ export class GalleryPost {
|
||||
|
||||
@Index()
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the GalleryPost.'
|
||||
comment: 'The created date of the GalleryPost.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@Index()
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The updated date of the GalleryPost.'
|
||||
comment: 'The updated date of the GalleryPost.',
|
||||
})
|
||||
public updatedAt: Date;
|
||||
|
||||
@ -26,19 +26,19 @@ export class GalleryPost {
|
||||
public title: string;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 2048, nullable: true
|
||||
length: 2048, nullable: true,
|
||||
})
|
||||
public description: string | null;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The ID of author.'
|
||||
comment: 'The ID of author.',
|
||||
})
|
||||
public userId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
@ -46,26 +46,26 @@ export class GalleryPost {
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
array: true, default: '{}'
|
||||
array: true, default: '{}',
|
||||
})
|
||||
public fileIds: DriveFile['id'][];
|
||||
|
||||
@Index()
|
||||
@Column('boolean', {
|
||||
default: false,
|
||||
comment: 'Whether the post is sensitive.'
|
||||
comment: 'Whether the post is sensitive.',
|
||||
})
|
||||
public isSensitive: boolean;
|
||||
|
||||
@Index()
|
||||
@Column('integer', {
|
||||
default: 0
|
||||
default: 0,
|
||||
})
|
||||
public likedCount: number;
|
||||
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
length: 128, array: true, default: '{}'
|
||||
length: 128, array: true, default: '{}',
|
||||
})
|
||||
public tags: string[];
|
||||
|
||||
|
@ -9,13 +9,13 @@ export class ReversiGame {
|
||||
|
||||
@Index()
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the ReversiGame.'
|
||||
comment: 'The created date of the ReversiGame.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@Column('timestamp with time zone', {
|
||||
nullable: true,
|
||||
comment: 'The started date of the ReversiGame.'
|
||||
comment: 'The started date of the ReversiGame.',
|
||||
})
|
||||
public startedAt: Date | null;
|
||||
|
||||
@ -23,7 +23,7 @@ export class ReversiGame {
|
||||
public user1Id: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user1: User | null;
|
||||
@ -32,7 +32,7 @@ export class ReversiGame {
|
||||
public user2Id: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user2: User | null;
|
||||
@ -69,13 +69,13 @@ export class ReversiGame {
|
||||
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public winnerId: User['id'] | null;
|
||||
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public surrendered: User['id'] | null;
|
||||
|
||||
@ -94,7 +94,7 @@ export class ReversiGame {
|
||||
public map: string[];
|
||||
|
||||
@Column('varchar', {
|
||||
length: 32
|
||||
length: 32,
|
||||
})
|
||||
public bw: string;
|
||||
|
||||
@ -127,7 +127,7 @@ export class ReversiGame {
|
||||
* ログのposを文字列としてすべて連結したもののCRC32値
|
||||
*/
|
||||
@Column('varchar', {
|
||||
length: 32, nullable: true
|
||||
length: 32, nullable: true,
|
||||
})
|
||||
public crc32: string | null;
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ export class ReversiMatching {
|
||||
|
||||
@Index()
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the ReversiMatching.'
|
||||
comment: 'The created date of the ReversiMatching.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@ -18,7 +18,7 @@ export class ReversiMatching {
|
||||
public parentId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public parent: User | null;
|
||||
@ -28,7 +28,7 @@ export class ReversiMatching {
|
||||
public childId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public child: User | null;
|
||||
|
@ -9,7 +9,7 @@ export class Hashtag {
|
||||
|
||||
@Index({ unique: true })
|
||||
@Column('varchar', {
|
||||
length: 128
|
||||
length: 128,
|
||||
})
|
||||
public name: string;
|
||||
|
||||
@ -21,7 +21,7 @@ export class Hashtag {
|
||||
|
||||
@Index()
|
||||
@Column('integer', {
|
||||
default: 0
|
||||
default: 0,
|
||||
})
|
||||
public mentionedUsersCount: number;
|
||||
|
||||
@ -33,7 +33,7 @@ export class Hashtag {
|
||||
|
||||
@Index()
|
||||
@Column('integer', {
|
||||
default: 0
|
||||
default: 0,
|
||||
})
|
||||
public mentionedLocalUsersCount: number;
|
||||
|
||||
@ -45,7 +45,7 @@ export class Hashtag {
|
||||
|
||||
@Index()
|
||||
@Column('integer', {
|
||||
default: 0
|
||||
default: 0,
|
||||
})
|
||||
public mentionedRemoteUsersCount: number;
|
||||
|
||||
@ -57,7 +57,7 @@ export class Hashtag {
|
||||
|
||||
@Index()
|
||||
@Column('integer', {
|
||||
default: 0
|
||||
default: 0,
|
||||
})
|
||||
public attachedUsersCount: number;
|
||||
|
||||
@ -69,7 +69,7 @@ export class Hashtag {
|
||||
|
||||
@Index()
|
||||
@Column('integer', {
|
||||
default: 0
|
||||
default: 0,
|
||||
})
|
||||
public attachedLocalUsersCount: number;
|
||||
|
||||
@ -81,7 +81,7 @@ export class Hashtag {
|
||||
|
||||
@Index()
|
||||
@Column('integer', {
|
||||
default: 0
|
||||
default: 0,
|
||||
})
|
||||
public attachedRemoteUsersCount: number;
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ export class Instance {
|
||||
*/
|
||||
@Index()
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The caught date of the Instance.'
|
||||
comment: 'The caught date of the Instance.',
|
||||
})
|
||||
public caughtAt: Date;
|
||||
|
||||
@ -21,7 +21,7 @@ export class Instance {
|
||||
@Index({ unique: true })
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
comment: 'The host of the Instance.'
|
||||
comment: 'The host of the Instance.',
|
||||
})
|
||||
public host: string;
|
||||
|
||||
@ -30,7 +30,7 @@ export class Instance {
|
||||
*/
|
||||
@Column('integer', {
|
||||
default: 0,
|
||||
comment: 'The count of the users of the Instance.'
|
||||
comment: 'The count of the users of the Instance.',
|
||||
})
|
||||
public usersCount: number;
|
||||
|
||||
@ -39,7 +39,7 @@ export class Instance {
|
||||
*/
|
||||
@Column('integer', {
|
||||
default: 0,
|
||||
comment: 'The count of the notes of the Instance.'
|
||||
comment: 'The count of the notes of the Instance.',
|
||||
})
|
||||
public notesCount: number;
|
||||
|
||||
@ -109,7 +109,7 @@ export class Instance {
|
||||
* このインスタンスと不通かどうか
|
||||
*/
|
||||
@Column('boolean', {
|
||||
default: false
|
||||
default: false,
|
||||
})
|
||||
public isNotResponding: boolean;
|
||||
|
||||
@ -118,13 +118,13 @@ export class Instance {
|
||||
*/
|
||||
@Index()
|
||||
@Column('boolean', {
|
||||
default: false
|
||||
default: false,
|
||||
})
|
||||
public isSuspended: boolean;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 64, nullable: true, default: null,
|
||||
comment: 'The software of the Instance.'
|
||||
comment: 'The software of the Instance.',
|
||||
})
|
||||
public softwareName: string | null;
|
||||
|
||||
|
@ -11,19 +11,19 @@ export class MessagingMessage {
|
||||
|
||||
@Index()
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the MessagingMessage.'
|
||||
comment: 'The created date of the MessagingMessage.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The sender user ID.'
|
||||
comment: 'The sender user ID.',
|
||||
})
|
||||
public userId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
@ -31,12 +31,12 @@ export class MessagingMessage {
|
||||
@Index()
|
||||
@Column({
|
||||
...id(), nullable: true,
|
||||
comment: 'The recipient user ID.'
|
||||
comment: 'The recipient user ID.',
|
||||
})
|
||||
public recipientId: User['id'] | null;
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public recipient: User | null;
|
||||
@ -44,18 +44,18 @@ export class MessagingMessage {
|
||||
@Index()
|
||||
@Column({
|
||||
...id(), nullable: true,
|
||||
comment: 'The recipient group ID.'
|
||||
comment: 'The recipient group ID.',
|
||||
})
|
||||
public groupId: UserGroup['id'] | null;
|
||||
|
||||
@ManyToOne(type => UserGroup, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public group: UserGroup | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 4096, nullable: true
|
||||
length: 4096, nullable: true,
|
||||
})
|
||||
public text: string | null;
|
||||
|
||||
@ -71,7 +71,7 @@ export class MessagingMessage {
|
||||
|
||||
@Column({
|
||||
...id(),
|
||||
array: true, default: '{}'
|
||||
array: true, default: '{}',
|
||||
})
|
||||
public reads: User['id'][];
|
||||
|
||||
@ -82,7 +82,7 @@ export class MessagingMessage {
|
||||
public fileId: DriveFile['id'] | null;
|
||||
|
||||
@ManyToOne(type => DriveFile, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public file: DriveFile | null;
|
||||
|
@ -7,17 +7,17 @@ import { Clip } from './clip';
|
||||
export class Meta {
|
||||
@PrimaryColumn({
|
||||
type: 'varchar',
|
||||
length: 32
|
||||
length: 32,
|
||||
})
|
||||
public id: string;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true
|
||||
length: 128, nullable: true,
|
||||
})
|
||||
public name: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 1024, nullable: true
|
||||
length: 1024, nullable: true,
|
||||
})
|
||||
public description: string | null;
|
||||
|
||||
@ -25,7 +25,7 @@ export class Meta {
|
||||
* メンテナの名前
|
||||
*/
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true
|
||||
length: 128, nullable: true,
|
||||
})
|
||||
public maintainerName: string | null;
|
||||
|
||||
@ -33,7 +33,7 @@ export class Meta {
|
||||
* メンテナの連絡先
|
||||
*/
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true
|
||||
length: 128, nullable: true,
|
||||
})
|
||||
public maintainerEmail: string | null;
|
||||
|
||||
@ -58,27 +58,27 @@ export class Meta {
|
||||
public useStarForReactionFallback: boolean;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 64, array: true, default: '{}'
|
||||
length: 64, array: true, default: '{}',
|
||||
})
|
||||
public langs: string[];
|
||||
|
||||
@Column('varchar', {
|
||||
length: 256, array: true, default: '{}'
|
||||
length: 256, array: true, default: '{}',
|
||||
})
|
||||
public pinnedUsers: string[];
|
||||
|
||||
@Column('varchar', {
|
||||
length: 256, array: true, default: '{}'
|
||||
length: 256, array: true, default: '{}',
|
||||
})
|
||||
public hiddenTags: string[];
|
||||
|
||||
@Column('varchar', {
|
||||
length: 256, array: true, default: '{}'
|
||||
length: 256, array: true, default: '{}',
|
||||
})
|
||||
public blockedHosts: string[];
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512, array: true, default: '{"/featured", "/channels", "/explore", "/pages", "/about-misskey"}'
|
||||
length: 512, array: true, default: '{"/featured", "/channels", "/explore", "/pages", "/about-misskey"}',
|
||||
})
|
||||
public pinnedPages: string[];
|
||||
|
||||
@ -91,38 +91,38 @@ export class Meta {
|
||||
@Column('varchar', {
|
||||
length: 512,
|
||||
nullable: true,
|
||||
default: '/assets/ai.png'
|
||||
default: '/assets/ai.png',
|
||||
})
|
||||
public mascotImageUrl: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512,
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public bannerUrl: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512,
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public backgroundImageUrl: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512,
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public logoImageUrl: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512,
|
||||
nullable: true,
|
||||
default: 'https://xn--931a.moe/aiart/yubitun.png'
|
||||
default: 'https://xn--931a.moe/aiart/yubitun.png',
|
||||
})
|
||||
public errorImageUrl: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512,
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public iconUrl: string | null;
|
||||
|
||||
@ -143,7 +143,7 @@ export class Meta {
|
||||
public proxyAccountId: User['id'] | null;
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'SET NULL'
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
public proxyAccount: User | null;
|
||||
@ -160,13 +160,13 @@ export class Meta {
|
||||
|
||||
@Column('varchar', {
|
||||
length: 64,
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public hcaptchaSiteKey: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 64,
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public hcaptchaSecretKey: string | null;
|
||||
|
||||
@ -177,37 +177,37 @@ export class Meta {
|
||||
|
||||
@Column('varchar', {
|
||||
length: 64,
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public recaptchaSiteKey: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 64,
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public recaptchaSecretKey: string | null;
|
||||
|
||||
@Column('integer', {
|
||||
default: 1024,
|
||||
comment: 'Drive capacity of a local user (MB)'
|
||||
comment: 'Drive capacity of a local user (MB)',
|
||||
})
|
||||
public localDriveCapacityMb: number;
|
||||
|
||||
@Column('integer', {
|
||||
default: 32,
|
||||
comment: 'Drive capacity of a remote user (MB)'
|
||||
comment: 'Drive capacity of a remote user (MB)',
|
||||
})
|
||||
public remoteDriveCapacityMb: number;
|
||||
|
||||
@Column('integer', {
|
||||
default: 500,
|
||||
comment: 'Max allowed note text length in characters'
|
||||
comment: 'Max allowed note text length in characters',
|
||||
})
|
||||
public maxNoteTextLength: number;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public summalyProxy: string | null;
|
||||
|
||||
@ -218,7 +218,7 @@ export class Meta {
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public email: string | null;
|
||||
|
||||
@ -229,24 +229,24 @@ export class Meta {
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public smtpHost: string | null;
|
||||
|
||||
@Column('integer', {
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public smtpPort: number | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public smtpUser: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public smtpPass: string | null;
|
||||
|
||||
@ -257,13 +257,13 @@ export class Meta {
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public swPublicKey: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public swPrivateKey: string | null;
|
||||
|
||||
@ -274,13 +274,13 @@ export class Meta {
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public twitterConsumerKey: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public twitterConsumerSecret: string | null;
|
||||
|
||||
@ -291,13 +291,13 @@ export class Meta {
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public githubClientId: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public githubClientSecret: string | null;
|
||||
|
||||
@ -308,19 +308,19 @@ export class Meta {
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public discordClientId: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public discordClientSecret: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public deeplAuthKey: string | null;
|
||||
|
||||
@ -331,21 +331,21 @@ export class Meta {
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512,
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public ToSUrl: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512,
|
||||
default: 'https://github.com/misskey-dev/misskey',
|
||||
nullable: false
|
||||
nullable: false,
|
||||
})
|
||||
public repositoryUrl: string;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512,
|
||||
default: 'https://github.com/misskey-dev/misskey/issues/new',
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public feedbackUrl: string | null;
|
||||
|
||||
@ -356,48 +356,48 @@ export class Meta {
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512,
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public objectStorageBucket: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512,
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public objectStoragePrefix: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512,
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public objectStorageBaseUrl: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512,
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public objectStorageEndpoint: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512,
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public objectStorageRegion: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512,
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public objectStorageAccessKey: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512,
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public objectStorageSecretKey: string | null;
|
||||
|
||||
@Column('integer', {
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public objectStoragePort: number | null;
|
||||
|
||||
|
@ -8,7 +8,7 @@ export class ModerationLog {
|
||||
public id: string;
|
||||
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the ModerationLog.'
|
||||
comment: 'The created date of the ModerationLog.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@ -17,7 +17,7 @@ export class ModerationLog {
|
||||
public userId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
|
@ -13,12 +13,12 @@ export class MutedNote {
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The note ID.'
|
||||
comment: 'The note ID.',
|
||||
})
|
||||
public noteId: Note['id'];
|
||||
|
||||
@ManyToOne(type => Note, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public note: Note | null;
|
||||
@ -26,12 +26,12 @@ export class MutedNote {
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The user ID.'
|
||||
comment: 'The user ID.',
|
||||
})
|
||||
public userId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
@ -42,7 +42,7 @@ export class MutedNote {
|
||||
@Index()
|
||||
@Column('enum', {
|
||||
enum: mutedNoteReasons,
|
||||
comment: 'The reason of the MutedNote.'
|
||||
comment: 'The reason of the MutedNote.',
|
||||
})
|
||||
public reason: typeof mutedNoteReasons[number];
|
||||
}
|
||||
|
@ -10,19 +10,19 @@ export class Muting {
|
||||
|
||||
@Index()
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the Muting.'
|
||||
comment: 'The created date of the Muting.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The mutee user ID.'
|
||||
comment: 'The mutee user ID.',
|
||||
})
|
||||
public muteeId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public mutee: User | null;
|
||||
@ -30,12 +30,12 @@ export class Muting {
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The muter user ID.'
|
||||
comment: 'The muter user ID.',
|
||||
})
|
||||
public muterId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public muter: User | null;
|
||||
|
@ -10,7 +10,7 @@ export class NoteFavorite {
|
||||
public id: string;
|
||||
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the NoteFavorite.'
|
||||
comment: 'The created date of the NoteFavorite.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@ -19,7 +19,7 @@ export class NoteFavorite {
|
||||
public userId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
@ -28,7 +28,7 @@ export class NoteFavorite {
|
||||
public noteId: Note['id'];
|
||||
|
||||
@ManyToOne(type => Note, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public note: Note | null;
|
||||
|
@ -11,7 +11,7 @@ export class NoteReaction {
|
||||
|
||||
@Index()
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the NoteReaction.'
|
||||
comment: 'The created date of the NoteReaction.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@ -20,7 +20,7 @@ export class NoteReaction {
|
||||
public userId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user?: User | null;
|
||||
@ -30,7 +30,7 @@ export class NoteReaction {
|
||||
public noteId: Note['id'];
|
||||
|
||||
@ManyToOne(type => Note, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public note?: Note | null;
|
||||
@ -38,7 +38,7 @@ export class NoteReaction {
|
||||
// TODO: 対象noteのuserIdを非正規化したい(「受け取ったリアクション一覧」のようなものを(JOIN無しで)実装したいため)
|
||||
|
||||
@Column('varchar', {
|
||||
length: 260
|
||||
length: 260,
|
||||
})
|
||||
public reaction: string;
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ export class NoteThreadMuting {
|
||||
public userId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
|
@ -15,7 +15,7 @@ export class NoteUnread {
|
||||
public userId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
@ -25,7 +25,7 @@ export class NoteUnread {
|
||||
public noteId: Note['id'];
|
||||
|
||||
@ManyToOne(type => Note, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public note: Note | null;
|
||||
@ -48,7 +48,7 @@ export class NoteUnread {
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: '[Denormalized]'
|
||||
comment: '[Denormalized]',
|
||||
})
|
||||
public noteUserId: User['id'];
|
||||
|
||||
@ -56,7 +56,7 @@ export class NoteUnread {
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true,
|
||||
comment: '[Denormalized]'
|
||||
comment: '[Denormalized]',
|
||||
})
|
||||
public noteChannelId: Channel['id'] | null;
|
||||
//#endregion
|
||||
|
@ -11,19 +11,19 @@ export class NoteWatching {
|
||||
|
||||
@Index()
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the NoteWatching.'
|
||||
comment: 'The created date of the NoteWatching.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The watcher ID.'
|
||||
comment: 'The watcher ID.',
|
||||
})
|
||||
public userId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
@ -31,12 +31,12 @@ export class NoteWatching {
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The target Note ID.'
|
||||
comment: 'The target Note ID.',
|
||||
})
|
||||
public noteId: Note['id'];
|
||||
|
||||
@ManyToOne(type => Note, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public note: Note | null;
|
||||
@ -45,7 +45,7 @@ export class NoteWatching {
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: '[Denormalized]'
|
||||
comment: '[Denormalized]',
|
||||
})
|
||||
public noteUserId: Note['userId'];
|
||||
//#endregion
|
||||
|
@ -15,7 +15,7 @@ export class Note {
|
||||
|
||||
@Index()
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the Note.'
|
||||
comment: 'The created date of the Note.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@ -23,12 +23,12 @@ export class Note {
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true,
|
||||
comment: 'The ID of reply target.'
|
||||
comment: 'The ID of reply target.',
|
||||
})
|
||||
public replyId: Note['id'] | null;
|
||||
|
||||
@ManyToOne(type => Note, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public reply: Note | null;
|
||||
@ -37,67 +37,67 @@ export class Note {
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true,
|
||||
comment: 'The ID of renote target.'
|
||||
comment: 'The ID of renote target.',
|
||||
})
|
||||
public renoteId: Note['id'] | null;
|
||||
|
||||
@ManyToOne(type => Note, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public renote: Note | null;
|
||||
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
length: 256, nullable: true
|
||||
length: 256, nullable: true,
|
||||
})
|
||||
public threadId: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 8192, nullable: true
|
||||
length: 8192, nullable: true,
|
||||
})
|
||||
public text: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 256, nullable: true
|
||||
length: 256, nullable: true,
|
||||
})
|
||||
public name: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512, nullable: true
|
||||
length: 512, nullable: true,
|
||||
})
|
||||
public cw: string | null;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The ID of author.'
|
||||
comment: 'The ID of author.',
|
||||
})
|
||||
public userId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
|
||||
@Column('boolean', {
|
||||
default: false
|
||||
default: false,
|
||||
})
|
||||
public localOnly: boolean;
|
||||
|
||||
@Column('smallint', {
|
||||
default: 0
|
||||
default: 0,
|
||||
})
|
||||
public renoteCount: number;
|
||||
|
||||
@Column('smallint', {
|
||||
default: 0
|
||||
default: 0,
|
||||
})
|
||||
public repliesCount: number;
|
||||
|
||||
@Column('jsonb', {
|
||||
default: {}
|
||||
default: {},
|
||||
})
|
||||
public reactions: Record<string, number>;
|
||||
|
||||
@ -113,66 +113,66 @@ export class Note {
|
||||
@Index({ unique: true })
|
||||
@Column('varchar', {
|
||||
length: 512, nullable: true,
|
||||
comment: 'The URI of a note. it will be null when the note is local.'
|
||||
comment: 'The URI of a note. it will be null when the note is local.',
|
||||
})
|
||||
public uri: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512, nullable: true,
|
||||
comment: 'The human readable url of a note. it will be null when the note is local.'
|
||||
comment: 'The human readable url of a note. it will be null when the note is local.',
|
||||
})
|
||||
public url: string | null;
|
||||
|
||||
@Column('integer', {
|
||||
default: 0, select: false
|
||||
default: 0, select: false,
|
||||
})
|
||||
public score: number;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
array: true, default: '{}'
|
||||
array: true, default: '{}',
|
||||
})
|
||||
public fileIds: DriveFile['id'][];
|
||||
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
length: 256, array: true, default: '{}'
|
||||
length: 256, array: true, default: '{}',
|
||||
})
|
||||
public attachedFileTypes: string[];
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
array: true, default: '{}'
|
||||
array: true, default: '{}',
|
||||
})
|
||||
public visibleUserIds: User['id'][];
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
array: true, default: '{}'
|
||||
array: true, default: '{}',
|
||||
})
|
||||
public mentions: User['id'][];
|
||||
|
||||
@Column('text', {
|
||||
default: '[]'
|
||||
default: '[]',
|
||||
})
|
||||
public mentionedRemoteUsers: string;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128, array: true, default: '{}'
|
||||
length: 128, array: true, default: '{}',
|
||||
})
|
||||
public emojis: string[];
|
||||
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
length: 128, array: true, default: '{}'
|
||||
length: 128, array: true, default: '{}',
|
||||
})
|
||||
public tags: string[];
|
||||
|
||||
@Column('boolean', {
|
||||
default: false
|
||||
default: false,
|
||||
})
|
||||
public hasPoll: boolean;
|
||||
|
||||
@ -180,12 +180,12 @@ export class Note {
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true, default: null,
|
||||
comment: 'The ID of source channel.'
|
||||
comment: 'The ID of source channel.',
|
||||
})
|
||||
public channelId: Channel['id'] | null;
|
||||
|
||||
@ManyToOne(type => Channel, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public channel: Channel | null;
|
||||
@ -194,33 +194,33 @@ export class Note {
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true,
|
||||
comment: '[Denormalized]'
|
||||
comment: '[Denormalized]',
|
||||
})
|
||||
public userHost: string | null;
|
||||
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true,
|
||||
comment: '[Denormalized]'
|
||||
comment: '[Denormalized]',
|
||||
})
|
||||
public replyUserId: User['id'] | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true,
|
||||
comment: '[Denormalized]'
|
||||
comment: '[Denormalized]',
|
||||
})
|
||||
public replyUserHost: string | null;
|
||||
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true,
|
||||
comment: '[Denormalized]'
|
||||
comment: '[Denormalized]',
|
||||
})
|
||||
public renoteUserId: User['id'] | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true,
|
||||
comment: '[Denormalized]'
|
||||
comment: '[Denormalized]',
|
||||
})
|
||||
public renoteUserHost: string | null;
|
||||
//#endregion
|
||||
|
@ -14,7 +14,7 @@ export class Notification {
|
||||
|
||||
@Index()
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the Notification.'
|
||||
comment: 'The created date of the Notification.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@ -24,12 +24,12 @@ export class Notification {
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The ID of recipient user of the Notification.'
|
||||
comment: 'The ID of recipient user of the Notification.',
|
||||
})
|
||||
public notifieeId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public notifiee: User | null;
|
||||
@ -41,12 +41,12 @@ export class Notification {
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true,
|
||||
comment: 'The ID of sender user of the Notification.'
|
||||
comment: 'The ID of sender user of the Notification.',
|
||||
})
|
||||
public notifierId: User['id'] | null;
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public notifier: User | null;
|
||||
@ -68,7 +68,7 @@ export class Notification {
|
||||
@Index()
|
||||
@Column('enum', {
|
||||
enum: notificationTypes,
|
||||
comment: 'The type of the Notification.'
|
||||
comment: 'The type of the Notification.',
|
||||
})
|
||||
public type: typeof notificationTypes[number];
|
||||
|
||||
@ -78,53 +78,53 @@ export class Notification {
|
||||
@Index()
|
||||
@Column('boolean', {
|
||||
default: false,
|
||||
comment: 'Whether the Notification is read.'
|
||||
comment: 'Whether the Notification is read.',
|
||||
})
|
||||
public isRead: boolean;
|
||||
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public noteId: Note['id'] | null;
|
||||
|
||||
@ManyToOne(type => Note, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public note: Note | null;
|
||||
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public followRequestId: FollowRequest['id'] | null;
|
||||
|
||||
@ManyToOne(type => FollowRequest, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public followRequest: FollowRequest | null;
|
||||
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public userGroupInvitationId: UserGroupInvitation['id'] | null;
|
||||
|
||||
@ManyToOne(type => UserGroupInvitation, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public userGroupInvitation: UserGroupInvitation | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true
|
||||
length: 128, nullable: true,
|
||||
})
|
||||
public reaction: string | null;
|
||||
|
||||
@Column('integer', {
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public choice: number | null;
|
||||
|
||||
@ -132,7 +132,7 @@ export class Notification {
|
||||
* アプリ通知のbody
|
||||
*/
|
||||
@Column('varchar', {
|
||||
length: 2048, nullable: true
|
||||
length: 2048, nullable: true,
|
||||
})
|
||||
public customBody: string | null;
|
||||
|
||||
@ -141,7 +141,7 @@ export class Notification {
|
||||
* (省略時はアプリ名で表示されることを期待)
|
||||
*/
|
||||
@Column('varchar', {
|
||||
length: 256, nullable: true
|
||||
length: 256, nullable: true,
|
||||
})
|
||||
public customHeader: string | null;
|
||||
|
||||
@ -150,7 +150,7 @@ export class Notification {
|
||||
* (省略時はアプリアイコンで表示されることを期待)
|
||||
*/
|
||||
@Column('varchar', {
|
||||
length: 1024, nullable: true
|
||||
length: 1024, nullable: true,
|
||||
})
|
||||
public customIcon: string | null;
|
||||
|
||||
@ -160,12 +160,12 @@ export class Notification {
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public appAccessTokenId: AccessToken['id'] | null;
|
||||
|
||||
@ManyToOne(type => AccessToken, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public appAccessToken: AccessToken | null;
|
||||
|
@ -17,7 +17,7 @@ export class PageLike {
|
||||
public userId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
@ -26,7 +26,7 @@ export class PageLike {
|
||||
public pageId: Page['id'];
|
||||
|
||||
@ManyToOne(type => Page, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public page: Page | null;
|
||||
|
@ -11,13 +11,13 @@ export class Page {
|
||||
|
||||
@Index()
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the Page.'
|
||||
comment: 'The created date of the Page.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@Index()
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The updated date of the Page.'
|
||||
comment: 'The updated date of the Page.',
|
||||
})
|
||||
public updatedAt: Date;
|
||||
|
||||
@ -33,7 +33,7 @@ export class Page {
|
||||
public name: string;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 256, nullable: true
|
||||
length: 256, nullable: true,
|
||||
})
|
||||
public summary: string | null;
|
||||
|
||||
@ -41,7 +41,7 @@ export class Page {
|
||||
public alignCenter: boolean;
|
||||
|
||||
@Column('boolean', {
|
||||
default: false
|
||||
default: false,
|
||||
})
|
||||
public hideTitleWhenPinned: boolean;
|
||||
|
||||
@ -53,12 +53,12 @@ export class Page {
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The ID of author.'
|
||||
comment: 'The ID of author.',
|
||||
})
|
||||
public userId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
@ -70,24 +70,24 @@ export class Page {
|
||||
public eyeCatchingImageId: DriveFile['id'] | null;
|
||||
|
||||
@ManyToOne(type => DriveFile, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public eyeCatchingImage: DriveFile | null;
|
||||
|
||||
@Column('jsonb', {
|
||||
default: []
|
||||
default: [],
|
||||
})
|
||||
public content: Record<string, any>[];
|
||||
|
||||
@Column('jsonb', {
|
||||
default: []
|
||||
default: [],
|
||||
})
|
||||
public variables: Record<string, any>[];
|
||||
|
||||
@Column('varchar', {
|
||||
length: 16384,
|
||||
default: ''
|
||||
default: '',
|
||||
})
|
||||
public script: string;
|
||||
|
||||
@ -102,12 +102,12 @@ export class Page {
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
array: true, default: '{}'
|
||||
array: true, default: '{}',
|
||||
})
|
||||
public visibleUserIds: User['id'][];
|
||||
|
||||
@Column('integer', {
|
||||
default: 0
|
||||
default: 0,
|
||||
})
|
||||
public likedCount: number;
|
||||
|
||||
|
@ -23,7 +23,7 @@ export class PasswordResetRequest {
|
||||
public userId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
|
@ -11,7 +11,7 @@ export class PollVote {
|
||||
|
||||
@Index()
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the PollVote.'
|
||||
comment: 'The created date of the PollVote.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@ -20,7 +20,7 @@ export class PollVote {
|
||||
public userId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
@ -30,7 +30,7 @@ export class PollVote {
|
||||
public noteId: Note['id'];
|
||||
|
||||
@ManyToOne(type => Note, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public note: Note | null;
|
||||
|
@ -10,13 +10,13 @@ export class Poll {
|
||||
public noteId: Note['id'];
|
||||
|
||||
@OneToOne(type => Note, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public note: Note | null;
|
||||
|
||||
@Column('timestamp with time zone', {
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public expiresAt: Date | null;
|
||||
|
||||
@ -24,7 +24,7 @@ export class Poll {
|
||||
public multiple: boolean;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128, array: true, default: '{}'
|
||||
length: 128, array: true, default: '{}',
|
||||
})
|
||||
public choices: string[];
|
||||
|
||||
@ -36,21 +36,21 @@ export class Poll {
|
||||
//#region Denormalized fields
|
||||
@Column('enum', {
|
||||
enum: noteVisibilities,
|
||||
comment: '[Denormalized]'
|
||||
comment: '[Denormalized]',
|
||||
})
|
||||
public noteVisibility: typeof noteVisibilities[number];
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: '[Denormalized]'
|
||||
comment: '[Denormalized]',
|
||||
})
|
||||
public userId: User['id'];
|
||||
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true,
|
||||
comment: '[Denormalized]'
|
||||
comment: '[Denormalized]',
|
||||
})
|
||||
public userHost: string | null;
|
||||
//#endregion
|
||||
|
@ -9,7 +9,7 @@ export class PromoNote {
|
||||
public noteId: Note['id'];
|
||||
|
||||
@OneToOne(type => Note, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public note: Note | null;
|
||||
@ -21,7 +21,7 @@ export class PromoNote {
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: '[Denormalized]'
|
||||
comment: '[Denormalized]',
|
||||
})
|
||||
public userId: User['id'];
|
||||
//#endregion
|
||||
|
@ -10,7 +10,7 @@ export class PromoRead {
|
||||
public id: string;
|
||||
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the PromoRead.'
|
||||
comment: 'The created date of the PromoRead.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@ -19,7 +19,7 @@ export class PromoRead {
|
||||
public userId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
@ -28,7 +28,7 @@ export class PromoRead {
|
||||
public noteId: Note['id'];
|
||||
|
||||
@ManyToOne(type => Note, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public note: Note | null;
|
||||
|
@ -9,50 +9,50 @@ export class RegistryItem {
|
||||
public id: string;
|
||||
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the RegistryItem.'
|
||||
comment: 'The created date of the RegistryItem.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The updated date of the RegistryItem.'
|
||||
comment: 'The updated date of the RegistryItem.',
|
||||
})
|
||||
public updatedAt: Date;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The owner ID.'
|
||||
comment: 'The owner ID.',
|
||||
})
|
||||
public userId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 1024,
|
||||
comment: 'The key of the RegistryItem.'
|
||||
comment: 'The key of the RegistryItem.',
|
||||
})
|
||||
public key: string;
|
||||
|
||||
@Column('jsonb', {
|
||||
default: {}, nullable: true,
|
||||
comment: 'The value of the RegistryItem.'
|
||||
comment: 'The value of the RegistryItem.',
|
||||
})
|
||||
public value: any | null;
|
||||
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
length: 1024, array: true, default: '{}'
|
||||
length: 1024, array: true, default: '{}',
|
||||
})
|
||||
public scope: string[];
|
||||
|
||||
// サードパーティアプリに開放するときのためのカラム
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
length: 512, nullable: true
|
||||
length: 512, nullable: true,
|
||||
})
|
||||
public domain: string | null;
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ export class Signin {
|
||||
public id: string;
|
||||
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the Signin.'
|
||||
comment: 'The created date of the Signin.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@ -17,7 +17,7 @@ export class Signin {
|
||||
public userId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
|
@ -15,7 +15,7 @@ export class SwSubscription {
|
||||
public userId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
|
@ -10,19 +10,19 @@ export class UserGroupInvitation {
|
||||
public id: string;
|
||||
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the UserGroupInvitation.'
|
||||
comment: 'The created date of the UserGroupInvitation.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The user ID.'
|
||||
comment: 'The user ID.',
|
||||
})
|
||||
public userId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
@ -30,12 +30,12 @@ export class UserGroupInvitation {
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The group ID.'
|
||||
comment: 'The group ID.',
|
||||
})
|
||||
public userGroupId: UserGroup['id'];
|
||||
|
||||
@ManyToOne(type => UserGroup, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public userGroup: UserGroup | null;
|
||||
|
@ -10,19 +10,19 @@ export class UserGroupJoining {
|
||||
public id: string;
|
||||
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the UserGroupJoining.'
|
||||
comment: 'The created date of the UserGroupJoining.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The user ID.'
|
||||
comment: 'The user ID.',
|
||||
})
|
||||
public userId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
@ -30,12 +30,12 @@ export class UserGroupJoining {
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The group ID.'
|
||||
comment: 'The group ID.',
|
||||
})
|
||||
public userGroupId: UserGroup['id'];
|
||||
|
||||
@ManyToOne(type => UserGroup, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public userGroup: UserGroup | null;
|
||||
|
@ -9,7 +9,7 @@ export class UserGroup {
|
||||
|
||||
@Index()
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the UserGroup.'
|
||||
comment: 'The created date of the UserGroup.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@ -21,12 +21,12 @@ export class UserGroup {
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The ID of owner.'
|
||||
comment: 'The ID of owner.',
|
||||
})
|
||||
public userId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
|
@ -8,7 +8,7 @@ export class UserKeypair {
|
||||
public userId: User['id'];
|
||||
|
||||
@OneToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
|
@ -10,19 +10,19 @@ export class UserListJoining {
|
||||
public id: string;
|
||||
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the UserListJoining.'
|
||||
comment: 'The created date of the UserListJoining.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The user ID.'
|
||||
comment: 'The user ID.',
|
||||
})
|
||||
public userId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
@ -30,12 +30,12 @@ export class UserListJoining {
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The list ID.'
|
||||
comment: 'The list ID.',
|
||||
})
|
||||
public userListId: UserList['id'];
|
||||
|
||||
@ManyToOne(type => UserList, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public userList: UserList | null;
|
||||
|
@ -8,26 +8,26 @@ export class UserList {
|
||||
public id: string;
|
||||
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the UserList.'
|
||||
comment: 'The created date of the UserList.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
comment: 'The owner ID.'
|
||||
comment: 'The owner ID.',
|
||||
})
|
||||
public userId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
comment: 'The name of the UserList.'
|
||||
comment: 'The name of the UserList.',
|
||||
})
|
||||
public name: string;
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ export class UserNotePining {
|
||||
public id: string;
|
||||
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the UserNotePinings.'
|
||||
comment: 'The created date of the UserNotePinings.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@ -19,7 +19,7 @@ export class UserNotePining {
|
||||
public userId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
@ -28,7 +28,7 @@ export class UserNotePining {
|
||||
public noteId: Note['id'];
|
||||
|
||||
@ManyToOne(type => Note, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public note: Note | null;
|
||||
|
@ -12,26 +12,26 @@ export class UserProfile {
|
||||
public userId: User['id'];
|
||||
|
||||
@OneToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true,
|
||||
comment: 'The location of the User.'
|
||||
comment: 'The location of the User.',
|
||||
})
|
||||
public location: string | null;
|
||||
|
||||
@Column('char', {
|
||||
length: 10, nullable: true,
|
||||
comment: 'The birthday (YYYY-MM-DD) of the User.'
|
||||
comment: 'The birthday (YYYY-MM-DD) of the User.',
|
||||
})
|
||||
public birthday: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 2048, nullable: true,
|
||||
comment: 'The description (bio) of the User.'
|
||||
comment: 'The description (bio) of the User.',
|
||||
})
|
||||
public description: string | null;
|
||||
|
||||
@ -50,13 +50,13 @@ export class UserProfile {
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512, nullable: true,
|
||||
comment: 'Remote URL of the user.'
|
||||
comment: 'Remote URL of the user.',
|
||||
})
|
||||
public url: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true,
|
||||
comment: 'The email address of the User.'
|
||||
comment: 'The email address of the User.',
|
||||
})
|
||||
public email: string | null;
|
||||
|
||||
@ -71,7 +71,7 @@ export class UserProfile {
|
||||
public emailVerified: boolean;
|
||||
|
||||
@Column('jsonb', {
|
||||
default: ['follow', 'receiveFollowRequest', 'groupInvited']
|
||||
default: ['follow', 'receiveFollowRequest', 'groupInvited'],
|
||||
})
|
||||
public emailNotificationTypes: string[];
|
||||
|
||||
@ -113,20 +113,20 @@ export class UserProfile {
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true,
|
||||
comment: 'The password hash of the User. It will be null if the origin of the user is local.'
|
||||
comment: 'The password hash of the User. It will be null if the origin of the user is local.',
|
||||
})
|
||||
public password: string | null;
|
||||
|
||||
// TODO: そのうち消す
|
||||
@Column('jsonb', {
|
||||
default: {},
|
||||
comment: 'The client-specific data of the User.'
|
||||
comment: 'The client-specific data of the User.',
|
||||
})
|
||||
public clientData: Record<string, any>;
|
||||
|
||||
@Column('jsonb', {
|
||||
default: {},
|
||||
comment: 'The room data of the User.'
|
||||
comment: 'The room data of the User.',
|
||||
})
|
||||
public room: Record<string, any>;
|
||||
|
||||
@ -137,7 +137,7 @@ export class UserProfile {
|
||||
|
||||
@Column('boolean', {
|
||||
default: false,
|
||||
comment: 'Whether reject index by crawler.'
|
||||
comment: 'Whether reject index by crawler.',
|
||||
})
|
||||
public noCrawle: boolean;
|
||||
|
||||
@ -163,18 +163,18 @@ export class UserProfile {
|
||||
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public pinnedPageId: Page['id'] | null;
|
||||
|
||||
@OneToOne(type => Page, {
|
||||
onDelete: 'SET NULL'
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
public pinnedPage: Page | null;
|
||||
|
||||
@Column('jsonb', {
|
||||
default: {}
|
||||
default: {},
|
||||
})
|
||||
public integrations: Record<string, any>;
|
||||
|
||||
@ -185,12 +185,12 @@ export class UserProfile {
|
||||
public enableWordMute: boolean;
|
||||
|
||||
@Column('jsonb', {
|
||||
default: []
|
||||
default: [],
|
||||
})
|
||||
public mutedWords: string[][];
|
||||
|
||||
@Column('jsonb', {
|
||||
default: []
|
||||
default: [],
|
||||
})
|
||||
public mutedInstances: string[];
|
||||
|
||||
@ -205,7 +205,7 @@ export class UserProfile {
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true,
|
||||
comment: '[Denormalized]'
|
||||
comment: '[Denormalized]',
|
||||
})
|
||||
public userHost: string | null;
|
||||
//#endregion
|
||||
|
@ -8,7 +8,7 @@ export class UserPublickey {
|
||||
public userId: User['id'];
|
||||
|
||||
@OneToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
|
@ -5,7 +5,7 @@ import { id } from '../id';
|
||||
@Entity()
|
||||
export class UserSecurityKey {
|
||||
@PrimaryColumn('varchar', {
|
||||
comment: 'Variable-length id given to navigator.credentials.get()'
|
||||
comment: 'Variable-length id given to navigator.credentials.get()',
|
||||
})
|
||||
public id: string;
|
||||
|
||||
@ -14,7 +14,7 @@ export class UserSecurityKey {
|
||||
public userId: User['id'];
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
onDelete: 'CASCADE'
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
@ -22,19 +22,19 @@ export class UserSecurityKey {
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
comment:
|
||||
'Variable-length public key used to verify attestations (hex-encoded).'
|
||||
'Variable-length public key used to verify attestations (hex-encoded).',
|
||||
})
|
||||
public publicKey: string;
|
||||
|
||||
@Column('timestamp with time zone', {
|
||||
comment:
|
||||
'The date of the last time the UserSecurityKey was successfully validated.'
|
||||
'The date of the last time the UserSecurityKey was successfully validated.',
|
||||
})
|
||||
public lastUsed: Date;
|
||||
|
||||
@Column('varchar', {
|
||||
comment: 'User-defined name for this key',
|
||||
length: 30
|
||||
length: 30,
|
||||
})
|
||||
public name: string;
|
||||
|
||||
|
@ -10,25 +10,25 @@ export class User {
|
||||
|
||||
@Index()
|
||||
@Column('timestamp with time zone', {
|
||||
comment: 'The created date of the User.'
|
||||
comment: 'The created date of the User.',
|
||||
})
|
||||
public createdAt: Date;
|
||||
|
||||
@Index()
|
||||
@Column('timestamp with time zone', {
|
||||
nullable: true,
|
||||
comment: 'The updated date of the User.'
|
||||
comment: 'The updated date of the User.',
|
||||
})
|
||||
public updatedAt: Date | null;
|
||||
|
||||
@Column('timestamp with time zone', {
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public lastFetchedAt: Date | null;
|
||||
|
||||
@Index()
|
||||
@Column('timestamp with time zone', {
|
||||
nullable: true
|
||||
nullable: true,
|
||||
})
|
||||
public lastActiveDate: Date | null;
|
||||
|
||||
@ -39,50 +39,50 @@ export class User {
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128,
|
||||
comment: 'The username of the User.'
|
||||
comment: 'The username of the User.',
|
||||
})
|
||||
public username: string;
|
||||
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
length: 128, select: false,
|
||||
comment: 'The username (lowercased) of the User.'
|
||||
comment: 'The username (lowercased) of the User.',
|
||||
})
|
||||
public usernameLower: string;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true,
|
||||
comment: 'The name of the User.'
|
||||
comment: 'The name of the User.',
|
||||
})
|
||||
public name: string | null;
|
||||
|
||||
@Column('integer', {
|
||||
default: 0,
|
||||
comment: 'The count of followers.'
|
||||
comment: 'The count of followers.',
|
||||
})
|
||||
public followersCount: number;
|
||||
|
||||
@Column('integer', {
|
||||
default: 0,
|
||||
comment: 'The count of following.'
|
||||
comment: 'The count of following.',
|
||||
})
|
||||
public followingCount: number;
|
||||
|
||||
@Column('integer', {
|
||||
default: 0,
|
||||
comment: 'The count of notes.'
|
||||
comment: 'The count of notes.',
|
||||
})
|
||||
public notesCount: number;
|
||||
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true,
|
||||
comment: 'The ID of avatar DriveFile.'
|
||||
comment: 'The ID of avatar DriveFile.',
|
||||
})
|
||||
public avatarId: DriveFile['id'] | null;
|
||||
|
||||
@OneToOne(type => DriveFile, {
|
||||
onDelete: 'SET NULL'
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
public avatar: DriveFile | null;
|
||||
@ -90,19 +90,19 @@ export class User {
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true,
|
||||
comment: 'The ID of banner DriveFile.'
|
||||
comment: 'The ID of banner DriveFile.',
|
||||
})
|
||||
public bannerId: DriveFile['id'] | null;
|
||||
|
||||
@OneToOne(type => DriveFile, {
|
||||
onDelete: 'SET NULL'
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
public banner: DriveFile | null;
|
||||
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
length: 128, array: true, default: '{}'
|
||||
length: 128, array: true, default: '{}',
|
||||
})
|
||||
public tags: string[];
|
||||
|
||||
@ -128,107 +128,107 @@ export class User {
|
||||
|
||||
@Column('boolean', {
|
||||
default: false,
|
||||
comment: 'Whether the User is suspended.'
|
||||
comment: 'Whether the User is suspended.',
|
||||
})
|
||||
public isSuspended: boolean;
|
||||
|
||||
@Column('boolean', {
|
||||
default: false,
|
||||
comment: 'Whether the User is silenced.'
|
||||
comment: 'Whether the User is silenced.',
|
||||
})
|
||||
public isSilenced: boolean;
|
||||
|
||||
@Column('boolean', {
|
||||
default: false,
|
||||
comment: 'Whether the User is locked.'
|
||||
comment: 'Whether the User is locked.',
|
||||
})
|
||||
public isLocked: boolean;
|
||||
|
||||
@Column('boolean', {
|
||||
default: false,
|
||||
comment: 'Whether the User is a bot.'
|
||||
comment: 'Whether the User is a bot.',
|
||||
})
|
||||
public isBot: boolean;
|
||||
|
||||
@Column('boolean', {
|
||||
default: false,
|
||||
comment: 'Whether the User is a cat.'
|
||||
comment: 'Whether the User is a cat.',
|
||||
})
|
||||
public isCat: boolean;
|
||||
|
||||
@Column('boolean', {
|
||||
default: false,
|
||||
comment: 'Whether the User is the admin.'
|
||||
comment: 'Whether the User is the admin.',
|
||||
})
|
||||
public isAdmin: boolean;
|
||||
|
||||
@Column('boolean', {
|
||||
default: false,
|
||||
comment: 'Whether the User is a moderator.'
|
||||
comment: 'Whether the User is a moderator.',
|
||||
})
|
||||
public isModerator: boolean;
|
||||
|
||||
@Index()
|
||||
@Column('boolean', {
|
||||
default: true,
|
||||
comment: 'Whether the User is explorable.'
|
||||
comment: 'Whether the User is explorable.',
|
||||
})
|
||||
public isExplorable: boolean;
|
||||
|
||||
// アカウントが削除されたかどうかのフラグだが、完全に削除される際は物理削除なので実質削除されるまでの「削除が進行しているかどうか」のフラグ
|
||||
@Column('boolean', {
|
||||
default: false,
|
||||
comment: 'Whether the User is deleted.'
|
||||
comment: 'Whether the User is deleted.',
|
||||
})
|
||||
public isDeleted: boolean;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128, array: true, default: '{}'
|
||||
length: 128, array: true, default: '{}',
|
||||
})
|
||||
public emojis: string[];
|
||||
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true,
|
||||
comment: 'The host of the User. It will be null if the origin of the user is local.'
|
||||
comment: 'The host of the User. It will be null if the origin of the user is local.',
|
||||
})
|
||||
public host: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512, nullable: true,
|
||||
comment: 'The inbox URL of the User. It will be null if the origin of the user is local.'
|
||||
comment: 'The inbox URL of the User. It will be null if the origin of the user is local.',
|
||||
})
|
||||
public inbox: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512, nullable: true,
|
||||
comment: 'The sharedInbox URL of the User. It will be null if the origin of the user is local.'
|
||||
comment: 'The sharedInbox URL of the User. It will be null if the origin of the user is local.',
|
||||
})
|
||||
public sharedInbox: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512, nullable: true,
|
||||
comment: 'The featured URL of the User. It will be null if the origin of the user is local.'
|
||||
comment: 'The featured URL of the User. It will be null if the origin of the user is local.',
|
||||
})
|
||||
public featured: string | null;
|
||||
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
length: 512, nullable: true,
|
||||
comment: 'The URI of the User. It will be null if the origin of the user is local.'
|
||||
comment: 'The URI of the User. It will be null if the origin of the user is local.',
|
||||
})
|
||||
public uri: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512, nullable: true,
|
||||
comment: 'The URI of the user Follower Collection. It will be null if the origin of the user is local.'
|
||||
comment: 'The URI of the user Follower Collection. It will be null if the origin of the user is local.',
|
||||
})
|
||||
public followersUri: string | null;
|
||||
|
||||
@Index({ unique: true })
|
||||
@Column('char', {
|
||||
length: 16, nullable: true, unique: true,
|
||||
comment: 'The native access token of the User. It will be null if the origin of the user is local.'
|
||||
comment: 'The native access token of the User. It will be null if the origin of the user is local.',
|
||||
})
|
||||
public token: string | null;
|
||||
|
||||
|
Reference in New Issue
Block a user