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