mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 00:43:49 +01:00
chore: format
This commit is contained in:
parent
ccc32339fa
commit
aaa2041d38
@ -4,10 +4,5 @@
|
|||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"allowSyntheticDefaultImports": true
|
"allowSyntheticDefaultImports": true
|
||||||
},
|
},
|
||||||
"exclude": [
|
"exclude": ["node_modules", "jspm_packages", "tmp", "temp"]
|
||||||
"node_modules",
|
|
||||||
"jspm_packages",
|
|
||||||
"tmp",
|
|
||||||
"temp"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,12 @@ import { convertId, IdConvertType } from "../built/index.js";
|
|||||||
|
|
||||||
test("convert to mastodon id", (t) => {
|
test("convert to mastodon id", (t) => {
|
||||||
t.is(convertId("9gf61ehcxv", IdConvertType.MastodonId), "960365976481219");
|
t.is(convertId("9gf61ehcxv", IdConvertType.MastodonId), "960365976481219");
|
||||||
t.is(convertId("9fbr9z0wbrjqyd3u", IdConvertType.MastodonId), "3954607381600562394");
|
t.is(
|
||||||
t.is(convertId("9fbs680oyviiqrol9md73p8g", IdConvertType.MastodonId), "3494513243013053824")
|
convertId("9fbr9z0wbrjqyd3u", IdConvertType.MastodonId),
|
||||||
|
"3954607381600562394",
|
||||||
|
);
|
||||||
|
t.is(
|
||||||
|
convertId("9fbs680oyviiqrol9md73p8g", IdConvertType.MastodonId),
|
||||||
|
"3494513243013053824",
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
@ -15,8 +15,8 @@ export class AbuseUserReport {
|
|||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the AbuseUserReport.',
|
comment: "The created date of the AbuseUserReport.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@ -24,8 +24,8 @@ export class AbuseUserReport {
|
|||||||
@Column(id())
|
@Column(id())
|
||||||
public targetUserId: User["id"];
|
public targetUserId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public targetUser: User | null;
|
public targetUser: User | null;
|
||||||
@ -34,8 +34,8 @@ export class AbuseUserReport {
|
|||||||
@Column(id())
|
@Column(id())
|
||||||
public reporterId: User["id"];
|
public reporterId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public reporter: User | null;
|
public reporter: User | null;
|
||||||
@ -46,40 +46,42 @@ export class AbuseUserReport {
|
|||||||
})
|
})
|
||||||
public assigneeId: User["id"] | null;
|
public assigneeId: User["id"] | null;
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'SET NULL',
|
onDelete: "SET NULL",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public assignee: User | null;
|
public assignee: User | null;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public resolved: boolean;
|
public resolved: boolean;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false
|
default: false,
|
||||||
})
|
})
|
||||||
public forwarded: boolean;
|
public forwarded: boolean;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 2048,
|
length: 2048,
|
||||||
})
|
})
|
||||||
public comment: string;
|
public comment: string;
|
||||||
|
|
||||||
//#region Denormalized fields
|
//#region Denormalized fields
|
||||||
@Index()
|
@Index()
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, nullable: true,
|
length: 128,
|
||||||
comment: '[Denormalized]',
|
nullable: true,
|
||||||
|
comment: "[Denormalized]",
|
||||||
})
|
})
|
||||||
public targetUserHost: string | null;
|
public targetUserHost: string | null;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, nullable: true,
|
length: 128,
|
||||||
comment: '[Denormalized]',
|
nullable: true,
|
||||||
|
comment: "[Denormalized]",
|
||||||
})
|
})
|
||||||
public reporterHost: string | null;
|
public reporterHost: string | null;
|
||||||
//#endregion
|
//#endregion
|
||||||
|
@ -15,31 +15,31 @@ export class AccessToken {
|
|||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the AccessToken.',
|
comment: "The created date of the AccessToken.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public lastUsedAt: Date | null;
|
public lastUsedAt: Date | null;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
})
|
})
|
||||||
public token: string;
|
public token: string;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public session: string | null;
|
public session: string | null;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
})
|
})
|
||||||
public hash: string;
|
public hash: string;
|
||||||
@ -48,8 +48,8 @@ export class AccessToken {
|
|||||||
@Column(id())
|
@Column(id())
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
@ -60,37 +60,38 @@ export class AccessToken {
|
|||||||
})
|
})
|
||||||
public appId: App["id"] | null;
|
public appId: App["id"] | null;
|
||||||
|
|
||||||
@ManyToOne(type => App, {
|
@ManyToOne((type) => App, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public app: App | null;
|
public app: App | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public name: string | null;
|
public name: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512,
|
length: 512,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public description: string | null;
|
public description: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512,
|
length: 512,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public iconUrl: string | null;
|
public iconUrl: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 64, array: true,
|
length: 64,
|
||||||
default: '{}',
|
array: true,
|
||||||
|
default: "{}",
|
||||||
})
|
})
|
||||||
public permission: string[];
|
public permission: string[];
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public fetched: boolean;
|
public fetched: boolean;
|
||||||
|
@ -7,45 +7,51 @@ export class Ad {
|
|||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the Ad.',
|
comment: "The created date of the Ad.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The expired date of the Ad.',
|
comment: "The expired date of the Ad.",
|
||||||
})
|
})
|
||||||
public expiresAt: Date;
|
public expiresAt: Date;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 32, nullable: false,
|
length: 32,
|
||||||
|
nullable: false,
|
||||||
})
|
})
|
||||||
public place: string;
|
public place: string;
|
||||||
|
|
||||||
// 今は使われていないが将来的に活用される可能性はある
|
// 今は使われていないが将来的に活用される可能性はある
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 32, nullable: false,
|
length: 32,
|
||||||
|
nullable: false,
|
||||||
})
|
})
|
||||||
public priority: string;
|
public priority: string;
|
||||||
|
|
||||||
@Column('integer', {
|
@Column("integer", {
|
||||||
default: 1, nullable: false,
|
default: 1,
|
||||||
|
nullable: false,
|
||||||
})
|
})
|
||||||
public ratio: number;
|
public ratio: number;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 1024, nullable: false,
|
length: 1024,
|
||||||
|
nullable: false,
|
||||||
})
|
})
|
||||||
public url: string;
|
public url: string;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 1024, nullable: false,
|
length: 1024,
|
||||||
|
nullable: false,
|
||||||
})
|
})
|
||||||
public imageUrl: string;
|
public imageUrl: string;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 8192, nullable: false,
|
length: 8192,
|
||||||
|
nullable: false,
|
||||||
})
|
})
|
||||||
public memo: string;
|
public memo: string;
|
||||||
|
|
||||||
|
@ -11,13 +11,13 @@ import { Announcement } from "./announcement.js";
|
|||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['userId', 'announcementId'], { unique: true })
|
@Index(["userId", "announcementId"], { unique: true })
|
||||||
export class AnnouncementRead {
|
export class AnnouncementRead {
|
||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the AnnouncementRead.',
|
comment: "The created date of the AnnouncementRead.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@ -25,8 +25,8 @@ export class AnnouncementRead {
|
|||||||
@Column(id())
|
@Column(id())
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
@ -35,8 +35,8 @@ export class AnnouncementRead {
|
|||||||
@Column(id())
|
@Column(id())
|
||||||
public announcementId: Announcement["id"];
|
public announcementId: Announcement["id"];
|
||||||
|
|
||||||
@ManyToOne(type => Announcement, {
|
@ManyToOne((type) => Announcement, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public announcement: Announcement | null;
|
public announcement: Announcement | null;
|
||||||
|
@ -7,29 +7,32 @@ export class Announcement {
|
|||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the Announcement.',
|
comment: "The created date of the Announcement.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The updated date of the Announcement.',
|
comment: "The updated date of the Announcement.",
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public updatedAt: Date | null;
|
public updatedAt: Date | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 8192, nullable: false,
|
length: 8192,
|
||||||
|
nullable: false,
|
||||||
})
|
})
|
||||||
public text: string;
|
public text: string;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 256, nullable: false,
|
length: 256,
|
||||||
|
nullable: false,
|
||||||
})
|
})
|
||||||
public title: string;
|
public title: string;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 1024, nullable: true,
|
length: 1024,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public imageUrl: string | null;
|
public imageUrl: string | null;
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ import { Antenna } from "./antenna.js";
|
|||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['noteId', 'antennaId'], { unique: true })
|
@Index(["noteId", "antennaId"], { unique: true })
|
||||||
export class AntennaNote {
|
export class AntennaNote {
|
||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
@ -19,12 +19,12 @@ export class AntennaNote {
|
|||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The note ID.',
|
comment: "The note ID.",
|
||||||
})
|
})
|
||||||
public noteId: Note["id"];
|
public noteId: Note["id"];
|
||||||
|
|
||||||
@ManyToOne(type => Note, {
|
@ManyToOne((type) => Note, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public note: Note | null;
|
public note: Note | null;
|
||||||
@ -32,18 +32,18 @@ export class AntennaNote {
|
|||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The antenna ID.',
|
comment: "The antenna ID.",
|
||||||
})
|
})
|
||||||
public antennaId: Antenna["id"];
|
public antennaId: Antenna["id"];
|
||||||
|
|
||||||
@ManyToOne(type => Antenna, {
|
@ManyToOne((type) => Antenna, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public antenna: Antenna | null;
|
public antenna: Antenna | null;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public read: boolean;
|
public read: boolean;
|
||||||
|
@ -16,31 +16,33 @@ export class Antenna {
|
|||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the Antenna.',
|
comment: "The created date of the Antenna.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The owner ID.',
|
comment: "The owner ID.",
|
||||||
})
|
})
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
comment: 'The name of the Antenna.',
|
comment: "The name of the Antenna.",
|
||||||
})
|
})
|
||||||
public name: string;
|
public name: string;
|
||||||
|
|
||||||
@Column('enum', { enum: ['home', 'all', 'users', 'list', 'group', 'instances'] })
|
@Column("enum", {
|
||||||
|
enum: ["home", "all", "users", "list", "group", "instances"],
|
||||||
|
})
|
||||||
public src: "home" | "all" | "users" | "list" | "group" | "instances";
|
public src: "home" | "all" | "users" | "list" | "group" | "instances";
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
@ -49,8 +51,8 @@ export class Antenna {
|
|||||||
})
|
})
|
||||||
public userListId: UserList["id"] | null;
|
public userListId: UserList["id"] | null;
|
||||||
|
|
||||||
@ManyToOne(type => UserList, {
|
@ManyToOne((type) => UserList, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public userList: UserList | null;
|
public userList: UserList | null;
|
||||||
@ -61,51 +63,53 @@ export class Antenna {
|
|||||||
})
|
})
|
||||||
public userGroupJoiningId: UserGroupJoining["id"] | null;
|
public userGroupJoiningId: UserGroupJoining["id"] | null;
|
||||||
|
|
||||||
@ManyToOne(type => UserGroupJoining, {
|
@ManyToOne((type) => UserGroupJoining, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public userGroupJoining: UserGroupJoining | null;
|
public userGroupJoining: UserGroupJoining | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 1024, array: true,
|
length: 1024,
|
||||||
default: '{}',
|
array: true,
|
||||||
|
default: "{}",
|
||||||
})
|
})
|
||||||
public users: string[];
|
public users: string[];
|
||||||
|
|
||||||
@Column('jsonb', {
|
@Column("jsonb", {
|
||||||
default: [],
|
default: [],
|
||||||
})
|
})
|
||||||
public instances: string[];
|
public instances: string[];
|
||||||
|
|
||||||
@Column('jsonb', {
|
@Column("jsonb", {
|
||||||
default: [],
|
default: [],
|
||||||
})
|
})
|
||||||
public keywords: string[][];
|
public keywords: string[][];
|
||||||
|
|
||||||
@Column('jsonb', {
|
@Column("jsonb", {
|
||||||
default: [],
|
default: [],
|
||||||
})
|
})
|
||||||
public excludeKeywords: string[][];
|
public excludeKeywords: string[][];
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public caseSensitive: boolean;
|
public caseSensitive: boolean;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public withReplies: boolean;
|
public withReplies: boolean;
|
||||||
|
|
||||||
@Column('boolean')
|
@Column("boolean")
|
||||||
public withFile: boolean;
|
public withFile: boolean;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 2048, nullable: true,
|
length: 2048,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public expression: string | null;
|
public expression: string | null;
|
||||||
|
|
||||||
@Column('boolean')
|
@Column("boolean")
|
||||||
public notify: boolean;
|
public notify: boolean;
|
||||||
}
|
}
|
||||||
|
@ -8,8 +8,8 @@ export class App {
|
|||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the App.',
|
comment: "The created date of the App.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@ -17,44 +17,46 @@ export class App {
|
|||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: 'The owner ID.',
|
comment: "The owner ID.",
|
||||||
})
|
})
|
||||||
public userId: User["id"] | null;
|
public userId: User["id"] | null;
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'SET NULL',
|
onDelete: "SET NULL",
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 64,
|
length: 64,
|
||||||
comment: 'The secret key of the App.',
|
comment: "The secret key of the App.",
|
||||||
})
|
})
|
||||||
public secret: string;
|
public secret: string;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
comment: 'The name of the App.',
|
comment: "The name of the App.",
|
||||||
})
|
})
|
||||||
public name: string;
|
public name: string;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512,
|
length: 512,
|
||||||
comment: 'The description of the App.',
|
comment: "The description of the App.",
|
||||||
})
|
})
|
||||||
public description: string;
|
public description: string;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 64, array: true,
|
length: 64,
|
||||||
comment: 'The permission of the App.',
|
array: true,
|
||||||
|
comment: "The permission of the App.",
|
||||||
})
|
})
|
||||||
public permission: string[];
|
public permission: string[];
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512, nullable: true,
|
length: 512,
|
||||||
comment: 'The callbackUrl of the App.',
|
nullable: true,
|
||||||
|
comment: "The callbackUrl of the App.",
|
||||||
})
|
})
|
||||||
public callbackUrl: string | null;
|
public callbackUrl: string | null;
|
||||||
}
|
}
|
||||||
|
@ -18,27 +18,27 @@ export class AttestationChallenge {
|
|||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 64,
|
length: 64,
|
||||||
comment: 'Hex-encoded sha256 hash of the challenge.',
|
comment: "Hex-encoded sha256 hash of the challenge.",
|
||||||
})
|
})
|
||||||
public challenge: string;
|
public challenge: string;
|
||||||
|
|
||||||
@Column('timestamp with time zone', {
|
@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;
|
public createdAt: Date;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
comment:
|
comment:
|
||||||
'Indicates that the challenge is only for registration purposes if true to prevent the challenge for being used as authentication.',
|
"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;
|
public registrationChallenge: boolean;
|
||||||
|
@ -15,13 +15,13 @@ export class AuthSession {
|
|||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the AuthSession.',
|
comment: "The created date of the AuthSession.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
})
|
})
|
||||||
public token: string;
|
public token: string;
|
||||||
@ -32,8 +32,8 @@ export class AuthSession {
|
|||||||
})
|
})
|
||||||
public userId: User["id"] | null;
|
public userId: User["id"] | null;
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
@ -42,8 +42,8 @@ export class AuthSession {
|
|||||||
@Column(id())
|
@Column(id())
|
||||||
public appId: App["id"];
|
public appId: App["id"];
|
||||||
|
|
||||||
@ManyToOne(type => App, {
|
@ManyToOne((type) => App, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public app: App | null;
|
public app: App | null;
|
||||||
|
@ -10,26 +10,26 @@ import { User } from "./user.js";
|
|||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['blockerId', 'blockeeId'], { unique: true })
|
@Index(["blockerId", "blockeeId"], { unique: true })
|
||||||
export class Blocking {
|
export class Blocking {
|
||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the Blocking.',
|
comment: "The created date of the Blocking.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The blockee user ID.',
|
comment: "The blockee user ID.",
|
||||||
})
|
})
|
||||||
public blockeeId: User["id"];
|
public blockeeId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public blockee: User | null;
|
public blockee: User | null;
|
||||||
@ -37,12 +37,12 @@ export class Blocking {
|
|||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The blocker user ID.',
|
comment: "The blocker user ID.",
|
||||||
})
|
})
|
||||||
public blockerId: User["id"];
|
public blockerId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public blocker: User | null;
|
public blocker: User | null;
|
||||||
|
@ -11,26 +11,26 @@ import { id } from "../id.js";
|
|||||||
import { Channel } from "./channel.js";
|
import { Channel } from "./channel.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['followerId', 'followeeId'], { unique: true })
|
@Index(["followerId", "followeeId"], { unique: true })
|
||||||
export class ChannelFollowing {
|
export class ChannelFollowing {
|
||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the ChannelFollowing.',
|
comment: "The created date of the ChannelFollowing.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The followee channel ID.',
|
comment: "The followee channel ID.",
|
||||||
})
|
})
|
||||||
public followeeId: Channel["id"];
|
public followeeId: Channel["id"];
|
||||||
|
|
||||||
@ManyToOne(type => Channel, {
|
@ManyToOne((type) => Channel, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public followee: Channel | null;
|
public followee: Channel | null;
|
||||||
@ -38,12 +38,12 @@ export class ChannelFollowing {
|
|||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The follower user ID.',
|
comment: "The follower user ID.",
|
||||||
})
|
})
|
||||||
public followerId: User["id"];
|
public followerId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public follower: User | null;
|
public follower: User | null;
|
||||||
|
@ -11,13 +11,13 @@ import { Channel } from "./channel.js";
|
|||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['channelId', 'noteId'], { unique: true })
|
@Index(["channelId", "noteId"], { unique: true })
|
||||||
export class ChannelNotePining {
|
export class ChannelNotePining {
|
||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the ChannelNotePining.',
|
comment: "The created date of the ChannelNotePining.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@ -25,8 +25,8 @@ export class ChannelNotePining {
|
|||||||
@Column(id())
|
@Column(id())
|
||||||
public channelId: Channel["id"];
|
public channelId: Channel["id"];
|
||||||
|
|
||||||
@ManyToOne(type => Channel, {
|
@ManyToOne((type) => Channel, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public channel: Channel | null;
|
public channel: Channel | null;
|
||||||
@ -34,8 +34,8 @@ export class ChannelNotePining {
|
|||||||
@Column(id())
|
@Column(id())
|
||||||
public noteId: Note["id"];
|
public noteId: Note["id"];
|
||||||
|
|
||||||
@ManyToOne(type => Note, {
|
@ManyToOne((type) => Note, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public note: Note | null;
|
public note: Note | null;
|
||||||
|
@ -16,13 +16,13 @@ export class Channel {
|
|||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the Channel.',
|
comment: "The created date of the Channel.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public lastNotedAt: Date | null;
|
public lastNotedAt: Date | null;
|
||||||
@ -31,52 +31,53 @@ export class Channel {
|
|||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: 'The owner ID.',
|
comment: "The owner ID.",
|
||||||
})
|
})
|
||||||
public userId: User["id"] | null;
|
public userId: User["id"] | null;
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'SET NULL',
|
onDelete: "SET NULL",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
comment: 'The name of the Channel.',
|
comment: "The name of the Channel.",
|
||||||
})
|
})
|
||||||
public name: string;
|
public name: string;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 2048, nullable: true,
|
length: 2048,
|
||||||
comment: 'The description of the Channel.',
|
nullable: true,
|
||||||
|
comment: "The description of the Channel.",
|
||||||
})
|
})
|
||||||
public description: string | null;
|
public description: string | null;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: 'The ID of banner Channel.',
|
comment: "The ID of banner Channel.",
|
||||||
})
|
})
|
||||||
public bannerId: DriveFile["id"] | null;
|
public bannerId: DriveFile["id"] | null;
|
||||||
|
|
||||||
@ManyToOne(type => DriveFile, {
|
@ManyToOne((type) => DriveFile, {
|
||||||
onDelete: 'SET NULL',
|
onDelete: "SET NULL",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public banner: DriveFile | null;
|
public banner: DriveFile | null;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('integer', {
|
@Column("integer", {
|
||||||
default: 0,
|
default: 0,
|
||||||
comment: 'The count of notes.',
|
comment: "The count of notes.",
|
||||||
})
|
})
|
||||||
public notesCount: number;
|
public notesCount: number;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('integer', {
|
@Column("integer", {
|
||||||
default: 0,
|
default: 0,
|
||||||
comment: 'The count of users.',
|
comment: "The count of users.",
|
||||||
})
|
})
|
||||||
public usersCount: number;
|
public usersCount: number;
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ import { Clip } from "./clip.js";
|
|||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['noteId', 'clipId'], { unique: true })
|
@Index(["noteId", "clipId"], { unique: true })
|
||||||
export class ClipNote {
|
export class ClipNote {
|
||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
@ -19,12 +19,12 @@ export class ClipNote {
|
|||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The note ID.',
|
comment: "The note ID.",
|
||||||
})
|
})
|
||||||
public noteId: Note["id"];
|
public noteId: Note["id"];
|
||||||
|
|
||||||
@ManyToOne(type => Note, {
|
@ManyToOne((type) => Note, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public note: Note | null;
|
public note: Note | null;
|
||||||
@ -32,12 +32,12 @@ export class ClipNote {
|
|||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The clip ID.',
|
comment: "The clip ID.",
|
||||||
})
|
})
|
||||||
public clipId: Clip["id"];
|
public clipId: Clip["id"];
|
||||||
|
|
||||||
@ManyToOne(type => Clip, {
|
@ManyToOne((type) => Clip, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public clip: Clip | null;
|
public clip: Clip | null;
|
||||||
|
@ -14,38 +14,39 @@ export class Clip {
|
|||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the Clip.',
|
comment: "The created date of the Clip.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The owner ID.',
|
comment: "The owner ID.",
|
||||||
})
|
})
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
comment: 'The name of the Clip.',
|
comment: "The name of the Clip.",
|
||||||
})
|
})
|
||||||
public name: string;
|
public name: string;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public isPublic: boolean;
|
public isPublic: boolean;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 2048, nullable: true,
|
length: 2048,
|
||||||
comment: 'The description of the Clip.',
|
nullable: true,
|
||||||
|
comment: "The description of the Clip.",
|
||||||
})
|
})
|
||||||
public description: string | null;
|
public description: string | null;
|
||||||
}
|
}
|
||||||
|
@ -12,14 +12,14 @@ import { DriveFolder } from "./drive-folder.js";
|
|||||||
import { DB_MAX_IMAGE_COMMENT_LENGTH } from "@/misc/hard-limits.js";
|
import { DB_MAX_IMAGE_COMMENT_LENGTH } from "@/misc/hard-limits.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['userId', 'folderId', 'id'])
|
@Index(["userId", "folderId", "id"])
|
||||||
export class DriveFile {
|
export class DriveFile {
|
||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the DriveFile.',
|
comment: "The created date of the DriveFile.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@ -27,64 +27,67 @@ export class DriveFile {
|
|||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: 'The owner ID.',
|
comment: "The owner ID.",
|
||||||
})
|
})
|
||||||
public userId: User["id"] | null;
|
public userId: User["id"] | null;
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'SET NULL',
|
onDelete: "SET NULL",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, nullable: true,
|
length: 128,
|
||||||
comment: 'The host of owner. It will be null if the user in local.',
|
nullable: true,
|
||||||
|
comment: "The host of owner. It will be null if the user in local.",
|
||||||
})
|
})
|
||||||
public userHost: string | null;
|
public userHost: string | null;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 32,
|
length: 32,
|
||||||
comment: 'The MD5 hash of the DriveFile.',
|
comment: "The MD5 hash of the DriveFile.",
|
||||||
})
|
})
|
||||||
public md5: string;
|
public md5: string;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 256,
|
length: 256,
|
||||||
comment: 'The file name of the DriveFile.',
|
comment: "The file name of the DriveFile.",
|
||||||
})
|
})
|
||||||
public name: string;
|
public name: string;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
comment: 'The content type (MIME) of the DriveFile.',
|
comment: "The content type (MIME) of the DriveFile.",
|
||||||
})
|
})
|
||||||
public type: string;
|
public type: string;
|
||||||
|
|
||||||
@Column('integer', {
|
@Column("integer", {
|
||||||
comment: 'The file size (bytes) of the DriveFile.',
|
comment: "The file size (bytes) of the DriveFile.",
|
||||||
})
|
})
|
||||||
public size: number;
|
public size: number;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: DB_MAX_IMAGE_COMMENT_LENGTH,
|
length: DB_MAX_IMAGE_COMMENT_LENGTH,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: 'The comment of the DriveFile.',
|
comment: "The comment of the DriveFile.",
|
||||||
})
|
})
|
||||||
public comment: string | null;
|
public comment: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, nullable: true,
|
length: 128,
|
||||||
comment: 'The BlurHash string.',
|
nullable: true,
|
||||||
|
comment: "The BlurHash string.",
|
||||||
})
|
})
|
||||||
public blurhash: string | null;
|
public blurhash: string | null;
|
||||||
|
|
||||||
@Column('jsonb', {
|
@Column("jsonb", {
|
||||||
default: {},
|
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: {
|
public properties: {
|
||||||
width?: number;
|
width?: number;
|
||||||
@ -93,59 +96,68 @@ export class DriveFile {
|
|||||||
avgColor?: string;
|
avgColor?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
@Column('boolean')
|
@Column("boolean")
|
||||||
public storedInternal: boolean;
|
public storedInternal: boolean;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512,
|
length: 512,
|
||||||
comment: 'The URL of the DriveFile.',
|
comment: "The URL of the DriveFile.",
|
||||||
})
|
})
|
||||||
public url: string;
|
public url: string;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512, nullable: true,
|
length: 512,
|
||||||
comment: 'The URL of the thumbnail of the DriveFile.',
|
nullable: true,
|
||||||
|
comment: "The URL of the thumbnail of the DriveFile.",
|
||||||
})
|
})
|
||||||
public thumbnailUrl: string | null;
|
public thumbnailUrl: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512, nullable: true,
|
length: 512,
|
||||||
comment: 'The URL of the webpublic of the DriveFile.',
|
nullable: true,
|
||||||
|
comment: "The URL of the webpublic of the DriveFile.",
|
||||||
})
|
})
|
||||||
public webpublicUrl: string | null;
|
public webpublicUrl: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, nullable: true,
|
length: 128,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public webpublicType: string | null;
|
public webpublicType: string | null;
|
||||||
|
|
||||||
@Index({ unique: true })
|
@Index({ unique: true })
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 256, nullable: true,
|
length: 256,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public accessKey: string | null;
|
public accessKey: string | null;
|
||||||
|
|
||||||
@Index({ unique: true })
|
@Index({ unique: true })
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 256, nullable: true,
|
length: 256,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public thumbnailAccessKey: string | null;
|
public thumbnailAccessKey: string | null;
|
||||||
|
|
||||||
@Index({ unique: true })
|
@Index({ unique: true })
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 256, nullable: true,
|
length: 256,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public webpublicAccessKey: string | null;
|
public webpublicAccessKey: string | null;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512, nullable: true,
|
length: 512,
|
||||||
comment: 'The URI of the DriveFile. it will be null when the DriveFile is local.',
|
nullable: true,
|
||||||
|
comment:
|
||||||
|
"The URI of the DriveFile. it will be null when the DriveFile is local.",
|
||||||
})
|
})
|
||||||
public uri: string | null;
|
public uri: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512, nullable: true,
|
length: 512,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public src: string | null;
|
public src: string | null;
|
||||||
|
|
||||||
@ -153,32 +165,33 @@ export class DriveFile {
|
|||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
nullable: true,
|
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;
|
public folderId: DriveFolder["id"] | null;
|
||||||
|
|
||||||
@ManyToOne(type => DriveFolder, {
|
@ManyToOne((type) => DriveFolder, {
|
||||||
onDelete: 'SET NULL',
|
onDelete: "SET NULL",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public folder: DriveFolder | null;
|
public folder: DriveFolder | null;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
comment: 'Whether the DriveFile is NSFW.',
|
comment: "Whether the DriveFile is NSFW.",
|
||||||
})
|
})
|
||||||
public isSensitive: boolean;
|
public isSensitive: boolean;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
comment: 'Whether the DriveFile is NSFW. (predict)',
|
comment: "Whether the DriveFile is NSFW. (predict)",
|
||||||
})
|
})
|
||||||
public maybeSensitive: boolean;
|
public maybeSensitive: boolean;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public maybePorn: boolean;
|
public maybePorn: boolean;
|
||||||
@ -187,20 +200,21 @@ export class DriveFile {
|
|||||||
* 外部の(信頼されていない)URLへの直リンクか否か
|
* 外部の(信頼されていない)URLへの直リンクか否か
|
||||||
*/
|
*/
|
||||||
@Index()
|
@Index()
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
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;
|
public isLink: boolean;
|
||||||
|
|
||||||
@Column('jsonb', {
|
@Column("jsonb", {
|
||||||
default: {},
|
default: {},
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public requestHeaders: Record<string, string> | null;
|
public requestHeaders: Record<string, string> | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, nullable: true,
|
length: 128,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public requestIp: string | null;
|
public requestIp: string | null;
|
||||||
}
|
}
|
||||||
|
@ -15,14 +15,14 @@ export class DriveFolder {
|
|||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the DriveFolder.',
|
comment: "The created date of the DriveFolder.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
comment: 'The name of the DriveFolder.',
|
comment: "The name of the DriveFolder.",
|
||||||
})
|
})
|
||||||
public name: string;
|
public name: string;
|
||||||
|
|
||||||
@ -30,12 +30,12 @@ export class DriveFolder {
|
|||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: 'The owner ID.',
|
comment: "The owner ID.",
|
||||||
})
|
})
|
||||||
public userId: User["id"] | null;
|
public userId: User["id"] | null;
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
@ -44,12 +44,13 @@ export class DriveFolder {
|
|||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
nullable: true,
|
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;
|
public parentId: DriveFolder["id"] | null;
|
||||||
|
|
||||||
@ManyToOne(type => DriveFolder, {
|
@ManyToOne((type) => DriveFolder, {
|
||||||
onDelete: 'SET NULL',
|
onDelete: "SET NULL",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public parent: DriveFolder | null;
|
public parent: DriveFolder | null;
|
||||||
|
@ -2,73 +2,82 @@ import { PrimaryColumn, Entity, Index, Column } from "typeorm";
|
|||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['name', 'host'], { unique: true })
|
@Index(["name", "host"], { unique: true })
|
||||||
export class Emoji {
|
export class Emoji {
|
||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public updatedAt: Date | null;
|
public updatedAt: Date | null;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
})
|
})
|
||||||
public name: string;
|
public name: string;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, nullable: true,
|
length: 128,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public host: string | null;
|
public host: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, nullable: true,
|
length: 128,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public category: string | null;
|
public category: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512,
|
length: 512,
|
||||||
})
|
})
|
||||||
public originalUrl: string;
|
public originalUrl: string;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512,
|
length: 512,
|
||||||
default: '',
|
default: "",
|
||||||
})
|
})
|
||||||
public publicUrl: string;
|
public publicUrl: string;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512, nullable: true,
|
length: 512,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public uri: string | null;
|
public uri: string | null;
|
||||||
|
|
||||||
// publicUrlの方のtypeが入る
|
// publicUrlの方のtypeが入る
|
||||||
// (mime)
|
// (mime)
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 64, nullable: true,
|
length: 64,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public type: string | null;
|
public type: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
array: true, length: 128, default: '{}',
|
array: true,
|
||||||
|
length: 128,
|
||||||
|
default: "{}",
|
||||||
})
|
})
|
||||||
public aliases: string[];
|
public aliases: string[];
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 1024, nullable: true,
|
length: 1024,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public license: string | null;
|
public license: string | null;
|
||||||
|
|
||||||
@Column('integer', {
|
@Column("integer", {
|
||||||
nullable: true, comment: 'Image width',
|
nullable: true,
|
||||||
|
comment: "Image width",
|
||||||
})
|
})
|
||||||
public width: number | null;
|
public width: number | null;
|
||||||
|
|
||||||
@Column('integer', {
|
@Column("integer", {
|
||||||
nullable: true, comment: "Image height",
|
nullable: true,
|
||||||
|
comment: "Image height",
|
||||||
})
|
})
|
||||||
public height: number | null;
|
public height: number | null;
|
||||||
}
|
}
|
||||||
|
@ -10,25 +10,25 @@ import { User } from "./user.js";
|
|||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['followerId', 'followeeId'], { unique: true })
|
@Index(["followerId", "followeeId"], { unique: true })
|
||||||
export class FollowRequest {
|
export class FollowRequest {
|
||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the FollowRequest.',
|
comment: "The created date of the FollowRequest.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The followee user ID.',
|
comment: "The followee user ID.",
|
||||||
})
|
})
|
||||||
public followeeId: User["id"];
|
public followeeId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public followee: User | null;
|
public followee: User | null;
|
||||||
@ -36,56 +36,63 @@ export class FollowRequest {
|
|||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The follower user ID.',
|
comment: "The follower user ID.",
|
||||||
})
|
})
|
||||||
public followerId: User["id"];
|
public followerId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public follower: User | null;
|
public follower: User | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, nullable: true,
|
length: 128,
|
||||||
comment: 'id of Follow Activity.',
|
nullable: true,
|
||||||
|
comment: "id of Follow Activity.",
|
||||||
})
|
})
|
||||||
public requestId: string | null;
|
public requestId: string | null;
|
||||||
|
|
||||||
//#region Denormalized fields
|
//#region Denormalized fields
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, nullable: true,
|
length: 128,
|
||||||
comment: '[Denormalized]',
|
nullable: true,
|
||||||
|
comment: "[Denormalized]",
|
||||||
})
|
})
|
||||||
public followerHost: string | null;
|
public followerHost: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512, nullable: true,
|
length: 512,
|
||||||
comment: '[Denormalized]',
|
nullable: true,
|
||||||
|
comment: "[Denormalized]",
|
||||||
})
|
})
|
||||||
public followerInbox: string | null;
|
public followerInbox: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512, nullable: true,
|
length: 512,
|
||||||
comment: '[Denormalized]',
|
nullable: true,
|
||||||
|
comment: "[Denormalized]",
|
||||||
})
|
})
|
||||||
public followerSharedInbox: string | null;
|
public followerSharedInbox: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, nullable: true,
|
length: 128,
|
||||||
comment: '[Denormalized]',
|
nullable: true,
|
||||||
|
comment: "[Denormalized]",
|
||||||
})
|
})
|
||||||
public followeeHost: string | null;
|
public followeeHost: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512, nullable: true,
|
length: 512,
|
||||||
comment: '[Denormalized]',
|
nullable: true,
|
||||||
|
comment: "[Denormalized]",
|
||||||
})
|
})
|
||||||
public followeeInbox: string | null;
|
public followeeInbox: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512, nullable: true,
|
length: 512,
|
||||||
comment: '[Denormalized]',
|
nullable: true,
|
||||||
|
comment: "[Denormalized]",
|
||||||
})
|
})
|
||||||
public followeeSharedInbox: string | null;
|
public followeeSharedInbox: string | null;
|
||||||
//#endregion
|
//#endregion
|
||||||
|
@ -10,26 +10,26 @@ import { User } from "./user.js";
|
|||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['followerId', 'followeeId'], { unique: true })
|
@Index(["followerId", "followeeId"], { unique: true })
|
||||||
export class Following {
|
export class Following {
|
||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the Following.',
|
comment: "The created date of the Following.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The followee user ID.',
|
comment: "The followee user ID.",
|
||||||
})
|
})
|
||||||
public followeeId: User["id"];
|
public followeeId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public followee: User | null;
|
public followee: User | null;
|
||||||
@ -37,52 +37,58 @@ export class Following {
|
|||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The follower user ID.',
|
comment: "The follower user ID.",
|
||||||
})
|
})
|
||||||
public followerId: User["id"];
|
public followerId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public follower: User | null;
|
public follower: User | null;
|
||||||
|
|
||||||
//#region Denormalized fields
|
//#region Denormalized fields
|
||||||
@Index()
|
@Index()
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, nullable: true,
|
length: 128,
|
||||||
comment: '[Denormalized]',
|
nullable: true,
|
||||||
|
comment: "[Denormalized]",
|
||||||
})
|
})
|
||||||
public followerHost: string | null;
|
public followerHost: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512, nullable: true,
|
length: 512,
|
||||||
comment: '[Denormalized]',
|
nullable: true,
|
||||||
|
comment: "[Denormalized]",
|
||||||
})
|
})
|
||||||
public followerInbox: string | null;
|
public followerInbox: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512, nullable: true,
|
length: 512,
|
||||||
comment: '[Denormalized]',
|
nullable: true,
|
||||||
|
comment: "[Denormalized]",
|
||||||
})
|
})
|
||||||
public followerSharedInbox: string | null;
|
public followerSharedInbox: string | null;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, nullable: true,
|
length: 128,
|
||||||
comment: '[Denormalized]',
|
nullable: true,
|
||||||
|
comment: "[Denormalized]",
|
||||||
})
|
})
|
||||||
public followeeHost: string | null;
|
public followeeHost: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512, nullable: true,
|
length: 512,
|
||||||
comment: '[Denormalized]',
|
nullable: true,
|
||||||
|
comment: "[Denormalized]",
|
||||||
})
|
})
|
||||||
public followeeInbox: string | null;
|
public followeeInbox: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512, nullable: true,
|
length: 512,
|
||||||
comment: '[Denormalized]',
|
nullable: true,
|
||||||
|
comment: "[Denormalized]",
|
||||||
})
|
})
|
||||||
public followeeSharedInbox: string | null;
|
public followeeSharedInbox: string | null;
|
||||||
//#endregion
|
//#endregion
|
||||||
|
@ -11,20 +11,20 @@ import { id } from "../id.js";
|
|||||||
import { GalleryPost } from "./gallery-post.js";
|
import { GalleryPost } from "./gallery-post.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['userId', 'postId'], { unique: true })
|
@Index(["userId", "postId"], { unique: true })
|
||||||
export class GalleryLike {
|
export class GalleryLike {
|
||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Column('timestamp with time zone')
|
@Column("timestamp with time zone")
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column(id())
|
@Column(id())
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
@ -32,8 +32,8 @@ export class GalleryLike {
|
|||||||
@Column(id())
|
@Column(id())
|
||||||
public postId: GalleryPost["id"];
|
public postId: GalleryPost["id"];
|
||||||
|
|
||||||
@ManyToOne(type => GalleryPost, {
|
@ManyToOne((type) => GalleryPost, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public post: GalleryPost | null;
|
public post: GalleryPost | null;
|
||||||
|
@ -16,36 +16,37 @@ export class GalleryPost {
|
|||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the GalleryPost.',
|
comment: "The created date of the GalleryPost.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The updated date of the GalleryPost.',
|
comment: "The updated date of the GalleryPost.",
|
||||||
})
|
})
|
||||||
public updatedAt: Date;
|
public updatedAt: Date;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 256,
|
length: 256,
|
||||||
})
|
})
|
||||||
public title: string;
|
public title: string;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 2048, nullable: true,
|
length: 2048,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public description: string | null;
|
public description: string | null;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The ID of author.',
|
comment: "The ID of author.",
|
||||||
})
|
})
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
@ -53,26 +54,29 @@ export class GalleryPost {
|
|||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
array: true, default: '{}',
|
array: true,
|
||||||
|
default: "{}",
|
||||||
})
|
})
|
||||||
public fileIds: DriveFile["id"][];
|
public fileIds: DriveFile["id"][];
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
comment: 'Whether the post is sensitive.',
|
comment: "Whether the post is sensitive.",
|
||||||
})
|
})
|
||||||
public isSensitive: boolean;
|
public isSensitive: boolean;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('integer', {
|
@Column("integer", {
|
||||||
default: 0,
|
default: 0,
|
||||||
})
|
})
|
||||||
public likedCount: number;
|
public likedCount: number;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, array: true, default: '{}',
|
length: 128,
|
||||||
|
array: true,
|
||||||
|
default: "{}",
|
||||||
})
|
})
|
||||||
public tags: string[];
|
public tags: string[];
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ export class Hashtag {
|
|||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Index({ unique: true })
|
@Index({ unique: true })
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
})
|
})
|
||||||
public name: string;
|
public name: string;
|
||||||
@ -20,7 +20,7 @@ export class Hashtag {
|
|||||||
public mentionedUserIds: User["id"][];
|
public mentionedUserIds: User["id"][];
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('integer', {
|
@Column("integer", {
|
||||||
default: 0,
|
default: 0,
|
||||||
})
|
})
|
||||||
public mentionedUsersCount: number;
|
public mentionedUsersCount: number;
|
||||||
@ -32,7 +32,7 @@ export class Hashtag {
|
|||||||
public mentionedLocalUserIds: User["id"][];
|
public mentionedLocalUserIds: User["id"][];
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('integer', {
|
@Column("integer", {
|
||||||
default: 0,
|
default: 0,
|
||||||
})
|
})
|
||||||
public mentionedLocalUsersCount: number;
|
public mentionedLocalUsersCount: number;
|
||||||
@ -44,7 +44,7 @@ export class Hashtag {
|
|||||||
public mentionedRemoteUserIds: User["id"][];
|
public mentionedRemoteUserIds: User["id"][];
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('integer', {
|
@Column("integer", {
|
||||||
default: 0,
|
default: 0,
|
||||||
})
|
})
|
||||||
public mentionedRemoteUsersCount: number;
|
public mentionedRemoteUsersCount: number;
|
||||||
@ -56,7 +56,7 @@ export class Hashtag {
|
|||||||
public attachedUserIds: User["id"][];
|
public attachedUserIds: User["id"][];
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('integer', {
|
@Column("integer", {
|
||||||
default: 0,
|
default: 0,
|
||||||
})
|
})
|
||||||
public attachedUsersCount: number;
|
public attachedUsersCount: number;
|
||||||
@ -68,7 +68,7 @@ export class Hashtag {
|
|||||||
public attachedLocalUserIds: User["id"][];
|
public attachedLocalUserIds: User["id"][];
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('integer', {
|
@Column("integer", {
|
||||||
default: 0,
|
default: 0,
|
||||||
})
|
})
|
||||||
public attachedLocalUsersCount: number;
|
public attachedLocalUsersCount: number;
|
||||||
@ -80,7 +80,7 @@ export class Hashtag {
|
|||||||
public attachedRemoteUserIds: User["id"][];
|
public attachedRemoteUserIds: User["id"][];
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('integer', {
|
@Column("integer", {
|
||||||
default: 0,
|
default: 0,
|
||||||
})
|
})
|
||||||
public attachedRemoteUsersCount: number;
|
public attachedRemoteUsersCount: number;
|
||||||
|
@ -10,8 +10,8 @@ export class Instance {
|
|||||||
* このインスタンスを捕捉した日時
|
* このインスタンスを捕捉した日時
|
||||||
*/
|
*/
|
||||||
@Index()
|
@Index()
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The caught date of the Instance.',
|
comment: "The caught date of the Instance.",
|
||||||
})
|
})
|
||||||
public caughtAt: Date;
|
public caughtAt: Date;
|
||||||
|
|
||||||
@ -19,34 +19,34 @@ export class Instance {
|
|||||||
* ホスト
|
* ホスト
|
||||||
*/
|
*/
|
||||||
@Index({ unique: true })
|
@Index({ unique: true })
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
comment: 'The host of the Instance.',
|
comment: "The host of the Instance.",
|
||||||
})
|
})
|
||||||
public host: string;
|
public host: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* インスタンスのユーザー数
|
* インスタンスのユーザー数
|
||||||
*/
|
*/
|
||||||
@Column('integer', {
|
@Column("integer", {
|
||||||
default: 0,
|
default: 0,
|
||||||
comment: 'The count of the users of the Instance.',
|
comment: "The count of the users of the Instance.",
|
||||||
})
|
})
|
||||||
public usersCount: number;
|
public usersCount: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* インスタンスの投稿数
|
* インスタンスの投稿数
|
||||||
*/
|
*/
|
||||||
@Column('integer', {
|
@Column("integer", {
|
||||||
default: 0,
|
default: 0,
|
||||||
comment: 'The count of the notes of the Instance.',
|
comment: "The count of the notes of the Instance.",
|
||||||
})
|
})
|
||||||
public notesCount: number;
|
public notesCount: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* このインスタンスのユーザーからフォローされている、自インスタンスのユーザーの数
|
* このインスタンスのユーザーからフォローされている、自インスタンスのユーザーの数
|
||||||
*/
|
*/
|
||||||
@Column('integer', {
|
@Column("integer", {
|
||||||
default: 0,
|
default: 0,
|
||||||
})
|
})
|
||||||
public followingCount: number;
|
public followingCount: number;
|
||||||
@ -54,7 +54,7 @@ export class Instance {
|
|||||||
/**
|
/**
|
||||||
* このインスタンスのユーザーをフォローしている、自インスタンスのユーザーの数
|
* このインスタンスのユーザーをフォローしている、自インスタンスのユーザーの数
|
||||||
*/
|
*/
|
||||||
@Column('integer', {
|
@Column("integer", {
|
||||||
default: 0,
|
default: 0,
|
||||||
})
|
})
|
||||||
public followersCount: number;
|
public followersCount: number;
|
||||||
@ -62,7 +62,7 @@ export class Instance {
|
|||||||
/**
|
/**
|
||||||
* 直近のリクエスト送信日時
|
* 直近のリクエスト送信日時
|
||||||
*/
|
*/
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public latestRequestSentAt: Date | null;
|
public latestRequestSentAt: Date | null;
|
||||||
@ -70,7 +70,7 @@ export class Instance {
|
|||||||
/**
|
/**
|
||||||
* 直近のリクエスト送信時のHTTPステータスコード
|
* 直近のリクエスト送信時のHTTPステータスコード
|
||||||
*/
|
*/
|
||||||
@Column('integer', {
|
@Column("integer", {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public latestStatus: number | null;
|
public latestStatus: number | null;
|
||||||
@ -78,7 +78,7 @@ export class Instance {
|
|||||||
/**
|
/**
|
||||||
* 直近のリクエスト受信日時
|
* 直近のリクエスト受信日時
|
||||||
*/
|
*/
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public latestRequestReceivedAt: Date | null;
|
public latestRequestReceivedAt: Date | null;
|
||||||
@ -86,13 +86,13 @@ export class Instance {
|
|||||||
/**
|
/**
|
||||||
* このインスタンスと最後にやり取りした日時
|
* このインスタンスと最後にやり取りした日時
|
||||||
*/
|
*/
|
||||||
@Column('timestamp with time zone')
|
@Column("timestamp with time zone")
|
||||||
public lastCommunicatedAt: Date;
|
public lastCommunicatedAt: Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* このインスタンスと不通かどうか
|
* このインスタンスと不通かどうか
|
||||||
*/
|
*/
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public isNotResponding: boolean;
|
public isNotResponding: boolean;
|
||||||
@ -101,63 +101,72 @@ export class Instance {
|
|||||||
* このインスタンスへの配信を停止するか
|
* このインスタンスへの配信を停止するか
|
||||||
*/
|
*/
|
||||||
@Index()
|
@Index()
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public isSuspended: boolean;
|
public isSuspended: boolean;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 64, nullable: true,
|
length: 64,
|
||||||
comment: 'The software of the Instance.',
|
nullable: true,
|
||||||
|
comment: "The software of the Instance.",
|
||||||
})
|
})
|
||||||
public softwareName: string | null;
|
public softwareName: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 64, nullable: true,
|
length: 64,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public softwareVersion: string | null;
|
public softwareVersion: string | null;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public openRegistrations: boolean | null;
|
public openRegistrations: boolean | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 256, nullable: true,
|
length: 256,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public name: string | null;
|
public name: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 4096, nullable: true,
|
length: 4096,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public description: string | null;
|
public description: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, nullable: true,
|
length: 128,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public maintainerName: string | null;
|
public maintainerName: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 256, nullable: true,
|
length: 256,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public maintainerEmail: string | null;
|
public maintainerEmail: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 256, nullable: true,
|
length: 256,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public iconUrl: string | null;
|
public iconUrl: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 256, nullable: true,
|
length: 256,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public faviconUrl: string | null;
|
public faviconUrl: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 64, nullable: true,
|
length: 64,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public themeColor: string | null;
|
public themeColor: string | null;
|
||||||
|
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public infoUpdatedAt: Date | null;
|
public infoUpdatedAt: Date | null;
|
||||||
|
@ -17,68 +17,73 @@ export class MessagingMessage {
|
|||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the MessagingMessage.',
|
comment: "The created date of the MessagingMessage.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The sender user ID.',
|
comment: "The sender user ID.",
|
||||||
})
|
})
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(), nullable: true,
|
...id(),
|
||||||
comment: 'The recipient user ID.',
|
nullable: true,
|
||||||
|
comment: "The recipient user ID.",
|
||||||
})
|
})
|
||||||
public recipientId: User["id"] | null;
|
public recipientId: User["id"] | null;
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public recipient: User | null;
|
public recipient: User | null;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(), nullable: true,
|
...id(),
|
||||||
comment: 'The recipient group ID.',
|
nullable: true,
|
||||||
|
comment: "The recipient group ID.",
|
||||||
})
|
})
|
||||||
public groupId: UserGroup["id"] | null;
|
public groupId: UserGroup["id"] | null;
|
||||||
|
|
||||||
@ManyToOne(type => UserGroup, {
|
@ManyToOne((type) => UserGroup, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public group: UserGroup | null;
|
public group: UserGroup | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 4096, nullable: true,
|
length: 4096,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public text: string | null;
|
public text: string | null;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public isRead: boolean;
|
public isRead: boolean;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512, nullable: true,
|
length: 512,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public uri: string | null;
|
public uri: string | null;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
array: true, default: '{}',
|
array: true,
|
||||||
|
default: "{}",
|
||||||
})
|
})
|
||||||
public reads: User["id"][];
|
public reads: User["id"][];
|
||||||
|
|
||||||
@ -88,8 +93,8 @@ export class MessagingMessage {
|
|||||||
})
|
})
|
||||||
public fileId: DriveFile["id"] | null;
|
public fileId: DriveFile["id"] | null;
|
||||||
|
|
||||||
@ManyToOne(type => DriveFile, {
|
@ManyToOne((type) => DriveFile, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public file: DriveFile | null;
|
public file: DriveFile | null;
|
||||||
|
@ -6,119 +6,144 @@ import type { Clip } from "./clip.js";
|
|||||||
@Entity()
|
@Entity()
|
||||||
export class Meta {
|
export class Meta {
|
||||||
@PrimaryColumn({
|
@PrimaryColumn({
|
||||||
type: 'varchar',
|
type: "varchar",
|
||||||
length: 32,
|
length: 32,
|
||||||
})
|
})
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, nullable: true,
|
length: 128,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public name: string | null;
|
public name: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 1024, nullable: true,
|
length: 1024,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public description: string | null;
|
public description: string | null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* メンテナの名前
|
* メンテナの名前
|
||||||
*/
|
*/
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, nullable: true,
|
length: 128,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public maintainerName: string | null;
|
public maintainerName: string | null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* メンテナの連絡先
|
* メンテナの連絡先
|
||||||
*/
|
*/
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, nullable: true,
|
length: 128,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public maintainerEmail: string | null;
|
public maintainerEmail: string | null;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public disableRegistration: boolean;
|
public disableRegistration: boolean;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public disableLocalTimeline: boolean;
|
public disableLocalTimeline: boolean;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: true,
|
default: true,
|
||||||
})
|
})
|
||||||
public disableRecommendedTimeline: boolean;
|
public disableRecommendedTimeline: boolean;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public disableGlobalTimeline: boolean;
|
public disableGlobalTimeline: boolean;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 256, default: '⭐',
|
length: 256,
|
||||||
|
default: "⭐",
|
||||||
})
|
})
|
||||||
public defaultReaction: string;
|
public defaultReaction: string;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 64, array: true, default: '{}',
|
length: 64,
|
||||||
|
array: true,
|
||||||
|
default: "{}",
|
||||||
})
|
})
|
||||||
public langs: string[];
|
public langs: string[];
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 256, array: true, default: '{}',
|
length: 256,
|
||||||
|
array: true,
|
||||||
|
default: "{}",
|
||||||
})
|
})
|
||||||
public pinnedUsers: string[];
|
public pinnedUsers: string[];
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 256, array: true, default: '{}',
|
length: 256,
|
||||||
|
array: true,
|
||||||
|
default: "{}",
|
||||||
})
|
})
|
||||||
public recommendedInstances: string[];
|
public recommendedInstances: string[];
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 256, array: true, default: '{}',
|
length: 256,
|
||||||
|
array: true,
|
||||||
|
default: "{}",
|
||||||
})
|
})
|
||||||
public customMOTD: string[];
|
public customMOTD: string[];
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 256, array: true, default: '{}',
|
length: 256,
|
||||||
|
array: true,
|
||||||
|
default: "{}",
|
||||||
})
|
})
|
||||||
public customSplashIcons: string[];
|
public customSplashIcons: string[];
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 256, array: true, default: '{}',
|
length: 256,
|
||||||
|
array: true,
|
||||||
|
default: "{}",
|
||||||
})
|
})
|
||||||
public hiddenTags: string[];
|
public hiddenTags: string[];
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 256, array: true, default: '{}',
|
length: 256,
|
||||||
|
array: true,
|
||||||
|
default: "{}",
|
||||||
})
|
})
|
||||||
public blockedHosts: string[];
|
public blockedHosts: string[];
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 256, array: true, default: '{}',
|
length: 256,
|
||||||
|
array: true,
|
||||||
|
default: "{}",
|
||||||
})
|
})
|
||||||
public silencedHosts: string[];
|
public silencedHosts: string[];
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public secureMode: boolean;
|
public secureMode: boolean;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public privateMode: boolean;
|
public privateMode: boolean;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 256, array: true, default: '{}',
|
length: 256,
|
||||||
|
array: true,
|
||||||
|
default: "{}",
|
||||||
})
|
})
|
||||||
public allowedHosts: string[];
|
public allowedHosts: string[];
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512, array: true, default: '{/featured,/channels,/explore,/pages,/about-calckey}',
|
length: 512,
|
||||||
|
array: true,
|
||||||
|
default: "{/featured,/channels,/explore,/pages,/about-calckey}",
|
||||||
})
|
})
|
||||||
public pinnedPages: string[];
|
public pinnedPages: string[];
|
||||||
|
|
||||||
@ -128,51 +153,51 @@ export class Meta {
|
|||||||
})
|
})
|
||||||
public pinnedClipId: Clip["id"] | null;
|
public pinnedClipId: Clip["id"] | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512,
|
length: 512,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public themeColor: string | null;
|
public themeColor: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512,
|
length: 512,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
default: '/assets/ai.png',
|
default: "/assets/ai.png",
|
||||||
})
|
})
|
||||||
public mascotImageUrl: string | null;
|
public mascotImageUrl: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512,
|
length: 512,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public bannerUrl: string | null;
|
public bannerUrl: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512,
|
length: 512,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public backgroundImageUrl: string | null;
|
public backgroundImageUrl: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512,
|
length: 512,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public logoImageUrl: string | null;
|
public logoImageUrl: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512,
|
length: 512,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
default: 'https://xn--931a.moe/aiart/yubitun.png',
|
default: "https://xn--931a.moe/aiart/yubitun.png",
|
||||||
})
|
})
|
||||||
public errorImageUrl: string | null;
|
public errorImageUrl: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512,
|
length: 512,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public iconUrl: string | null;
|
public iconUrl: string | null;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: true,
|
default: true,
|
||||||
})
|
})
|
||||||
public cacheRemoteFiles: boolean;
|
public cacheRemoteFiles: boolean;
|
||||||
@ -183,60 +208,60 @@ export class Meta {
|
|||||||
})
|
})
|
||||||
public proxyAccountId: User["id"] | null;
|
public proxyAccountId: User["id"] | null;
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'SET NULL',
|
onDelete: "SET NULL",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public proxyAccount: User | null;
|
public proxyAccount: User | null;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public emailRequiredForSignup: boolean;
|
public emailRequiredForSignup: boolean;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public enableHcaptcha: boolean;
|
public enableHcaptcha: boolean;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 64,
|
length: 64,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public hcaptchaSiteKey: string | null;
|
public hcaptchaSiteKey: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 64,
|
length: 64,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public hcaptchaSecretKey: string | null;
|
public hcaptchaSecretKey: string | null;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public enableRecaptcha: boolean;
|
public enableRecaptcha: boolean;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 64,
|
length: 64,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public recaptchaSiteKey: string | null;
|
public recaptchaSiteKey: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 64,
|
length: 64,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public recaptchaSecretKey: string | null;
|
public recaptchaSecretKey: string | null;
|
||||||
|
|
||||||
@Column('enum', {
|
@Column("enum", {
|
||||||
enum: ['none', 'all', 'local', 'remote'],
|
enum: ["none", "all", "local", "remote"],
|
||||||
default: 'none',
|
default: "none",
|
||||||
})
|
})
|
||||||
public sensitiveMediaDetection: "none" | "all" | "local" | "remote";
|
public sensitiveMediaDetection: "none" | "all" | "local" | "remote";
|
||||||
|
|
||||||
@Column('enum', {
|
@Column("enum", {
|
||||||
enum: ['medium', 'low', 'high', 'veryLow', 'veryHigh'],
|
enum: ["medium", "low", "high", "veryLow", "veryHigh"],
|
||||||
default: 'medium',
|
default: "medium",
|
||||||
})
|
})
|
||||||
public sensitiveMediaDetectionSensitivity:
|
public sensitiveMediaDetectionSensitivity:
|
||||||
| "medium"
|
| "medium"
|
||||||
@ -245,279 +270,279 @@ export class Meta {
|
|||||||
| "veryLow"
|
| "veryLow"
|
||||||
| "veryHigh";
|
| "veryHigh";
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public setSensitiveFlagAutomatically: boolean;
|
public setSensitiveFlagAutomatically: boolean;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public enableSensitiveMediaDetectionForVideos: boolean;
|
public enableSensitiveMediaDetectionForVideos: boolean;
|
||||||
|
|
||||||
@Column('integer', {
|
@Column("integer", {
|
||||||
default: 1024,
|
default: 1024,
|
||||||
comment: 'Drive capacity of a local user (MB)',
|
comment: "Drive capacity of a local user (MB)",
|
||||||
})
|
})
|
||||||
public localDriveCapacityMb: number;
|
public localDriveCapacityMb: number;
|
||||||
|
|
||||||
@Column('integer', {
|
@Column("integer", {
|
||||||
default: 32,
|
default: 32,
|
||||||
comment: 'Drive capacity of a remote user (MB)',
|
comment: "Drive capacity of a remote user (MB)",
|
||||||
})
|
})
|
||||||
public remoteDriveCapacityMb: number;
|
public remoteDriveCapacityMb: number;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public summalyProxy: string | null;
|
public summalyProxy: string | null;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public enableEmail: boolean;
|
public enableEmail: boolean;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public email: string | null;
|
public email: string | null;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public smtpSecure: boolean;
|
public smtpSecure: boolean;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public smtpHost: string | null;
|
public smtpHost: string | null;
|
||||||
|
|
||||||
@Column('integer', {
|
@Column("integer", {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public smtpPort: number | null;
|
public smtpPort: number | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public smtpUser: string | null;
|
public smtpUser: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public smtpPass: string | null;
|
public smtpPass: string | null;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public enableServiceWorker: boolean;
|
public enableServiceWorker: boolean;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public swPublicKey: string | null;
|
public swPublicKey: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public swPrivateKey: string | null;
|
public swPrivateKey: string | null;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public enableTwitterIntegration: boolean;
|
public enableTwitterIntegration: boolean;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public twitterConsumerKey: string | null;
|
public twitterConsumerKey: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public twitterConsumerSecret: string | null;
|
public twitterConsumerSecret: string | null;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public enableGithubIntegration: boolean;
|
public enableGithubIntegration: boolean;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public githubClientId: string | null;
|
public githubClientId: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public githubClientSecret: string | null;
|
public githubClientSecret: string | null;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public enableDiscordIntegration: boolean;
|
public enableDiscordIntegration: boolean;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public discordClientId: string | null;
|
public discordClientId: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public discordClientSecret: string | null;
|
public discordClientSecret: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public deeplAuthKey: string | null;
|
public deeplAuthKey: string | null;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public deeplIsPro: boolean;
|
public deeplIsPro: boolean;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512,
|
length: 512,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public libreTranslateApiUrl: string | null;
|
public libreTranslateApiUrl: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public libreTranslateApiKey: string | null;
|
public libreTranslateApiKey: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512,
|
length: 512,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public ToSUrl: string | null;
|
public ToSUrl: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512,
|
length: 512,
|
||||||
default: 'https://codeberg.org/calckey/calckey',
|
default: "https://codeberg.org/calckey/calckey",
|
||||||
nullable: false,
|
nullable: false,
|
||||||
})
|
})
|
||||||
public repositoryUrl: string;
|
public repositoryUrl: string;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512,
|
length: 512,
|
||||||
default: 'https://codeberg.org/calckey/calckey/issues/new',
|
default: "https://codeberg.org/calckey/calckey/issues/new",
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public feedbackUrl: string | null;
|
public feedbackUrl: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 8192,
|
length: 8192,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public defaultLightTheme: string | null;
|
public defaultLightTheme: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 8192,
|
length: 8192,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public defaultDarkTheme: string | null;
|
public defaultDarkTheme: string | null;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public useObjectStorage: boolean;
|
public useObjectStorage: boolean;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512,
|
length: 512,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public objectStorageBucket: string | null;
|
public objectStorageBucket: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512,
|
length: 512,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public objectStoragePrefix: string | null;
|
public objectStoragePrefix: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512,
|
length: 512,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public objectStorageBaseUrl: string | null;
|
public objectStorageBaseUrl: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512,
|
length: 512,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public objectStorageEndpoint: string | null;
|
public objectStorageEndpoint: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512,
|
length: 512,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public objectStorageRegion: string | null;
|
public objectStorageRegion: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512,
|
length: 512,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public objectStorageAccessKey: string | null;
|
public objectStorageAccessKey: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512,
|
length: 512,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public objectStorageSecretKey: string | null;
|
public objectStorageSecretKey: string | null;
|
||||||
|
|
||||||
@Column('integer', {
|
@Column("integer", {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public objectStoragePort: number | null;
|
public objectStoragePort: number | null;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: true,
|
default: true,
|
||||||
})
|
})
|
||||||
public objectStorageUseSSL: boolean;
|
public objectStorageUseSSL: boolean;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: true,
|
default: true,
|
||||||
})
|
})
|
||||||
public objectStorageUseProxy: boolean;
|
public objectStorageUseProxy: boolean;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public objectStorageSetPublicRead: boolean;
|
public objectStorageSetPublicRead: boolean;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: true,
|
default: true,
|
||||||
})
|
})
|
||||||
public objectStorageS3ForcePathStyle: boolean;
|
public objectStorageS3ForcePathStyle: boolean;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public enableIpLogging: boolean;
|
public enableIpLogging: boolean;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: true,
|
default: true,
|
||||||
})
|
})
|
||||||
public enableActiveEmailValidation: boolean;
|
public enableActiveEmailValidation: boolean;
|
||||||
|
|
||||||
@Column('jsonb', {
|
@Column("jsonb", {
|
||||||
default: {},
|
default: {},
|
||||||
})
|
})
|
||||||
public experimentalFeatures: Record<string, unknown>;
|
public experimentalFeatures: Record<string, unknown>;
|
||||||
|
@ -14,8 +14,8 @@ export class ModerationLog {
|
|||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the ModerationLog.',
|
comment: "The created date of the ModerationLog.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@ -23,17 +23,17 @@ export class ModerationLog {
|
|||||||
@Column(id())
|
@Column(id())
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
})
|
})
|
||||||
public type: string;
|
public type: string;
|
||||||
|
|
||||||
@Column('jsonb')
|
@Column("jsonb")
|
||||||
public info: Record<string, any>;
|
public info: Record<string, any>;
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ import { id } from "../id.js";
|
|||||||
import { mutedNoteReasons } from "../../types.js";
|
import { mutedNoteReasons } from "../../types.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['noteId', 'userId'], { unique: true })
|
@Index(["noteId", "userId"], { unique: true })
|
||||||
export class MutedNote {
|
export class MutedNote {
|
||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
@ -20,12 +20,12 @@ export class MutedNote {
|
|||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The note ID.',
|
comment: "The note ID.",
|
||||||
})
|
})
|
||||||
public noteId: Note["id"];
|
public noteId: Note["id"];
|
||||||
|
|
||||||
@ManyToOne(type => Note, {
|
@ManyToOne((type) => Note, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public note: Note | null;
|
public note: Note | null;
|
||||||
@ -33,12 +33,12 @@ export class MutedNote {
|
|||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The user ID.',
|
comment: "The user ID.",
|
||||||
})
|
})
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
@ -47,9 +47,9 @@ export class MutedNote {
|
|||||||
* ミュートされた理由。
|
* ミュートされた理由。
|
||||||
*/
|
*/
|
||||||
@Index()
|
@Index()
|
||||||
@Column('enum', {
|
@Column("enum", {
|
||||||
enum: mutedNoteReasons,
|
enum: mutedNoteReasons,
|
||||||
comment: 'The reason of the MutedNote.',
|
comment: "The reason of the MutedNote.",
|
||||||
})
|
})
|
||||||
public reason: typeof mutedNoteReasons[number];
|
public reason: typeof mutedNoteReasons[number];
|
||||||
}
|
}
|
||||||
|
@ -10,19 +10,19 @@ import { User } from "./user.js";
|
|||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['muterId', 'muteeId'], { unique: true })
|
@Index(["muterId", "muteeId"], { unique: true })
|
||||||
export class Muting {
|
export class Muting {
|
||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the Muting.',
|
comment: "The created date of the Muting.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public expiresAt: Date | null;
|
public expiresAt: Date | null;
|
||||||
@ -30,12 +30,12 @@ export class Muting {
|
|||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The mutee user ID.',
|
comment: "The mutee user ID.",
|
||||||
})
|
})
|
||||||
public muteeId: User["id"];
|
public muteeId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public mutee: User | null;
|
public mutee: User | null;
|
||||||
@ -43,12 +43,12 @@ export class Muting {
|
|||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The muter user ID.',
|
comment: "The muter user ID.",
|
||||||
})
|
})
|
||||||
public muterId: User["id"];
|
public muterId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public muter: User | null;
|
public muter: User | null;
|
||||||
|
@ -18,34 +18,36 @@ export class NoteEdit {
|
|||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The ID of note.',
|
comment: "The ID of note.",
|
||||||
})
|
})
|
||||||
public noteId: Note["id"];
|
public noteId: Note["id"];
|
||||||
|
|
||||||
@ManyToOne(type => Note, {
|
@ManyToOne((type) => Note, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public note: Note | null;
|
public note: Note | null;
|
||||||
|
|
||||||
@Column('text', {
|
@Column("text", {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public text: string | null;
|
public text: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512, nullable: true,
|
length: 512,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public cw: string | null;
|
public cw: string | null;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
array: true, default: '{}',
|
array: true,
|
||||||
|
default: "{}",
|
||||||
})
|
})
|
||||||
public fileIds: DriveFile["id"][];
|
public fileIds: DriveFile["id"][];
|
||||||
|
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The updated date of the Note.',
|
comment: "The updated date of the Note.",
|
||||||
})
|
})
|
||||||
public updatedAt: Date;
|
public updatedAt: Date;
|
||||||
}
|
}
|
||||||
|
@ -11,13 +11,13 @@ import { User } from "./user.js";
|
|||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['userId', 'noteId'], { unique: true })
|
@Index(["userId", "noteId"], { unique: true })
|
||||||
export class NoteFavorite {
|
export class NoteFavorite {
|
||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the NoteFavorite.',
|
comment: "The created date of the NoteFavorite.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@ -25,8 +25,8 @@ export class NoteFavorite {
|
|||||||
@Column(id())
|
@Column(id())
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
@ -34,8 +34,8 @@ export class NoteFavorite {
|
|||||||
@Column(id())
|
@Column(id())
|
||||||
public noteId: Note["id"];
|
public noteId: Note["id"];
|
||||||
|
|
||||||
@ManyToOne(type => Note, {
|
@ManyToOne((type) => Note, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public note: Note | null;
|
public note: Note | null;
|
||||||
|
@ -11,14 +11,14 @@ import { Note } from "./note.js";
|
|||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['userId', 'noteId'], { unique: true })
|
@Index(["userId", "noteId"], { unique: true })
|
||||||
export class NoteReaction {
|
export class NoteReaction {
|
||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the NoteReaction.',
|
comment: "The created date of the NoteReaction.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@ -26,8 +26,8 @@ export class NoteReaction {
|
|||||||
@Column(id())
|
@Column(id())
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user?: User | null;
|
public user?: User | null;
|
||||||
@ -36,15 +36,15 @@ export class NoteReaction {
|
|||||||
@Column(id())
|
@Column(id())
|
||||||
public noteId: Note["id"];
|
public noteId: Note["id"];
|
||||||
|
|
||||||
@ManyToOne(type => Note, {
|
@ManyToOne((type) => Note, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public note?: Note | null;
|
public note?: Note | null;
|
||||||
|
|
||||||
// TODO: 対象noteのuserIdを非正規化したい(「受け取ったリアクション一覧」のようなものを(JOIN無しで)実装したいため)
|
// TODO: 対象noteのuserIdを非正規化したい(「受け取ったリアクション一覧」のようなものを(JOIN無しで)実装したいため)
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 260,
|
length: 260,
|
||||||
})
|
})
|
||||||
public reaction: string;
|
public reaction: string;
|
||||||
|
@ -11,13 +11,12 @@ import { Note } from "./note.js";
|
|||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['userId', 'threadId'], { unique: true })
|
@Index(["userId", "threadId"], { unique: true })
|
||||||
export class NoteThreadMuting {
|
export class NoteThreadMuting {
|
||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {})
|
||||||
})
|
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@ -26,14 +25,14 @@ export class NoteThreadMuting {
|
|||||||
})
|
})
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 256,
|
length: 256,
|
||||||
})
|
})
|
||||||
public threadId: string;
|
public threadId: string;
|
||||||
|
@ -12,7 +12,7 @@ import { id } from "../id.js";
|
|||||||
import type { Channel } from "./channel.js";
|
import type { Channel } from "./channel.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['userId', 'noteId'], { unique: true })
|
@Index(["userId", "noteId"], { unique: true })
|
||||||
export class NoteUnread {
|
export class NoteUnread {
|
||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
@ -21,8 +21,8 @@ export class NoteUnread {
|
|||||||
@Column(id())
|
@Column(id())
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
@ -31,8 +31,8 @@ export class NoteUnread {
|
|||||||
@Column(id())
|
@Column(id())
|
||||||
public noteId: Note["id"];
|
public noteId: Note["id"];
|
||||||
|
|
||||||
@ManyToOne(type => Note, {
|
@ManyToOne((type) => Note, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public note: Note | null;
|
public note: Note | null;
|
||||||
@ -41,21 +41,21 @@ export class NoteUnread {
|
|||||||
* メンションか否か
|
* メンションか否か
|
||||||
*/
|
*/
|
||||||
@Index()
|
@Index()
|
||||||
@Column('boolean')
|
@Column("boolean")
|
||||||
public isMentioned: boolean;
|
public isMentioned: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ダイレクト投稿か否か
|
* ダイレクト投稿か否か
|
||||||
*/
|
*/
|
||||||
@Index()
|
@Index()
|
||||||
@Column('boolean')
|
@Column("boolean")
|
||||||
public isSpecified: boolean;
|
public isSpecified: boolean;
|
||||||
|
|
||||||
//#region Denormalized fields
|
//#region Denormalized fields
|
||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: '[Denormalized]',
|
comment: "[Denormalized]",
|
||||||
})
|
})
|
||||||
public noteUserId: User["id"];
|
public noteUserId: User["id"];
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ export class NoteUnread {
|
|||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: '[Denormalized]',
|
comment: "[Denormalized]",
|
||||||
})
|
})
|
||||||
public noteChannelId: Channel["id"] | null;
|
public noteChannelId: Channel["id"] | null;
|
||||||
//#endregion
|
//#endregion
|
||||||
|
@ -11,26 +11,26 @@ import { Note } from "./note.js";
|
|||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['userId', 'noteId'], { unique: true })
|
@Index(["userId", "noteId"], { unique: true })
|
||||||
export class NoteWatching {
|
export class NoteWatching {
|
||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the NoteWatching.',
|
comment: "The created date of the NoteWatching.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The watcher ID.',
|
comment: "The watcher ID.",
|
||||||
})
|
})
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
@ -38,12 +38,12 @@ export class NoteWatching {
|
|||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The target Note ID.',
|
comment: "The target Note ID.",
|
||||||
})
|
})
|
||||||
public noteId: Note["id"];
|
public noteId: Note["id"];
|
||||||
|
|
||||||
@ManyToOne(type => Note, {
|
@ManyToOne((type) => Note, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public note: Note | null;
|
public note: Note | null;
|
||||||
@ -52,7 +52,7 @@ export class NoteWatching {
|
|||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: '[Denormalized]',
|
comment: "[Denormalized]",
|
||||||
})
|
})
|
||||||
public noteUserId: Note["userId"];
|
public noteUserId: Note["userId"];
|
||||||
//#endregion
|
//#endregion
|
||||||
|
@ -13,16 +13,16 @@ import { noteVisibilities } from "../../types.js";
|
|||||||
import { Channel } from "./channel.js";
|
import { Channel } from "./channel.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index('IDX_NOTE_TAGS', { synchronize: false })
|
@Index("IDX_NOTE_TAGS", { synchronize: false })
|
||||||
@Index('IDX_NOTE_MENTIONS', { synchronize: false })
|
@Index("IDX_NOTE_MENTIONS", { synchronize: false })
|
||||||
@Index('IDX_NOTE_VISIBLE_USER_IDS', { synchronize: false })
|
@Index("IDX_NOTE_VISIBLE_USER_IDS", { synchronize: false })
|
||||||
export class Note {
|
export class Note {
|
||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the Note.',
|
comment: "The created date of the Note.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@ -30,12 +30,12 @@ export class Note {
|
|||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: 'The ID of reply target.',
|
comment: "The ID of reply target.",
|
||||||
})
|
})
|
||||||
public replyId: Note["id"] | null;
|
public replyId: Note["id"] | null;
|
||||||
|
|
||||||
@ManyToOne(type => Note, {
|
@ManyToOne((type) => Note, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public reply: Note | null;
|
public reply: Note | null;
|
||||||
@ -44,66 +44,69 @@ export class Note {
|
|||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: 'The ID of renote target.',
|
comment: "The ID of renote target.",
|
||||||
})
|
})
|
||||||
public renoteId: Note["id"] | null;
|
public renoteId: Note["id"] | null;
|
||||||
|
|
||||||
@ManyToOne(type => Note, {
|
@ManyToOne((type) => Note, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public renote: Note | null;
|
public renote: Note | null;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 256, nullable: true,
|
length: 256,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public threadId: string | null;
|
public threadId: string | null;
|
||||||
|
|
||||||
@Column('text', {
|
@Column("text", {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public text: string | null;
|
public text: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 256, nullable: true,
|
length: 256,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public name: string | null;
|
public name: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512, nullable: true,
|
length: 512,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public cw: string | null;
|
public cw: string | null;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The ID of author.',
|
comment: "The ID of author.",
|
||||||
})
|
})
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public localOnly: boolean;
|
public localOnly: boolean;
|
||||||
|
|
||||||
@Column('smallint', {
|
@Column("smallint", {
|
||||||
default: 0,
|
default: 0,
|
||||||
})
|
})
|
||||||
public renoteCount: number;
|
public renoteCount: number;
|
||||||
|
|
||||||
@Column('smallint', {
|
@Column("smallint", {
|
||||||
default: 0,
|
default: 0,
|
||||||
})
|
})
|
||||||
public repliesCount: number;
|
public repliesCount: number;
|
||||||
|
|
||||||
@Column('jsonb', {
|
@Column("jsonb", {
|
||||||
default: {},
|
default: {},
|
||||||
})
|
})
|
||||||
public reactions: Record<string, number>;
|
public reactions: Record<string, number>;
|
||||||
@ -115,71 +118,84 @@ export class Note {
|
|||||||
* followers ... フォロワーのみ
|
* followers ... フォロワーのみ
|
||||||
* specified ... visibleUserIds で指定したユーザーのみ
|
* specified ... visibleUserIds で指定したユーザーのみ
|
||||||
*/
|
*/
|
||||||
@Column('enum', { enum: noteVisibilities })
|
@Column("enum", { enum: noteVisibilities })
|
||||||
public visibility: typeof noteVisibilities[number];
|
public visibility: typeof noteVisibilities[number];
|
||||||
|
|
||||||
@Index({ unique: true })
|
@Index({ unique: true })
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512, nullable: true,
|
length: 512,
|
||||||
comment: 'The URI of a note. it will be null when the note is local.',
|
nullable: true,
|
||||||
|
comment: "The URI of a note. it will be null when the note is local.",
|
||||||
})
|
})
|
||||||
public uri: string | null;
|
public uri: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512, nullable: true,
|
length: 512,
|
||||||
comment: 'The human readable url of a note. it will be null when the note is local.',
|
nullable: true,
|
||||||
|
comment:
|
||||||
|
"The human readable url of a note. it will be null when the note is local.",
|
||||||
})
|
})
|
||||||
public url: string | null;
|
public url: string | null;
|
||||||
|
|
||||||
@Column('integer', {
|
@Column("integer", {
|
||||||
default: 0, select: false,
|
default: 0,
|
||||||
|
select: false,
|
||||||
})
|
})
|
||||||
public score: number;
|
public score: number;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
array: true, default: '{}',
|
array: true,
|
||||||
|
default: "{}",
|
||||||
})
|
})
|
||||||
public fileIds: DriveFile["id"][];
|
public fileIds: DriveFile["id"][];
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 256, array: true, default: '{}',
|
length: 256,
|
||||||
|
array: true,
|
||||||
|
default: "{}",
|
||||||
})
|
})
|
||||||
public attachedFileTypes: string[];
|
public attachedFileTypes: string[];
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
array: true, default: '{}',
|
array: true,
|
||||||
|
default: "{}",
|
||||||
})
|
})
|
||||||
public visibleUserIds: User["id"][];
|
public visibleUserIds: User["id"][];
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
array: true, default: '{}',
|
array: true,
|
||||||
|
default: "{}",
|
||||||
})
|
})
|
||||||
public mentions: User["id"][];
|
public mentions: User["id"][];
|
||||||
|
|
||||||
@Column('text', {
|
@Column("text", {
|
||||||
default: '[]',
|
default: "[]",
|
||||||
})
|
})
|
||||||
public mentionedRemoteUsers: string;
|
public mentionedRemoteUsers: string;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, array: true, default: '{}',
|
length: 128,
|
||||||
|
array: true,
|
||||||
|
default: "{}",
|
||||||
})
|
})
|
||||||
public emojis: string[];
|
public emojis: string[];
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, array: true, default: '{}',
|
length: 128,
|
||||||
|
array: true,
|
||||||
|
default: "{}",
|
||||||
})
|
})
|
||||||
public tags: string[];
|
public tags: string[];
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public hasPoll: boolean;
|
public hasPoll: boolean;
|
||||||
@ -188,53 +204,56 @@ export class Note {
|
|||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: 'The ID of source channel.',
|
comment: "The ID of source channel.",
|
||||||
})
|
})
|
||||||
public channelId: Channel["id"] | null;
|
public channelId: Channel["id"] | null;
|
||||||
|
|
||||||
@ManyToOne(type => Channel, {
|
@ManyToOne((type) => Channel, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public channel: Channel | null;
|
public channel: Channel | null;
|
||||||
|
|
||||||
//#region Denormalized fields
|
//#region Denormalized fields
|
||||||
@Index()
|
@Index()
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, nullable: true,
|
length: 128,
|
||||||
comment: '[Denormalized]',
|
nullable: true,
|
||||||
|
comment: "[Denormalized]",
|
||||||
})
|
})
|
||||||
public userHost: string | null;
|
public userHost: string | null;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: '[Denormalized]',
|
comment: "[Denormalized]",
|
||||||
})
|
})
|
||||||
public replyUserId: User["id"] | null;
|
public replyUserId: User["id"] | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, nullable: true,
|
length: 128,
|
||||||
comment: '[Denormalized]',
|
nullable: true,
|
||||||
|
comment: "[Denormalized]",
|
||||||
})
|
})
|
||||||
public replyUserHost: string | null;
|
public replyUserHost: string | null;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: '[Denormalized]',
|
comment: "[Denormalized]",
|
||||||
})
|
})
|
||||||
public renoteUserId: User["id"] | null;
|
public renoteUserId: User["id"] | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, nullable: true,
|
length: 128,
|
||||||
comment: '[Denormalized]',
|
nullable: true,
|
||||||
|
comment: "[Denormalized]",
|
||||||
})
|
})
|
||||||
public renoteUserHost: string | null;
|
public renoteUserHost: string | null;
|
||||||
|
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: 'The updated date of the Note.',
|
comment: "The updated date of the Note.",
|
||||||
})
|
})
|
||||||
public updatedAt: Date;
|
public updatedAt: Date;
|
||||||
//#endregion
|
//#endregion
|
||||||
|
@ -20,8 +20,8 @@ export class Notification {
|
|||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the Notification.',
|
comment: "The created date of the Notification.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@ -31,12 +31,12 @@ export class Notification {
|
|||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The ID of recipient user of the Notification.',
|
comment: "The ID of recipient user of the Notification.",
|
||||||
})
|
})
|
||||||
public notifieeId: User["id"];
|
public notifieeId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public notifiee: User | null;
|
public notifiee: User | null;
|
||||||
@ -48,12 +48,12 @@ export class Notification {
|
|||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
nullable: true,
|
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;
|
public notifierId: User["id"] | null;
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public notifier: User | null;
|
public notifier: User | null;
|
||||||
@ -74,9 +74,9 @@ export class Notification {
|
|||||||
* app - App notifications.
|
* app - App notifications.
|
||||||
*/
|
*/
|
||||||
@Index()
|
@Index()
|
||||||
@Column('enum', {
|
@Column("enum", {
|
||||||
enum: notificationTypes,
|
enum: notificationTypes,
|
||||||
comment: 'The type of the Notification.',
|
comment: "The type of the Notification.",
|
||||||
})
|
})
|
||||||
public type: typeof notificationTypes[number];
|
public type: typeof notificationTypes[number];
|
||||||
|
|
||||||
@ -84,9 +84,9 @@ export class Notification {
|
|||||||
* Whether the notification was read.
|
* Whether the notification was read.
|
||||||
*/
|
*/
|
||||||
@Index()
|
@Index()
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
comment: 'Whether the notification was read.',
|
comment: "Whether the notification was read.",
|
||||||
})
|
})
|
||||||
public isRead: boolean;
|
public isRead: boolean;
|
||||||
|
|
||||||
@ -96,8 +96,8 @@ export class Notification {
|
|||||||
})
|
})
|
||||||
public noteId: Note["id"] | null;
|
public noteId: Note["id"] | null;
|
||||||
|
|
||||||
@ManyToOne(type => Note, {
|
@ManyToOne((type) => Note, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public note: Note | null;
|
public note: Note | null;
|
||||||
@ -108,8 +108,8 @@ export class Notification {
|
|||||||
})
|
})
|
||||||
public followRequestId: FollowRequest["id"] | null;
|
public followRequestId: FollowRequest["id"] | null;
|
||||||
|
|
||||||
@ManyToOne(type => FollowRequest, {
|
@ManyToOne((type) => FollowRequest, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public followRequest: FollowRequest | null;
|
public followRequest: FollowRequest | null;
|
||||||
@ -120,18 +120,19 @@ export class Notification {
|
|||||||
})
|
})
|
||||||
public userGroupInvitationId: UserGroupInvitation["id"] | null;
|
public userGroupInvitationId: UserGroupInvitation["id"] | null;
|
||||||
|
|
||||||
@ManyToOne(type => UserGroupInvitation, {
|
@ManyToOne((type) => UserGroupInvitation, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public userGroupInvitation: UserGroupInvitation | null;
|
public userGroupInvitation: UserGroupInvitation | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, nullable: true,
|
length: 128,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public reaction: string | null;
|
public reaction: string | null;
|
||||||
|
|
||||||
@Column('integer', {
|
@Column("integer", {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public choice: number | null;
|
public choice: number | null;
|
||||||
@ -139,8 +140,9 @@ export class Notification {
|
|||||||
/**
|
/**
|
||||||
* App notification body
|
* App notification body
|
||||||
*/
|
*/
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 2048, nullable: true,
|
length: 2048,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public customBody: string | null;
|
public customBody: string | null;
|
||||||
|
|
||||||
@ -148,8 +150,9 @@ export class Notification {
|
|||||||
* App notification header
|
* App notification header
|
||||||
* (If omitted, it is expected to be displayed with the app name)
|
* (If omitted, it is expected to be displayed with the app name)
|
||||||
*/
|
*/
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 256, nullable: true,
|
length: 256,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public customHeader: string | null;
|
public customHeader: string | null;
|
||||||
|
|
||||||
@ -157,8 +160,9 @@ export class Notification {
|
|||||||
* App notification icon (URL)
|
* App notification icon (URL)
|
||||||
* (If omitted, it is expected to be displayed as an app icon)
|
* (If omitted, it is expected to be displayed as an app icon)
|
||||||
*/
|
*/
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 1024, nullable: true,
|
length: 1024,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public customIcon: string | null;
|
public customIcon: string | null;
|
||||||
|
|
||||||
@ -172,8 +176,8 @@ export class Notification {
|
|||||||
})
|
})
|
||||||
public appAccessTokenId: AccessToken["id"] | null;
|
public appAccessTokenId: AccessToken["id"] | null;
|
||||||
|
|
||||||
@ManyToOne(type => AccessToken, {
|
@ManyToOne((type) => AccessToken, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public appAccessToken: AccessToken | null;
|
public appAccessToken: AccessToken | null;
|
||||||
|
@ -11,20 +11,20 @@ import { id } from "../id.js";
|
|||||||
import { Page } from "./page.js";
|
import { Page } from "./page.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['userId', 'pageId'], { unique: true })
|
@Index(["userId", "pageId"], { unique: true })
|
||||||
export class PageLike {
|
export class PageLike {
|
||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Column('timestamp with time zone')
|
@Column("timestamp with time zone")
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column(id())
|
@Column(id())
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
@ -32,8 +32,8 @@ export class PageLike {
|
|||||||
@Column(id())
|
@Column(id())
|
||||||
public pageId: Page["id"];
|
public pageId: Page["id"];
|
||||||
|
|
||||||
@ManyToOne(type => Page, {
|
@ManyToOne((type) => Page, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public page: Page | null;
|
public page: Page | null;
|
||||||
|
@ -11,51 +11,52 @@ import { id } from "../id.js";
|
|||||||
import { DriveFile } from "./drive-file.js";
|
import { DriveFile } from "./drive-file.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['userId', 'name'], { unique: true })
|
@Index(["userId", "name"], { unique: true })
|
||||||
export class Page {
|
export class Page {
|
||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the Page.',
|
comment: "The created date of the Page.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The updated date of the Page.',
|
comment: "The updated date of the Page.",
|
||||||
})
|
})
|
||||||
public updatedAt: Date;
|
public updatedAt: Date;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 256,
|
length: 256,
|
||||||
})
|
})
|
||||||
public title: string;
|
public title: string;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 256,
|
length: 256,
|
||||||
})
|
})
|
||||||
public name: string;
|
public name: string;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 256, nullable: true,
|
length: 256,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public summary: string | null;
|
public summary: string | null;
|
||||||
|
|
||||||
@Column('boolean')
|
@Column("boolean")
|
||||||
public alignCenter: boolean;
|
public alignCenter: boolean;
|
||||||
|
|
||||||
@Column('boolean')
|
@Column("boolean")
|
||||||
public isPublic: boolean;
|
public isPublic: boolean;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public hideTitleWhenPinned: boolean;
|
public hideTitleWhenPinned: boolean;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 32,
|
length: 32,
|
||||||
})
|
})
|
||||||
public font: string;
|
public font: string;
|
||||||
@ -63,12 +64,12 @@ export class Page {
|
|||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The ID of author.',
|
comment: "The ID of author.",
|
||||||
})
|
})
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
@ -79,25 +80,25 @@ export class Page {
|
|||||||
})
|
})
|
||||||
public eyeCatchingImageId: DriveFile["id"] | null;
|
public eyeCatchingImageId: DriveFile["id"] | null;
|
||||||
|
|
||||||
@ManyToOne(type => DriveFile, {
|
@ManyToOne((type) => DriveFile, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public eyeCatchingImage: DriveFile | null;
|
public eyeCatchingImage: DriveFile | null;
|
||||||
|
|
||||||
@Column('jsonb', {
|
@Column("jsonb", {
|
||||||
default: [],
|
default: [],
|
||||||
})
|
})
|
||||||
public content: Record<string, any>[];
|
public content: Record<string, any>[];
|
||||||
|
|
||||||
@Column('jsonb', {
|
@Column("jsonb", {
|
||||||
default: [],
|
default: [],
|
||||||
})
|
})
|
||||||
public variables: Record<string, any>[];
|
public variables: Record<string, any>[];
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 16384,
|
length: 16384,
|
||||||
default: '',
|
default: "",
|
||||||
})
|
})
|
||||||
public script: string;
|
public script: string;
|
||||||
|
|
||||||
@ -106,17 +107,18 @@ export class Page {
|
|||||||
* followers ... フォロワーのみ
|
* followers ... フォロワーのみ
|
||||||
* specified ... visibleUserIds で指定したユーザーのみ
|
* specified ... visibleUserIds で指定したユーザーのみ
|
||||||
*/
|
*/
|
||||||
@Column('enum', { enum: ['public', 'followers', 'specified'] })
|
@Column("enum", { enum: ["public", "followers", "specified"] })
|
||||||
public visibility: "public" | "followers" | "specified";
|
public visibility: "public" | "followers" | "specified";
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
array: true, default: '{}',
|
array: true,
|
||||||
|
default: "{}",
|
||||||
})
|
})
|
||||||
public visibleUserIds: User["id"][];
|
public visibleUserIds: User["id"][];
|
||||||
|
|
||||||
@Column('integer', {
|
@Column("integer", {
|
||||||
default: 0,
|
default: 0,
|
||||||
})
|
})
|
||||||
public likedCount: number;
|
public likedCount: number;
|
||||||
|
@ -14,11 +14,11 @@ export class PasswordResetRequest {
|
|||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Column('timestamp with time zone')
|
@Column("timestamp with time zone")
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@Index({ unique: true })
|
@Index({ unique: true })
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 256,
|
length: 256,
|
||||||
})
|
})
|
||||||
public token: string;
|
public token: string;
|
||||||
@ -29,8 +29,8 @@ export class PasswordResetRequest {
|
|||||||
})
|
})
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
|
@ -11,14 +11,14 @@ import { Note } from "./note.js";
|
|||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['userId', 'noteId', 'choice'], { unique: true })
|
@Index(["userId", "noteId", "choice"], { unique: true })
|
||||||
export class PollVote {
|
export class PollVote {
|
||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the PollVote.',
|
comment: "The created date of the PollVote.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@ -26,8 +26,8 @@ export class PollVote {
|
|||||||
@Column(id())
|
@Column(id())
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
@ -36,12 +36,12 @@ export class PollVote {
|
|||||||
@Column(id())
|
@Column(id())
|
||||||
public noteId: Note["id"];
|
public noteId: Note["id"];
|
||||||
|
|
||||||
@ManyToOne(type => Note, {
|
@ManyToOne((type) => Note, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public note: Note | null;
|
public note: Note | null;
|
||||||
|
|
||||||
@Column('integer')
|
@Column("integer")
|
||||||
public choice: number;
|
public choice: number;
|
||||||
}
|
}
|
||||||
|
@ -16,48 +16,51 @@ export class Poll {
|
|||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public noteId: Note["id"];
|
public noteId: Note["id"];
|
||||||
|
|
||||||
@OneToOne(type => Note, {
|
@OneToOne((type) => Note, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public note: Note | null;
|
public note: Note | null;
|
||||||
|
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public expiresAt: Date | null;
|
public expiresAt: Date | null;
|
||||||
|
|
||||||
@Column('boolean')
|
@Column("boolean")
|
||||||
public multiple: boolean;
|
public multiple: boolean;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 256, array: true, default: '{}',
|
length: 256,
|
||||||
|
array: true,
|
||||||
|
default: "{}",
|
||||||
})
|
})
|
||||||
public choices: string[];
|
public choices: string[];
|
||||||
|
|
||||||
@Column('integer', {
|
@Column("integer", {
|
||||||
array: true,
|
array: true,
|
||||||
})
|
})
|
||||||
public votes: number[];
|
public votes: number[];
|
||||||
|
|
||||||
//#region Denormalized fields
|
//#region Denormalized fields
|
||||||
@Column('enum', {
|
@Column("enum", {
|
||||||
enum: noteVisibilities,
|
enum: noteVisibilities,
|
||||||
comment: '[Denormalized]',
|
comment: "[Denormalized]",
|
||||||
})
|
})
|
||||||
public noteVisibility: typeof noteVisibilities[number];
|
public noteVisibility: typeof noteVisibilities[number];
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: '[Denormalized]',
|
comment: "[Denormalized]",
|
||||||
})
|
})
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, nullable: true,
|
length: 128,
|
||||||
comment: '[Denormalized]',
|
nullable: true,
|
||||||
|
comment: "[Denormalized]",
|
||||||
})
|
})
|
||||||
public userHost: string | null;
|
public userHost: string | null;
|
||||||
//#endregion
|
//#endregion
|
||||||
|
@ -15,20 +15,20 @@ export class PromoNote {
|
|||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public noteId: Note["id"];
|
public noteId: Note["id"];
|
||||||
|
|
||||||
@OneToOne(type => Note, {
|
@OneToOne((type) => Note, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public note: Note | null;
|
public note: Note | null;
|
||||||
|
|
||||||
@Column('timestamp with time zone')
|
@Column("timestamp with time zone")
|
||||||
public expiresAt: Date;
|
public expiresAt: Date;
|
||||||
|
|
||||||
//#region Denormalized fields
|
//#region Denormalized fields
|
||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: '[Denormalized]',
|
comment: "[Denormalized]",
|
||||||
})
|
})
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
//#endregion
|
//#endregion
|
||||||
|
@ -11,13 +11,13 @@ import { User } from "./user.js";
|
|||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['userId', 'noteId'], { unique: true })
|
@Index(["userId", "noteId"], { unique: true })
|
||||||
export class PromoRead {
|
export class PromoRead {
|
||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the PromoRead.',
|
comment: "The created date of the PromoRead.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@ -25,8 +25,8 @@ export class PromoRead {
|
|||||||
@Column(id())
|
@Column(id())
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
@ -34,8 +34,8 @@ export class PromoRead {
|
|||||||
@Column(id())
|
@Column(id())
|
||||||
public noteId: Note["id"];
|
public noteId: Note["id"];
|
||||||
|
|
||||||
@ManyToOne(type => Note, {
|
@ManyToOne((type) => Note, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public note: Note | null;
|
public note: Note | null;
|
||||||
|
@ -6,11 +6,11 @@ export class RegistrationTicket {
|
|||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Column('timestamp with time zone')
|
@Column("timestamp with time zone")
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@Index({ unique: true })
|
@Index({ unique: true })
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 64,
|
length: 64,
|
||||||
})
|
})
|
||||||
public code: string;
|
public code: string;
|
||||||
|
@ -15,51 +15,55 @@ export class RegistryItem {
|
|||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the RegistryItem.',
|
comment: "The created date of the RegistryItem.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The updated date of the RegistryItem.',
|
comment: "The updated date of the RegistryItem.",
|
||||||
})
|
})
|
||||||
public updatedAt: Date;
|
public updatedAt: Date;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The owner ID.',
|
comment: "The owner ID.",
|
||||||
})
|
})
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 1024,
|
length: 1024,
|
||||||
comment: 'The key of the RegistryItem.',
|
comment: "The key of the RegistryItem.",
|
||||||
})
|
})
|
||||||
public key: string;
|
public key: string;
|
||||||
|
|
||||||
@Column('jsonb', {
|
@Column("jsonb", {
|
||||||
default: {}, nullable: true,
|
default: {},
|
||||||
comment: 'The value of the RegistryItem.',
|
nullable: true,
|
||||||
|
comment: "The value of the RegistryItem.",
|
||||||
})
|
})
|
||||||
public value: any | null;
|
public value: any | null;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 1024, array: true, default: '{}',
|
length: 1024,
|
||||||
|
array: true,
|
||||||
|
default: "{}",
|
||||||
})
|
})
|
||||||
public scope: string[];
|
public scope: string[];
|
||||||
|
|
||||||
// サードパーティアプリに開放するときのためのカラム
|
// サードパーティアプリに開放するときのためのカラム
|
||||||
@Index()
|
@Index()
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512, nullable: true,
|
length: 512,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public domain: string | null;
|
public domain: string | null;
|
||||||
}
|
}
|
||||||
|
@ -7,13 +7,14 @@ export class Relay {
|
|||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Index({ unique: true })
|
@Index({ unique: true })
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512, nullable: false,
|
length: 512,
|
||||||
|
nullable: false,
|
||||||
})
|
})
|
||||||
public inbox: string;
|
public inbox: string;
|
||||||
|
|
||||||
@Column('enum', {
|
@Column("enum", {
|
||||||
enum: ['requesting', 'accepted', 'rejected'],
|
enum: ["requesting", "accepted", "rejected"],
|
||||||
})
|
})
|
||||||
public status: "requesting" | "accepted" | "rejected";
|
public status: "requesting" | "accepted" | "rejected";
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ export class RenoteMuting {
|
|||||||
})
|
})
|
||||||
public muteeId: User["id"];
|
public muteeId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: "CASCADE",
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
@ -41,7 +41,7 @@ export class RenoteMuting {
|
|||||||
})
|
})
|
||||||
public muterId: User["id"];
|
public muterId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: "CASCADE",
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
|
@ -14,8 +14,8 @@ export class Signin {
|
|||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the Signin.',
|
comment: "The created date of the Signin.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@ -23,20 +23,20 @@ export class Signin {
|
|||||||
@Column(id())
|
@Column(id())
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
})
|
})
|
||||||
public ip: string;
|
public ip: string;
|
||||||
|
|
||||||
@Column('jsonb')
|
@Column("jsonb")
|
||||||
public headers: Record<string, any>;
|
public headers: Record<string, any>;
|
||||||
|
|
||||||
@Column('boolean')
|
@Column("boolean")
|
||||||
public success: boolean;
|
public success: boolean;
|
||||||
}
|
}
|
||||||
|
@ -14,35 +14,35 @@ export class SwSubscription {
|
|||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Column('timestamp with time zone')
|
@Column("timestamp with time zone")
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column(id())
|
@Column(id())
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512,
|
length: 512,
|
||||||
})
|
})
|
||||||
public endpoint: string;
|
public endpoint: string;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 256,
|
length: 256,
|
||||||
})
|
})
|
||||||
public auth: string;
|
public auth: string;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
})
|
})
|
||||||
public publickey: string;
|
public publickey: string;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public sendReadMessage: boolean;
|
public sendReadMessage: boolean;
|
||||||
|
@ -2,12 +2,12 @@ import { PrimaryColumn, Entity, Column } from "typeorm";
|
|||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class UsedUsername {
|
export class UsedUsername {
|
||||||
@PrimaryColumn('varchar', {
|
@PrimaryColumn("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
})
|
})
|
||||||
public username: string;
|
public username: string;
|
||||||
|
|
||||||
@Column('timestamp with time zone')
|
@Column("timestamp with time zone")
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
constructor(data: Partial<UsedUsername>) {
|
constructor(data: Partial<UsedUsername>) {
|
||||||
|
@ -11,25 +11,25 @@ import { UserGroup } from "./user-group.js";
|
|||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['userId', 'userGroupId'], { unique: true })
|
@Index(["userId", "userGroupId"], { unique: true })
|
||||||
export class UserGroupInvitation {
|
export class UserGroupInvitation {
|
||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the UserGroupInvitation.',
|
comment: "The created date of the UserGroupInvitation.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The user ID.',
|
comment: "The user ID.",
|
||||||
})
|
})
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
@ -37,12 +37,12 @@ export class UserGroupInvitation {
|
|||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The group ID.',
|
comment: "The group ID.",
|
||||||
})
|
})
|
||||||
public userGroupId: UserGroup["id"];
|
public userGroupId: UserGroup["id"];
|
||||||
|
|
||||||
@ManyToOne(type => UserGroup, {
|
@ManyToOne((type) => UserGroup, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public userGroup: UserGroup | null;
|
public userGroup: UserGroup | null;
|
||||||
|
@ -11,25 +11,25 @@ import { UserGroup } from "./user-group.js";
|
|||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['userId', 'userGroupId'], { unique: true })
|
@Index(["userId", "userGroupId"], { unique: true })
|
||||||
export class UserGroupJoining {
|
export class UserGroupJoining {
|
||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the UserGroupJoining.',
|
comment: "The created date of the UserGroupJoining.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The user ID.',
|
comment: "The user ID.",
|
||||||
})
|
})
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
@ -37,12 +37,12 @@ export class UserGroupJoining {
|
|||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The group ID.',
|
comment: "The group ID.",
|
||||||
})
|
})
|
||||||
public userGroupId: UserGroup["id"];
|
public userGroupId: UserGroup["id"];
|
||||||
|
|
||||||
@ManyToOne(type => UserGroup, {
|
@ManyToOne((type) => UserGroup, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public userGroup: UserGroup | null;
|
public userGroup: UserGroup | null;
|
||||||
|
@ -15,12 +15,12 @@ export class UserGroup {
|
|||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the UserGroup.',
|
comment: "The created date of the UserGroup.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 256,
|
length: 256,
|
||||||
})
|
})
|
||||||
public name: string;
|
public name: string;
|
||||||
@ -28,17 +28,17 @@ export class UserGroup {
|
|||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The ID of owner.',
|
comment: "The ID of owner.",
|
||||||
})
|
})
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public isPrivate: boolean;
|
public isPrivate: boolean;
|
||||||
|
@ -12,20 +12,19 @@ import { Note } from "./note.js";
|
|||||||
import type { User } from "./user.js";
|
import type { User } from "./user.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['userId', 'ip'], { unique: true })
|
@Index(["userId", "ip"], { unique: true })
|
||||||
export class UserIp {
|
export class UserIp {
|
||||||
@PrimaryGeneratedColumn()
|
@PrimaryGeneratedColumn()
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {})
|
||||||
})
|
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column(id())
|
@Column(id())
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
})
|
})
|
||||||
public ip: string;
|
public ip: string;
|
||||||
|
@ -7,18 +7,18 @@ export class UserKeypair {
|
|||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@OneToOne(type => User, {
|
@OneToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 4096,
|
length: 4096,
|
||||||
})
|
})
|
||||||
public publicKey: string;
|
public publicKey: string;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 4096,
|
length: 4096,
|
||||||
})
|
})
|
||||||
public privateKey: string;
|
public privateKey: string;
|
||||||
|
@ -11,25 +11,25 @@ import { UserList } from "./user-list.js";
|
|||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['userId', 'userListId'], { unique: true })
|
@Index(["userId", "userListId"], { unique: true })
|
||||||
export class UserListJoining {
|
export class UserListJoining {
|
||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the UserListJoining.',
|
comment: "The created date of the UserListJoining.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The user ID.',
|
comment: "The user ID.",
|
||||||
})
|
})
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
@ -37,12 +37,12 @@ export class UserListJoining {
|
|||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The list ID.',
|
comment: "The list ID.",
|
||||||
})
|
})
|
||||||
public userListId: UserList["id"];
|
public userListId: UserList["id"];
|
||||||
|
|
||||||
@ManyToOne(type => UserList, {
|
@ManyToOne((type) => UserList, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public userList: UserList | null;
|
public userList: UserList | null;
|
||||||
|
@ -14,27 +14,27 @@ export class UserList {
|
|||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the UserList.',
|
comment: "The created date of the UserList.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The owner ID.',
|
comment: "The owner ID.",
|
||||||
})
|
})
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
comment: 'The name of the UserList.',
|
comment: "The name of the UserList.",
|
||||||
})
|
})
|
||||||
public name: string;
|
public name: string;
|
||||||
}
|
}
|
||||||
|
@ -11,13 +11,13 @@ import { User } from "./user.js";
|
|||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['userId', 'noteId'], { unique: true })
|
@Index(["userId", "noteId"], { unique: true })
|
||||||
export class UserNotePining {
|
export class UserNotePining {
|
||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the UserNotePinings.',
|
comment: "The created date of the UserNotePinings.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@ -25,8 +25,8 @@ export class UserNotePining {
|
|||||||
@Column(id())
|
@Column(id())
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
@ -34,8 +34,8 @@ export class UserNotePining {
|
|||||||
@Column(id())
|
@Column(id())
|
||||||
public noteId: Note["id"];
|
public noteId: Note["id"];
|
||||||
|
|
||||||
@ManyToOne(type => Note, {
|
@ManyToOne((type) => Note, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public note: Note | null;
|
public note: Note | null;
|
||||||
|
@ -6,26 +6,26 @@ export class UserPending {
|
|||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Column('timestamp with time zone')
|
@Column("timestamp with time zone")
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@Index({ unique: true })
|
@Index({ unique: true })
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
})
|
})
|
||||||
public code: string;
|
public code: string;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
})
|
})
|
||||||
public username: string;
|
public username: string;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
})
|
})
|
||||||
public email: string;
|
public email: string;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
})
|
})
|
||||||
public password: string;
|
public password: string;
|
||||||
|
@ -18,31 +18,34 @@ export class UserProfile {
|
|||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@OneToOne(type => User, {
|
@OneToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, nullable: true,
|
length: 128,
|
||||||
comment: 'The location of the User.',
|
nullable: true,
|
||||||
|
comment: "The location of the User.",
|
||||||
})
|
})
|
||||||
public location: string | null;
|
public location: string | null;
|
||||||
|
|
||||||
@Column('char', {
|
@Column("char", {
|
||||||
length: 10, nullable: true,
|
length: 10,
|
||||||
comment: 'The birthday (YYYY-MM-DD) of the User.',
|
nullable: true,
|
||||||
|
comment: "The birthday (YYYY-MM-DD) of the User.",
|
||||||
})
|
})
|
||||||
public birthday: string | null;
|
public birthday: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 2048, nullable: true,
|
length: 2048,
|
||||||
comment: 'The description (bio) of the User.',
|
nullable: true,
|
||||||
|
comment: "The description (bio) of the User.",
|
||||||
})
|
})
|
||||||
public description: string | null;
|
public description: string | null;
|
||||||
|
|
||||||
@Column('jsonb', {
|
@Column("jsonb", {
|
||||||
default: [],
|
default: [],
|
||||||
})
|
})
|
||||||
public fields: {
|
public fields: {
|
||||||
@ -50,136 +53,145 @@ export class UserProfile {
|
|||||||
value: string;
|
value: string;
|
||||||
}[];
|
}[];
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 32, nullable: true,
|
length: 32,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public lang: string | null;
|
public lang: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512, nullable: true,
|
length: 512,
|
||||||
comment: 'Remote URL of the user.',
|
nullable: true,
|
||||||
|
comment: "Remote URL of the user.",
|
||||||
})
|
})
|
||||||
public url: string | null;
|
public url: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, nullable: true,
|
length: 128,
|
||||||
comment: 'The email address of the User.',
|
nullable: true,
|
||||||
|
comment: "The email address of the User.",
|
||||||
})
|
})
|
||||||
public email: string | null;
|
public email: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, nullable: true,
|
length: 128,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public emailVerifyCode: string | null;
|
public emailVerifyCode: string | null;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public emailVerified: boolean;
|
public emailVerified: boolean;
|
||||||
|
|
||||||
@Column('jsonb', {
|
@Column("jsonb", {
|
||||||
default: ['follow', 'receiveFollowRequest', 'groupInvited'],
|
default: ["follow", "receiveFollowRequest", "groupInvited"],
|
||||||
})
|
})
|
||||||
public emailNotificationTypes: string[];
|
public emailNotificationTypes: string[];
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public publicReactions: boolean;
|
public publicReactions: boolean;
|
||||||
|
|
||||||
@Column('enum', {
|
@Column("enum", {
|
||||||
enum: ffVisibility,
|
enum: ffVisibility,
|
||||||
default: 'public',
|
default: "public",
|
||||||
})
|
})
|
||||||
public ffVisibility: typeof ffVisibility[number];
|
public ffVisibility: typeof ffVisibility[number];
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, nullable: true,
|
length: 128,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public twoFactorTempSecret: string | null;
|
public twoFactorTempSecret: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, nullable: true,
|
length: 128,
|
||||||
|
nullable: true,
|
||||||
})
|
})
|
||||||
public twoFactorSecret: string | null;
|
public twoFactorSecret: string | null;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public twoFactorEnabled: boolean;
|
public twoFactorEnabled: boolean;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public securityKeysAvailable: boolean;
|
public securityKeysAvailable: boolean;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public usePasswordLessLogin: boolean;
|
public usePasswordLessLogin: boolean;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, nullable: true,
|
length: 128,
|
||||||
comment: 'The password hash of the User. It will be null if the origin of the user is local.',
|
nullable: true,
|
||||||
|
comment:
|
||||||
|
"The password hash of the User. It will be null if the origin of the user is local.",
|
||||||
})
|
})
|
||||||
public password: string | null;
|
public password: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 8192, default: '',
|
length: 8192,
|
||||||
|
default: "",
|
||||||
})
|
})
|
||||||
public moderationNote: string | null;
|
public moderationNote: string | null;
|
||||||
|
|
||||||
// TODO: そのうち消す
|
// TODO: そのうち消す
|
||||||
@Column('jsonb', {
|
@Column("jsonb", {
|
||||||
default: {},
|
default: {},
|
||||||
comment: 'The client-specific data of the User.',
|
comment: "The client-specific data of the User.",
|
||||||
})
|
})
|
||||||
public clientData: Record<string, any>;
|
public clientData: Record<string, any>;
|
||||||
|
|
||||||
// TODO: そのうち消す
|
// TODO: そのうち消す
|
||||||
@Column('jsonb', {
|
@Column("jsonb", {
|
||||||
default: {},
|
default: {},
|
||||||
comment: 'The room data of the User.',
|
comment: "The room data of the User.",
|
||||||
})
|
})
|
||||||
public room: Record<string, any>;
|
public room: Record<string, any>;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public autoAcceptFollowed: boolean;
|
public autoAcceptFollowed: boolean;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
comment: 'Whether reject index by crawler.',
|
comment: "Whether reject index by crawler.",
|
||||||
})
|
})
|
||||||
public noCrawle: boolean;
|
public noCrawle: boolean;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: true,
|
default: true,
|
||||||
})
|
})
|
||||||
public preventAiLearning: boolean;
|
public preventAiLearning: boolean;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public alwaysMarkNsfw: boolean;
|
public alwaysMarkNsfw: boolean;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public autoSensitive: boolean;
|
public autoSensitive: boolean;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public carefulBot: boolean;
|
public carefulBot: boolean;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: true,
|
default: true,
|
||||||
})
|
})
|
||||||
public injectFeaturedNote: boolean;
|
public injectFeaturedNote: boolean;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: true,
|
default: true,
|
||||||
})
|
})
|
||||||
public receiveAnnouncementEmail: boolean;
|
public receiveAnnouncementEmail: boolean;
|
||||||
@ -190,35 +202,36 @@ export class UserProfile {
|
|||||||
})
|
})
|
||||||
public pinnedPageId: Page["id"] | null;
|
public pinnedPageId: Page["id"] | null;
|
||||||
|
|
||||||
@OneToOne(type => Page, {
|
@OneToOne((type) => Page, {
|
||||||
onDelete: 'SET NULL',
|
onDelete: "SET NULL",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public pinnedPage: Page | null;
|
public pinnedPage: Page | null;
|
||||||
|
|
||||||
@Column('jsonb', {
|
@Column("jsonb", {
|
||||||
default: {},
|
default: {},
|
||||||
})
|
})
|
||||||
public integrations: Record<string, any>;
|
public integrations: Record<string, any>;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false, select: false,
|
default: false,
|
||||||
|
select: false,
|
||||||
})
|
})
|
||||||
public enableWordMute: boolean;
|
public enableWordMute: boolean;
|
||||||
|
|
||||||
@Column('jsonb', {
|
@Column("jsonb", {
|
||||||
default: [],
|
default: [],
|
||||||
})
|
})
|
||||||
public mutedWords: string[][];
|
public mutedWords: string[][];
|
||||||
|
|
||||||
@Column('jsonb', {
|
@Column("jsonb", {
|
||||||
default: [],
|
default: [],
|
||||||
comment: 'List of instances muted by the user.',
|
comment: "List of instances muted by the user.",
|
||||||
})
|
})
|
||||||
public mutedInstances: string[];
|
public mutedInstances: string[];
|
||||||
|
|
||||||
@Column('enum', {
|
@Column("enum", {
|
||||||
enum: notificationTypes,
|
enum: notificationTypes,
|
||||||
array: true,
|
array: true,
|
||||||
default: [],
|
default: [],
|
||||||
@ -227,9 +240,10 @@ export class UserProfile {
|
|||||||
|
|
||||||
//#region Denormalized fields
|
//#region Denormalized fields
|
||||||
@Index()
|
@Index()
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, nullable: true,
|
length: 128,
|
||||||
comment: '[Denormalized]',
|
nullable: true,
|
||||||
|
comment: "[Denormalized]",
|
||||||
})
|
})
|
||||||
public userHost: string | null;
|
public userHost: string | null;
|
||||||
//#endregion
|
//#endregion
|
||||||
|
@ -14,19 +14,19 @@ export class UserPublickey {
|
|||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@OneToOne(type => User, {
|
@OneToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
|
|
||||||
@Index({ unique: true })
|
@Index({ unique: true })
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 256,
|
length: 256,
|
||||||
})
|
})
|
||||||
public keyId: string;
|
public keyId: string;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 4096,
|
length: 4096,
|
||||||
})
|
})
|
||||||
public keyPem: string;
|
public keyPem: string;
|
||||||
|
@ -11,8 +11,8 @@ import { id } from "../id.js";
|
|||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class UserSecurityKey {
|
export class UserSecurityKey {
|
||||||
@PrimaryColumn('varchar', {
|
@PrimaryColumn("varchar", {
|
||||||
comment: 'Variable-length id given to navigator.credentials.get()',
|
comment: "Variable-length id given to navigator.credentials.get()",
|
||||||
})
|
})
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@ -20,27 +20,27 @@ export class UserSecurityKey {
|
|||||||
@Column(id())
|
@Column(id())
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
comment:
|
comment:
|
||||||
'Variable-length public key used to verify attestations (hex-encoded).',
|
"Variable-length public key used to verify attestations (hex-encoded).",
|
||||||
})
|
})
|
||||||
public publicKey: string;
|
public publicKey: string;
|
||||||
|
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment:
|
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;
|
public lastUsed: Date;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
comment: 'User-defined name for this key',
|
comment: "User-defined name for this key",
|
||||||
length: 30,
|
length: 30,
|
||||||
})
|
})
|
||||||
public name: string;
|
public name: string;
|
||||||
|
@ -10,99 +10,101 @@ import { id } from "../id.js";
|
|||||||
import { DriveFile } from "./drive-file.js";
|
import { DriveFile } from "./drive-file.js";
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
@Index(['usernameLower', 'host'], { unique: true })
|
@Index(["usernameLower", "host"], { unique: true })
|
||||||
export class User {
|
export class User {
|
||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the User.',
|
comment: "The created date of the User.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: 'The updated date of the User.',
|
comment: "The updated date of the User.",
|
||||||
})
|
})
|
||||||
public updatedAt: Date | null;
|
public updatedAt: Date | null;
|
||||||
|
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public lastFetchedAt: Date | null;
|
public lastFetchedAt: Date | null;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public lastActiveDate: Date | null;
|
public lastActiveDate: Date | null;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
public hideOnlineStatus: boolean;
|
public hideOnlineStatus: boolean;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
comment: 'The username of the User.',
|
comment: "The username of the User.",
|
||||||
})
|
})
|
||||||
public username: string;
|
public username: string;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, select: false,
|
length: 128,
|
||||||
comment: 'The username (lowercased) of the User.',
|
select: false,
|
||||||
|
comment: "The username (lowercased) of the User.",
|
||||||
})
|
})
|
||||||
public usernameLower: string;
|
public usernameLower: string;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, nullable: true,
|
length: 128,
|
||||||
comment: 'The name of the User.',
|
nullable: true,
|
||||||
|
comment: "The name of the User.",
|
||||||
})
|
})
|
||||||
public name: string | null;
|
public name: string | null;
|
||||||
|
|
||||||
@Column('integer', {
|
@Column("integer", {
|
||||||
default: 0,
|
default: 0,
|
||||||
comment: 'The count of followers.',
|
comment: "The count of followers.",
|
||||||
})
|
})
|
||||||
public followersCount: number;
|
public followersCount: number;
|
||||||
|
|
||||||
@Column('integer', {
|
@Column("integer", {
|
||||||
default: 0,
|
default: 0,
|
||||||
comment: 'The count of following.',
|
comment: "The count of following.",
|
||||||
})
|
})
|
||||||
public followingCount: number;
|
public followingCount: number;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512,
|
length: 512,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: 'The URI of the new account of the User',
|
comment: "The URI of the new account of the User",
|
||||||
})
|
})
|
||||||
public movedToUri: string | null;
|
public movedToUri: string | null;
|
||||||
|
|
||||||
@Column('simple-array', {
|
@Column("simple-array", {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: 'URIs the user is known as too',
|
comment: "URIs the user is known as too",
|
||||||
})
|
})
|
||||||
public alsoKnownAs: string[] | null;
|
public alsoKnownAs: string[] | null;
|
||||||
|
|
||||||
@Column('integer', {
|
@Column("integer", {
|
||||||
default: 0,
|
default: 0,
|
||||||
comment: 'The count of notes.',
|
comment: "The count of notes.",
|
||||||
})
|
})
|
||||||
public notesCount: number;
|
public notesCount: number;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: 'The ID of avatar DriveFile.',
|
comment: "The ID of avatar DriveFile.",
|
||||||
})
|
})
|
||||||
public avatarId: DriveFile["id"] | null;
|
public avatarId: DriveFile["id"] | null;
|
||||||
|
|
||||||
@OneToOne(type => DriveFile, {
|
@OneToOne((type) => DriveFile, {
|
||||||
onDelete: 'SET NULL',
|
onDelete: "SET NULL",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public avatar: DriveFile | null;
|
public avatar: DriveFile | null;
|
||||||
@ -110,143 +112,162 @@ export class User {
|
|||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: 'The ID of banner DriveFile.',
|
comment: "The ID of banner DriveFile.",
|
||||||
})
|
})
|
||||||
public bannerId: DriveFile["id"] | null;
|
public bannerId: DriveFile["id"] | null;
|
||||||
|
|
||||||
@OneToOne(type => DriveFile, {
|
@OneToOne((type) => DriveFile, {
|
||||||
onDelete: 'SET NULL',
|
onDelete: "SET NULL",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public banner: DriveFile | null;
|
public banner: DriveFile | null;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, array: true, default: '{}',
|
length: 128,
|
||||||
|
array: true,
|
||||||
|
default: "{}",
|
||||||
})
|
})
|
||||||
public tags: string[];
|
public tags: string[];
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
comment: 'Whether the User is suspended.',
|
comment: "Whether the User is suspended.",
|
||||||
})
|
})
|
||||||
public isSuspended: boolean;
|
public isSuspended: boolean;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
comment: 'Whether the User is silenced.',
|
comment: "Whether the User is silenced.",
|
||||||
})
|
})
|
||||||
public isSilenced: boolean;
|
public isSilenced: boolean;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
comment: 'Whether the User is locked.',
|
comment: "Whether the User is locked.",
|
||||||
})
|
})
|
||||||
public isLocked: boolean;
|
public isLocked: boolean;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
comment: 'Whether the User is a bot.',
|
comment: "Whether the User is a bot.",
|
||||||
})
|
})
|
||||||
public isBot: boolean;
|
public isBot: boolean;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
comment: 'Whether the User is a cat.',
|
comment: "Whether the User is a cat.",
|
||||||
})
|
})
|
||||||
public isCat: boolean;
|
public isCat: boolean;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: true,
|
default: true,
|
||||||
comment: 'Whether to speak as a cat if isCat.',
|
comment: "Whether to speak as a cat if isCat.",
|
||||||
})
|
})
|
||||||
public speakAsCat: boolean;
|
public speakAsCat: boolean;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
comment: 'Whether the User is the admin.',
|
comment: "Whether the User is the admin.",
|
||||||
})
|
})
|
||||||
public isAdmin: boolean;
|
public isAdmin: boolean;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
comment: 'Whether the User is a moderator.',
|
comment: "Whether the User is a moderator.",
|
||||||
})
|
})
|
||||||
public isModerator: boolean;
|
public isModerator: boolean;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: true,
|
default: true,
|
||||||
comment: 'Whether the User is explorable.',
|
comment: "Whether the User is explorable.",
|
||||||
})
|
})
|
||||||
public isExplorable: boolean;
|
public isExplorable: boolean;
|
||||||
|
|
||||||
// アカウントが削除されたかどうかのフラグだが、完全に削除される際は物理削除なので実質削除されるまでの「削除が進行しているかどうか」のフラグ
|
// アカウントが削除されたかどうかのフラグだが、完全に削除される際は物理削除なので実質削除されるまでの「削除が進行しているかどうか」のフラグ
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
comment: 'Whether the User is deleted.',
|
comment: "Whether the User is deleted.",
|
||||||
})
|
})
|
||||||
public isDeleted: boolean;
|
public isDeleted: boolean;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, array: true, default: '{}',
|
length: 128,
|
||||||
|
array: true,
|
||||||
|
default: "{}",
|
||||||
})
|
})
|
||||||
public emojis: string[];
|
public emojis: string[];
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, nullable: true,
|
length: 128,
|
||||||
comment: 'The host of the User. It will be null if the origin of the user is local.',
|
nullable: true,
|
||||||
|
comment:
|
||||||
|
"The host of the User. It will be null if the origin of the user is local.",
|
||||||
})
|
})
|
||||||
public host: string | null;
|
public host: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512, nullable: true,
|
length: 512,
|
||||||
comment: 'The inbox URL of the User. It will be null if the origin of the user is local.',
|
nullable: true,
|
||||||
|
comment:
|
||||||
|
"The inbox URL of the User. It will be null if the origin of the user is local.",
|
||||||
})
|
})
|
||||||
public inbox: string | null;
|
public inbox: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512, nullable: true,
|
length: 512,
|
||||||
comment: 'The sharedInbox URL of the User. It will be null if the origin of the user is local.',
|
nullable: true,
|
||||||
|
comment:
|
||||||
|
"The sharedInbox URL of the User. It will be null if the origin of the user is local.",
|
||||||
})
|
})
|
||||||
public sharedInbox: string | null;
|
public sharedInbox: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512, nullable: true,
|
length: 512,
|
||||||
comment: 'The featured URL of the User. It will be null if the origin of the user is local.',
|
nullable: true,
|
||||||
|
comment:
|
||||||
|
"The featured URL of the User. It will be null if the origin of the user is local.",
|
||||||
})
|
})
|
||||||
public featured: string | null;
|
public featured: string | null;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512, nullable: true,
|
length: 512,
|
||||||
comment: 'The URI of the User. It will be null if the origin of the user is local.',
|
nullable: true,
|
||||||
|
comment:
|
||||||
|
"The URI of the User. It will be null if the origin of the user is local.",
|
||||||
})
|
})
|
||||||
public uri: string | null;
|
public uri: string | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 512, nullable: true,
|
length: 512,
|
||||||
comment: 'The URI of the user Follower Collection. It will be null if the origin of the user is local.',
|
nullable: true,
|
||||||
|
comment:
|
||||||
|
"The URI of the user Follower Collection. It will be null if the origin of the user is local.",
|
||||||
})
|
})
|
||||||
public followersUri: string | null;
|
public followersUri: string | null;
|
||||||
|
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: false,
|
default: false,
|
||||||
comment: 'Whether to show users replying to other users in the timeline.',
|
comment: "Whether to show users replying to other users in the timeline.",
|
||||||
})
|
})
|
||||||
public showTimelineReplies: boolean;
|
public showTimelineReplies: boolean;
|
||||||
|
|
||||||
@Index({ unique: true })
|
@Index({ unique: true })
|
||||||
@Column('char', {
|
@Column("char", {
|
||||||
length: 16, nullable: true, unique: true,
|
length: 16,
|
||||||
comment: 'The native access token of the User. It will be null if the origin of the user is local.',
|
nullable: true,
|
||||||
|
unique: true,
|
||||||
|
comment:
|
||||||
|
"The native access token of the User. It will be null if the origin of the user is local.",
|
||||||
})
|
})
|
||||||
public token: string | null;
|
public token: string | null;
|
||||||
|
|
||||||
@Column('integer', {
|
@Column("integer", {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: 'Overrides user drive capacity limit',
|
comment: "Overrides user drive capacity limit",
|
||||||
})
|
})
|
||||||
public driveCapacityOverrideMb: number | null;
|
public driveCapacityOverrideMb: number | null;
|
||||||
|
|
||||||
|
@ -25,48 +25,50 @@ export class Webhook {
|
|||||||
@PrimaryColumn(id())
|
@PrimaryColumn(id())
|
||||||
public id: string;
|
public id: string;
|
||||||
|
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
comment: 'The created date of the Antenna.',
|
comment: "The created date of the Antenna.",
|
||||||
})
|
})
|
||||||
public createdAt: Date;
|
public createdAt: Date;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column({
|
@Column({
|
||||||
...id(),
|
...id(),
|
||||||
comment: 'The owner ID.',
|
comment: "The owner ID.",
|
||||||
})
|
})
|
||||||
public userId: User["id"];
|
public userId: User["id"];
|
||||||
|
|
||||||
@ManyToOne(type => User, {
|
@ManyToOne((type) => User, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User | null;
|
public user: User | null;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128,
|
length: 128,
|
||||||
comment: 'The name of the Antenna.',
|
comment: "The name of the Antenna.",
|
||||||
})
|
})
|
||||||
public name: string;
|
public name: string;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 128, array: true, default: '{}',
|
length: 128,
|
||||||
|
array: true,
|
||||||
|
default: "{}",
|
||||||
})
|
})
|
||||||
public on: typeof webhookEventTypes[number][];
|
public on: typeof webhookEventTypes[number][];
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 1024,
|
length: 1024,
|
||||||
})
|
})
|
||||||
public url: string;
|
public url: string;
|
||||||
|
|
||||||
@Column('varchar', {
|
@Column("varchar", {
|
||||||
length: 1024,
|
length: 1024,
|
||||||
})
|
})
|
||||||
public secret: string;
|
public secret: string;
|
||||||
|
|
||||||
@Index()
|
@Index()
|
||||||
@Column('boolean', {
|
@Column("boolean", {
|
||||||
default: true,
|
default: true,
|
||||||
})
|
})
|
||||||
public active: boolean;
|
public active: boolean;
|
||||||
@ -74,7 +76,7 @@ export class Webhook {
|
|||||||
/**
|
/**
|
||||||
* 直近のリクエスト送信日時
|
* 直近のリクエスト送信日時
|
||||||
*/
|
*/
|
||||||
@Column('timestamp with time zone', {
|
@Column("timestamp with time zone", {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public latestSentAt: Date | null;
|
public latestSentAt: Date | null;
|
||||||
@ -82,7 +84,7 @@ export class Webhook {
|
|||||||
/**
|
/**
|
||||||
* 直近のリクエスト送信時のHTTPステータスコード
|
* 直近のリクエスト送信時のHTTPステータスコード
|
||||||
*/
|
*/
|
||||||
@Column('integer', {
|
@Column("integer", {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public latestStatus: number | null;
|
public latestStatus: number | null;
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
"url": "url"
|
"url": "url"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"screenshots" : [
|
"screenshots": [
|
||||||
{
|
{
|
||||||
"src": "/static-assets/screenshots/1.webp",
|
"src": "/static-assets/screenshots/1.webp",
|
||||||
"sizes": "1195x579",
|
"sizes": "1195x579",
|
||||||
@ -57,7 +57,7 @@
|
|||||||
"label": "Posts"
|
"label": "Posts"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"shortcuts" : [
|
"shortcuts": [
|
||||||
{
|
{
|
||||||
"name": "Notifications",
|
"name": "Notifications",
|
||||||
"short_name": "Notifs",
|
"short_name": "Notifs",
|
||||||
@ -68,7 +68,5 @@
|
|||||||
"url": "/my/messaging"
|
"url": "/my/messaging"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"categories": [
|
"categories": ["social"]
|
||||||
"social"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
@ -34,9 +34,7 @@
|
|||||||
"tsd": "^0.19.1",
|
"tsd": "^0.19.1",
|
||||||
"typescript": "4.5.4"
|
"typescript": "4.5.4"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": ["built"],
|
||||||
"built"
|
|
||||||
],
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"autobind-decorator": "^2.4.0",
|
"autobind-decorator": "^2.4.0",
|
||||||
"eventemitter3": "^4.0.7",
|
"eventemitter3": "^4.0.7",
|
||||||
|
@ -15,11 +15,6 @@
|
|||||||
"noImplicitReturns": true,
|
"noImplicitReturns": true,
|
||||||
"esModuleInterop": true
|
"esModuleInterop": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["src/**/*"],
|
||||||
"src/**/*"
|
"exclude": ["node_modules", "test/**/*"]
|
||||||
],
|
|
||||||
"exclude": [
|
|
||||||
"node_modules",
|
|
||||||
"test/**/*"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ const widgetPropsDef = {};
|
|||||||
|
|
||||||
type WidgetProps = GetFormResultType<typeof widgetPropsDef>;
|
type WidgetProps = GetFormResultType<typeof widgetPropsDef>;
|
||||||
|
|
||||||
const props = defineProps<{ widget?: Widget<WidgetProps> }>();
|
const props = defineProps<{ widget?: Widget<WidgetProps> }>();
|
||||||
const emit = defineEmits<{ (ev: "updateProps", props: WidgetProps) }>();
|
const emit = defineEmits<{ (ev: "updateProps", props: WidgetProps) }>();
|
||||||
|
|
||||||
const { widgetProps, configure } = useWidgetPropsManager(
|
const { widgetProps, configure } = useWidgetPropsManager(
|
||||||
|
@ -6,9 +6,7 @@
|
|||||||
"watch": "pnpm swc src -d built -D -w",
|
"watch": "pnpm swc src -d built -D -w",
|
||||||
"lint": "pnpm rome check \"src/**/*.ts\""
|
"lint": "pnpm rome check \"src/**/*.ts\""
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {},
|
||||||
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@swc/cli": "^0.1.62",
|
"@swc/cli": "^0.1.62",
|
||||||
"@swc/core": "^1.3.50",
|
"@swc/core": "^1.3.50",
|
||||||
|
13
rome.json
13
rome.json
@ -5,5 +5,18 @@
|
|||||||
"rules": {
|
"rules": {
|
||||||
"recommended": true
|
"recommended": true
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"formatter": {
|
||||||
|
"ignore": [
|
||||||
|
"packages/calckey-js/api-extractor.json",
|
||||||
|
"packages/*/tsconfig.json",
|
||||||
|
"packages/*/package-lock.json",
|
||||||
|
"packages/backend/src/server/web/manifest.ts",
|
||||||
|
"packages/backend/built/",
|
||||||
|
"packages/backend/nsfw-model/",
|
||||||
|
"packages/client/src/emojilist.json",
|
||||||
|
"*.md",
|
||||||
|
"*/.yml"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user