2020-02-05 10:15:09 +09:00
|
|
|
import { Entity, Column, PrimaryColumn, ManyToOne, JoinColumn } from 'typeorm';
|
2021-08-19 21:55:45 +09:00
|
|
|
import { User } from './user';
|
|
|
|
import { id } from '../id';
|
|
|
|
import { Clip } from './clip';
|
2019-04-07 21:50:36 +09:00
|
|
|
|
|
|
|
@Entity()
|
|
|
|
export class Meta {
|
2019-04-17 00:33:02 +09:00
|
|
|
@PrimaryColumn({
|
|
|
|
type: 'varchar',
|
2021-12-09 23:58:30 +09:00
|
|
|
length: 32,
|
2019-04-17 00:33:02 +09:00
|
|
|
})
|
2019-04-07 21:50:36 +09:00
|
|
|
public id: string;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2021-12-09 23:58:30 +09:00
|
|
|
length: 128, nullable: true,
|
2019-04-07 21:50:36 +09:00
|
|
|
})
|
|
|
|
public name: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2021-12-09 23:58:30 +09:00
|
|
|
length: 1024, nullable: true,
|
2019-04-07 21:50:36 +09:00
|
|
|
})
|
|
|
|
public description: string | null;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* メンテナの名前
|
|
|
|
*/
|
|
|
|
@Column('varchar', {
|
2021-12-09 23:58:30 +09:00
|
|
|
length: 128, nullable: true,
|
2019-04-07 21:50:36 +09:00
|
|
|
})
|
|
|
|
public maintainerName: string | null;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* メンテナの連絡先
|
|
|
|
*/
|
|
|
|
@Column('varchar', {
|
2021-12-09 23:58:30 +09:00
|
|
|
length: 128, nullable: true,
|
2019-04-07 21:50:36 +09:00
|
|
|
})
|
|
|
|
public maintainerEmail: string | null;
|
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
|
|
|
})
|
|
|
|
public disableRegistration: boolean;
|
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
|
|
|
})
|
|
|
|
public disableLocalTimeline: boolean;
|
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
|
|
|
})
|
|
|
|
public disableGlobalTimeline: boolean;
|
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
|
|
|
})
|
|
|
|
public useStarForReactionFallback: boolean;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2021-12-09 23:58:30 +09:00
|
|
|
length: 64, array: true, default: '{}',
|
2019-04-07 21:50:36 +09:00
|
|
|
})
|
|
|
|
public langs: string[];
|
|
|
|
|
2019-05-10 17:30:28 +09:00
|
|
|
@Column('varchar', {
|
2021-12-09 23:58:30 +09:00
|
|
|
length: 256, array: true, default: '{}',
|
2019-05-10 17:30:28 +09:00
|
|
|
})
|
|
|
|
public pinnedUsers: string[];
|
|
|
|
|
2019-04-07 21:50:36 +09:00
|
|
|
@Column('varchar', {
|
2021-12-09 23:58:30 +09:00
|
|
|
length: 256, array: true, default: '{}',
|
2019-04-07 21:50:36 +09:00
|
|
|
})
|
|
|
|
public hiddenTags: string[];
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2021-12-09 23:58:30 +09:00
|
|
|
length: 256, array: true, default: '{}',
|
2019-04-07 21:50:36 +09:00
|
|
|
})
|
|
|
|
public blockedHosts: string[];
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2021-12-09 23:58:30 +09:00
|
|
|
length: 512, array: true, default: '{"/featured", "/channels", "/explore", "/pages", "/about-misskey"}',
|
2020-11-17 14:59:15 +09:00
|
|
|
})
|
|
|
|
public pinnedPages: string[];
|
|
|
|
|
2020-12-05 16:05:40 +09:00
|
|
|
@Column({
|
|
|
|
...id(),
|
|
|
|
nullable: true,
|
|
|
|
})
|
|
|
|
public pinnedClipId: Clip['id'] | null;
|
|
|
|
|
2020-11-17 14:59:15 +09:00
|
|
|
@Column('varchar', {
|
2019-04-11 19:03:49 +09:00
|
|
|
length: 512,
|
2019-04-07 21:50:36 +09:00
|
|
|
nullable: true,
|
2021-12-09 23:58:30 +09:00
|
|
|
default: '/assets/ai.png',
|
2019-04-07 21:50:36 +09:00
|
|
|
})
|
|
|
|
public mascotImageUrl: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2019-04-11 19:03:49 +09:00
|
|
|
length: 512,
|
2021-12-09 23:58:30 +09:00
|
|
|
nullable: true,
|
2019-04-07 21:50:36 +09:00
|
|
|
})
|
|
|
|
public bannerUrl: string | null;
|
|
|
|
|
2020-11-25 21:31:34 +09:00
|
|
|
@Column('varchar', {
|
|
|
|
length: 512,
|
2021-12-09 23:58:30 +09:00
|
|
|
nullable: true,
|
2020-11-25 21:31:34 +09:00
|
|
|
})
|
|
|
|
public backgroundImageUrl: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 512,
|
2021-12-09 23:58:30 +09:00
|
|
|
nullable: true,
|
2020-11-25 21:31:34 +09:00
|
|
|
})
|
|
|
|
public logoImageUrl: string | null;
|
|
|
|
|
2019-04-07 21:50:36 +09:00
|
|
|
@Column('varchar', {
|
2019-04-11 19:03:49 +09:00
|
|
|
length: 512,
|
2019-04-07 21:50:36 +09:00
|
|
|
nullable: true,
|
2021-12-09 23:58:30 +09:00
|
|
|
default: 'https://xn--931a.moe/aiart/yubitun.png',
|
2019-04-07 21:50:36 +09:00
|
|
|
})
|
|
|
|
public errorImageUrl: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2019-04-11 19:03:49 +09:00
|
|
|
length: 512,
|
2021-12-09 23:58:30 +09:00
|
|
|
nullable: true,
|
2019-04-07 21:50:36 +09:00
|
|
|
})
|
|
|
|
public iconUrl: string | null;
|
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: true,
|
|
|
|
})
|
|
|
|
public cacheRemoteFiles: boolean;
|
|
|
|
|
2019-12-31 17:23:47 +09:00
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
|
|
|
})
|
|
|
|
public proxyRemoteFiles: boolean;
|
|
|
|
|
2020-02-05 10:15:09 +09:00
|
|
|
@Column({
|
|
|
|
...id(),
|
|
|
|
nullable: true,
|
|
|
|
})
|
|
|
|
public proxyAccountId: User['id'] | null;
|
|
|
|
|
|
|
|
@ManyToOne(type => User, {
|
2021-12-09 23:58:30 +09:00
|
|
|
onDelete: 'SET NULL',
|
2019-04-07 21:50:36 +09:00
|
|
|
})
|
2020-02-05 10:15:09 +09:00
|
|
|
@JoinColumn()
|
|
|
|
public proxyAccount: User | null;
|
2019-04-07 21:50:36 +09:00
|
|
|
|
2021-10-08 13:37:02 +09:00
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
|
|
|
})
|
|
|
|
public emailRequiredForSignup: boolean;
|
|
|
|
|
2020-04-28 14:29:33 +09:00
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
|
|
|
})
|
|
|
|
public enableHcaptcha: boolean;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 64,
|
2021-12-09 23:58:30 +09:00
|
|
|
nullable: true,
|
2020-04-28 14:29:33 +09:00
|
|
|
})
|
|
|
|
public hcaptchaSiteKey: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 64,
|
2021-12-09 23:58:30 +09:00
|
|
|
nullable: true,
|
2020-04-28 14:29:33 +09:00
|
|
|
})
|
|
|
|
public hcaptchaSecretKey: string | null;
|
|
|
|
|
2019-04-07 21:50:36 +09:00
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
|
|
|
})
|
|
|
|
public enableRecaptcha: boolean;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 64,
|
2021-12-09 23:58:30 +09:00
|
|
|
nullable: true,
|
2019-04-07 21:50:36 +09:00
|
|
|
})
|
|
|
|
public recaptchaSiteKey: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 64,
|
2021-12-09 23:58:30 +09:00
|
|
|
nullable: true,
|
2019-04-07 21:50:36 +09:00
|
|
|
})
|
|
|
|
public recaptchaSecretKey: string | null;
|
|
|
|
|
|
|
|
@Column('integer', {
|
|
|
|
default: 1024,
|
2021-12-09 23:58:30 +09:00
|
|
|
comment: 'Drive capacity of a local user (MB)',
|
2019-04-07 21:50:36 +09:00
|
|
|
})
|
|
|
|
public localDriveCapacityMb: number;
|
|
|
|
|
|
|
|
@Column('integer', {
|
|
|
|
default: 32,
|
2021-12-09 23:58:30 +09:00
|
|
|
comment: 'Drive capacity of a remote user (MB)',
|
2019-04-07 21:50:36 +09:00
|
|
|
})
|
|
|
|
public remoteDriveCapacityMb: number;
|
|
|
|
|
|
|
|
@Column('integer', {
|
|
|
|
default: 500,
|
2021-12-09 23:58:30 +09:00
|
|
|
comment: 'Max allowed note text length in characters',
|
2019-04-07 21:50:36 +09:00
|
|
|
})
|
|
|
|
public maxNoteTextLength: number;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 128,
|
2021-12-09 23:58:30 +09:00
|
|
|
nullable: true,
|
2019-04-07 21:50:36 +09:00
|
|
|
})
|
|
|
|
public summalyProxy: string | null;
|
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
|
|
|
})
|
|
|
|
public enableEmail: boolean;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 128,
|
2021-12-09 23:58:30 +09:00
|
|
|
nullable: true,
|
2019-04-07 21:50:36 +09:00
|
|
|
})
|
|
|
|
public email: string | null;
|
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
|
|
|
})
|
|
|
|
public smtpSecure: boolean;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 128,
|
2021-12-09 23:58:30 +09:00
|
|
|
nullable: true,
|
2019-04-07 21:50:36 +09:00
|
|
|
})
|
|
|
|
public smtpHost: string | null;
|
|
|
|
|
|
|
|
@Column('integer', {
|
2021-12-09 23:58:30 +09:00
|
|
|
nullable: true,
|
2019-04-07 21:50:36 +09:00
|
|
|
})
|
|
|
|
public smtpPort: number | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 128,
|
2021-12-09 23:58:30 +09:00
|
|
|
nullable: true,
|
2019-04-07 21:50:36 +09:00
|
|
|
})
|
|
|
|
public smtpUser: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 128,
|
2021-12-09 23:58:30 +09:00
|
|
|
nullable: true,
|
2019-04-07 21:50:36 +09:00
|
|
|
})
|
|
|
|
public smtpPass: string | null;
|
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
|
|
|
})
|
|
|
|
public enableServiceWorker: boolean;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 128,
|
2021-12-09 23:58:30 +09:00
|
|
|
nullable: true,
|
2019-04-07 21:50:36 +09:00
|
|
|
})
|
|
|
|
public swPublicKey: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 128,
|
2021-12-09 23:58:30 +09:00
|
|
|
nullable: true,
|
2019-04-07 21:50:36 +09:00
|
|
|
})
|
|
|
|
public swPrivateKey: string | null;
|
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
|
|
|
})
|
|
|
|
public enableTwitterIntegration: boolean;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 128,
|
2021-12-09 23:58:30 +09:00
|
|
|
nullable: true,
|
2019-04-07 21:50:36 +09:00
|
|
|
})
|
|
|
|
public twitterConsumerKey: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 128,
|
2021-12-09 23:58:30 +09:00
|
|
|
nullable: true,
|
2019-04-07 21:50:36 +09:00
|
|
|
})
|
|
|
|
public twitterConsumerSecret: string | null;
|
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
|
|
|
})
|
|
|
|
public enableGithubIntegration: boolean;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 128,
|
2021-12-09 23:58:30 +09:00
|
|
|
nullable: true,
|
2019-04-07 21:50:36 +09:00
|
|
|
})
|
|
|
|
public githubClientId: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 128,
|
2021-12-09 23:58:30 +09:00
|
|
|
nullable: true,
|
2019-04-07 21:50:36 +09:00
|
|
|
})
|
|
|
|
public githubClientSecret: string | null;
|
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
|
|
|
})
|
|
|
|
public enableDiscordIntegration: boolean;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 128,
|
2021-12-09 23:58:30 +09:00
|
|
|
nullable: true,
|
2019-04-07 21:50:36 +09:00
|
|
|
})
|
|
|
|
public discordClientId: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 128,
|
2021-12-09 23:58:30 +09:00
|
|
|
nullable: true,
|
2019-04-07 21:50:36 +09:00
|
|
|
})
|
|
|
|
public discordClientSecret: string | null;
|
2019-05-14 02:57:04 +09:00
|
|
|
|
2021-08-15 20:26:44 +09:00
|
|
|
@Column('varchar', {
|
|
|
|
length: 128,
|
2021-12-09 23:58:30 +09:00
|
|
|
nullable: true,
|
2021-08-15 20:26:44 +09:00
|
|
|
})
|
|
|
|
public deeplAuthKey: string | null;
|
|
|
|
|
2021-08-24 13:19:21 +09:00
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
|
|
|
})
|
|
|
|
public deeplIsPro: boolean;
|
|
|
|
|
2019-05-14 02:57:04 +09:00
|
|
|
@Column('varchar', {
|
|
|
|
length: 512,
|
2021-12-09 23:58:30 +09:00
|
|
|
nullable: true,
|
2019-05-14 02:57:04 +09:00
|
|
|
})
|
|
|
|
public ToSUrl: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 512,
|
2021-03-24 12:23:05 +09:00
|
|
|
default: 'https://github.com/misskey-dev/misskey',
|
2021-12-09 23:58:30 +09:00
|
|
|
nullable: false,
|
2019-05-14 02:57:04 +09:00
|
|
|
})
|
|
|
|
public repositoryUrl: string;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 512,
|
2021-03-24 12:23:05 +09:00
|
|
|
default: 'https://github.com/misskey-dev/misskey/issues/new',
|
2021-12-09 23:58:30 +09:00
|
|
|
nullable: true,
|
2019-05-14 02:57:04 +09:00
|
|
|
})
|
|
|
|
public feedbackUrl: string | null;
|
2019-05-16 01:07:32 +09:00
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
|
|
|
})
|
|
|
|
public useObjectStorage: boolean;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 512,
|
2021-12-09 23:58:30 +09:00
|
|
|
nullable: true,
|
2019-05-16 01:07:32 +09:00
|
|
|
})
|
|
|
|
public objectStorageBucket: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 512,
|
2021-12-09 23:58:30 +09:00
|
|
|
nullable: true,
|
2019-05-16 01:07:32 +09:00
|
|
|
})
|
|
|
|
public objectStoragePrefix: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 512,
|
2021-12-09 23:58:30 +09:00
|
|
|
nullable: true,
|
2019-05-16 01:07:32 +09:00
|
|
|
})
|
|
|
|
public objectStorageBaseUrl: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 512,
|
2021-12-09 23:58:30 +09:00
|
|
|
nullable: true,
|
2019-05-16 01:07:32 +09:00
|
|
|
})
|
|
|
|
public objectStorageEndpoint: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 512,
|
2021-12-09 23:58:30 +09:00
|
|
|
nullable: true,
|
2019-05-16 01:07:32 +09:00
|
|
|
})
|
|
|
|
public objectStorageRegion: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 512,
|
2021-12-09 23:58:30 +09:00
|
|
|
nullable: true,
|
2019-05-16 01:07:32 +09:00
|
|
|
})
|
|
|
|
public objectStorageAccessKey: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 512,
|
2021-12-09 23:58:30 +09:00
|
|
|
nullable: true,
|
2019-05-16 01:07:32 +09:00
|
|
|
})
|
|
|
|
public objectStorageSecretKey: string | null;
|
|
|
|
|
|
|
|
@Column('integer', {
|
2021-12-09 23:58:30 +09:00
|
|
|
nullable: true,
|
2019-05-16 01:07:32 +09:00
|
|
|
})
|
|
|
|
public objectStoragePort: number | null;
|
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: true,
|
|
|
|
})
|
|
|
|
public objectStorageUseSSL: boolean;
|
2020-04-12 20:32:34 +09:00
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: true,
|
|
|
|
})
|
|
|
|
public objectStorageUseProxy: boolean;
|
2020-08-13 20:05:01 +09:00
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
|
|
|
})
|
|
|
|
public objectStorageSetPublicRead: boolean;
|
2021-02-06 11:48:57 +09:00
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: true,
|
|
|
|
})
|
|
|
|
public objectStorageS3ForcePathStyle: boolean;
|
2019-04-07 21:50:36 +09:00
|
|
|
}
|