2020-02-05 01:15:09 +00:00
|
|
|
import { Entity, Column, PrimaryColumn, ManyToOne, JoinColumn } from 'typeorm';
|
2022-02-27 02:07:39 +00:00
|
|
|
import { id } from '../id.js';
|
2022-09-17 18:27:08 +00:00
|
|
|
import { User } from './User.js';
|
|
|
|
import type { Clip } from './Clip.js';
|
2019-04-07 12:50:36 +00:00
|
|
|
|
|
|
|
@Entity()
|
|
|
|
export class Meta {
|
2019-04-16 15:33:02 +00:00
|
|
|
@PrimaryColumn({
|
|
|
|
type: 'varchar',
|
2021-12-09 14:58:30 +00:00
|
|
|
length: 32,
|
2019-04-16 15:33:02 +00:00
|
|
|
})
|
2019-04-07 12:50:36 +00:00
|
|
|
public id: string;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024, nullable: true,
|
2019-04-07 12:50:36 +00:00
|
|
|
})
|
|
|
|
public name: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2021-12-09 14:58:30 +00:00
|
|
|
length: 1024, nullable: true,
|
2019-04-07 12:50:36 +00:00
|
|
|
})
|
|
|
|
public description: string | null;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* メンテナの名前
|
|
|
|
*/
|
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024, nullable: true,
|
2019-04-07 12:50:36 +00:00
|
|
|
})
|
|
|
|
public maintainerName: string | null;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* メンテナの連絡先
|
|
|
|
*/
|
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024, nullable: true,
|
2019-04-07 12:50:36 +00:00
|
|
|
})
|
|
|
|
public maintainerEmail: string | null;
|
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
|
|
|
})
|
|
|
|
public disableRegistration: boolean;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024, array: true, default: '{}',
|
2019-04-07 12:50:36 +00:00
|
|
|
})
|
|
|
|
public langs: string[];
|
|
|
|
|
2019-05-10 08:30:28 +00:00
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024, array: true, default: '{}',
|
2019-05-10 08:30:28 +00:00
|
|
|
})
|
|
|
|
public pinnedUsers: string[];
|
|
|
|
|
2019-04-07 12:50:36 +00:00
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024, array: true, default: '{}',
|
2019-04-07 12:50:36 +00:00
|
|
|
})
|
|
|
|
public hiddenTags: string[];
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024, array: true, default: '{}',
|
2019-04-07 12:50:36 +00:00
|
|
|
})
|
|
|
|
public blockedHosts: string[];
|
|
|
|
|
2023-03-13 08:37:22 +00:00
|
|
|
@Column('varchar', {
|
|
|
|
length: 1024, array: true, default: '{}',
|
|
|
|
})
|
|
|
|
public sensitiveWords: string[];
|
|
|
|
|
2019-04-07 12:50:36 +00:00
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024,
|
2022-02-09 12:25:48 +00:00
|
|
|
nullable: true,
|
|
|
|
})
|
|
|
|
public themeColor: string | null;
|
|
|
|
|
2020-11-17 05:59:15 +00:00
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024,
|
2019-04-07 12:50:36 +00:00
|
|
|
nullable: true,
|
|
|
|
})
|
|
|
|
public mascotImageUrl: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024,
|
2021-12-09 14:58:30 +00:00
|
|
|
nullable: true,
|
2019-04-07 12:50:36 +00:00
|
|
|
})
|
|
|
|
public bannerUrl: string | null;
|
|
|
|
|
2020-11-25 12:31:34 +00:00
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024,
|
2021-12-09 14:58:30 +00:00
|
|
|
nullable: true,
|
2020-11-25 12:31:34 +00:00
|
|
|
})
|
|
|
|
public backgroundImageUrl: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024,
|
2021-12-09 14:58:30 +00:00
|
|
|
nullable: true,
|
2020-11-25 12:31:34 +00:00
|
|
|
})
|
|
|
|
public logoImageUrl: string | null;
|
|
|
|
|
2019-04-07 12:50:36 +00:00
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024,
|
2019-04-07 12:50:36 +00:00
|
|
|
nullable: true,
|
|
|
|
})
|
|
|
|
public errorImageUrl: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024,
|
2021-12-09 14:58:30 +00:00
|
|
|
nullable: true,
|
2019-04-07 12:50:36 +00:00
|
|
|
})
|
|
|
|
public iconUrl: string | null;
|
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: true,
|
|
|
|
})
|
|
|
|
public cacheRemoteFiles: boolean;
|
|
|
|
|
2020-02-05 01:15:09 +00:00
|
|
|
@Column({
|
|
|
|
...id(),
|
|
|
|
nullable: true,
|
|
|
|
})
|
|
|
|
public proxyAccountId: User['id'] | null;
|
|
|
|
|
|
|
|
@ManyToOne(type => User, {
|
2021-12-09 14:58:30 +00:00
|
|
|
onDelete: 'SET NULL',
|
2019-04-07 12:50:36 +00:00
|
|
|
})
|
2020-02-05 01:15:09 +00:00
|
|
|
@JoinColumn()
|
|
|
|
public proxyAccount: User | null;
|
2019-04-07 12:50:36 +00:00
|
|
|
|
2021-10-08 04:37:02 +00:00
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
|
|
|
})
|
|
|
|
public emailRequiredForSignup: boolean;
|
|
|
|
|
2020-04-28 05:29:33 +00:00
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
|
|
|
})
|
|
|
|
public enableHcaptcha: boolean;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024,
|
2021-12-09 14:58:30 +00:00
|
|
|
nullable: true,
|
2020-04-28 05:29:33 +00:00
|
|
|
})
|
|
|
|
public hcaptchaSiteKey: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024,
|
2021-12-09 14:58:30 +00:00
|
|
|
nullable: true,
|
2020-04-28 05:29:33 +00:00
|
|
|
})
|
|
|
|
public hcaptchaSecretKey: string | null;
|
|
|
|
|
2019-04-07 12:50:36 +00:00
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
|
|
|
})
|
|
|
|
public enableRecaptcha: boolean;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024,
|
2021-12-09 14:58:30 +00:00
|
|
|
nullable: true,
|
2019-04-07 12:50:36 +00:00
|
|
|
})
|
|
|
|
public recaptchaSiteKey: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024,
|
2021-12-09 14:58:30 +00:00
|
|
|
nullable: true,
|
2019-04-07 12:50:36 +00:00
|
|
|
})
|
|
|
|
public recaptchaSecretKey: string | null;
|
|
|
|
|
2022-10-13 00:19:57 +00:00
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
|
|
|
})
|
|
|
|
public enableTurnstile: boolean;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024,
|
2022-10-13 00:19:57 +00:00
|
|
|
nullable: true,
|
|
|
|
})
|
|
|
|
public turnstileSiteKey: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024,
|
2022-10-13 00:19:57 +00:00
|
|
|
nullable: true,
|
|
|
|
})
|
|
|
|
public turnstileSecretKey: string | null;
|
|
|
|
|
2022-07-07 12:06:37 +00:00
|
|
|
@Column('enum', {
|
|
|
|
enum: ['none', 'all', 'local', 'remote'],
|
|
|
|
default: 'none',
|
|
|
|
})
|
|
|
|
public sensitiveMediaDetection: 'none' | 'all' | 'local' | 'remote';
|
|
|
|
|
|
|
|
@Column('enum', {
|
|
|
|
enum: ['medium', 'low', 'high', 'veryLow', 'veryHigh'],
|
|
|
|
default: 'medium',
|
|
|
|
})
|
|
|
|
public sensitiveMediaDetectionSensitivity: 'medium' | 'low' | 'high' | 'veryLow' | 'veryHigh';
|
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
|
|
|
})
|
|
|
|
public setSensitiveFlagAutomatically: boolean;
|
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
|
|
|
})
|
|
|
|
public enableSensitiveMediaDetectionForVideos: boolean;
|
|
|
|
|
2019-04-07 12:50:36 +00:00
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024,
|
2021-12-09 14:58:30 +00:00
|
|
|
nullable: true,
|
2019-04-07 12:50:36 +00:00
|
|
|
})
|
|
|
|
public summalyProxy: string | null;
|
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
|
|
|
})
|
|
|
|
public enableEmail: boolean;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024,
|
2021-12-09 14:58:30 +00:00
|
|
|
nullable: true,
|
2019-04-07 12:50:36 +00:00
|
|
|
})
|
|
|
|
public email: string | null;
|
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
|
|
|
})
|
|
|
|
public smtpSecure: boolean;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024,
|
2021-12-09 14:58:30 +00:00
|
|
|
nullable: true,
|
2019-04-07 12:50:36 +00:00
|
|
|
})
|
|
|
|
public smtpHost: string | null;
|
|
|
|
|
|
|
|
@Column('integer', {
|
2021-12-09 14:58:30 +00:00
|
|
|
nullable: true,
|
2019-04-07 12:50:36 +00:00
|
|
|
})
|
|
|
|
public smtpPort: number | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024,
|
2021-12-09 14:58:30 +00:00
|
|
|
nullable: true,
|
2019-04-07 12:50:36 +00:00
|
|
|
})
|
|
|
|
public smtpUser: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024,
|
2021-12-09 14:58:30 +00:00
|
|
|
nullable: true,
|
2019-04-07 12:50:36 +00:00
|
|
|
})
|
|
|
|
public smtpPass: string | null;
|
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
|
|
|
})
|
|
|
|
public enableServiceWorker: boolean;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024,
|
2021-12-09 14:58:30 +00:00
|
|
|
nullable: true,
|
2019-04-07 12:50:36 +00:00
|
|
|
})
|
|
|
|
public swPublicKey: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024,
|
2021-12-09 14:58:30 +00:00
|
|
|
nullable: true,
|
2019-04-07 12:50:36 +00:00
|
|
|
})
|
|
|
|
public swPrivateKey: string | null;
|
|
|
|
|
2021-08-15 11:26:44 +00:00
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024,
|
2021-12-09 14:58:30 +00:00
|
|
|
nullable: true,
|
2021-08-15 11:26:44 +00:00
|
|
|
})
|
|
|
|
public deeplAuthKey: string | null;
|
|
|
|
|
2021-08-24 04:19:21 +00:00
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
|
|
|
})
|
|
|
|
public deeplIsPro: boolean;
|
|
|
|
|
2019-05-13 17:57:04 +00:00
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024,
|
2021-12-09 14:58:30 +00:00
|
|
|
nullable: true,
|
2019-05-13 17:57:04 +00:00
|
|
|
})
|
2023-03-10 05:53:56 +00:00
|
|
|
public termsOfServiceUrl: string | null;
|
2019-05-13 17:57:04 +00:00
|
|
|
|
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024,
|
2021-03-24 03:23:05 +00:00
|
|
|
default: 'https://github.com/misskey-dev/misskey',
|
2021-12-09 14:58:30 +00:00
|
|
|
nullable: false,
|
2019-05-13 17:57:04 +00:00
|
|
|
})
|
|
|
|
public repositoryUrl: string;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024,
|
2021-03-24 03:23:05 +00:00
|
|
|
default: 'https://github.com/misskey-dev/misskey/issues/new',
|
2021-12-09 14:58:30 +00:00
|
|
|
nullable: true,
|
2019-05-13 17:57:04 +00:00
|
|
|
})
|
|
|
|
public feedbackUrl: string | null;
|
2019-05-15 16:07:32 +00:00
|
|
|
|
2022-03-01 14:58:01 +00:00
|
|
|
@Column('varchar', {
|
|
|
|
length: 8192,
|
|
|
|
nullable: true,
|
|
|
|
})
|
|
|
|
public defaultLightTheme: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 8192,
|
|
|
|
nullable: true,
|
|
|
|
})
|
|
|
|
public defaultDarkTheme: string | null;
|
|
|
|
|
2019-05-15 16:07:32 +00:00
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
|
|
|
})
|
|
|
|
public useObjectStorage: boolean;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024,
|
2021-12-09 14:58:30 +00:00
|
|
|
nullable: true,
|
2019-05-15 16:07:32 +00:00
|
|
|
})
|
|
|
|
public objectStorageBucket: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024,
|
2021-12-09 14:58:30 +00:00
|
|
|
nullable: true,
|
2019-05-15 16:07:32 +00:00
|
|
|
})
|
|
|
|
public objectStoragePrefix: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024,
|
2021-12-09 14:58:30 +00:00
|
|
|
nullable: true,
|
2019-05-15 16:07:32 +00:00
|
|
|
})
|
|
|
|
public objectStorageBaseUrl: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024,
|
2021-12-09 14:58:30 +00:00
|
|
|
nullable: true,
|
2019-05-15 16:07:32 +00:00
|
|
|
})
|
|
|
|
public objectStorageEndpoint: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024,
|
2021-12-09 14:58:30 +00:00
|
|
|
nullable: true,
|
2019-05-15 16:07:32 +00:00
|
|
|
})
|
|
|
|
public objectStorageRegion: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024,
|
2021-12-09 14:58:30 +00:00
|
|
|
nullable: true,
|
2019-05-15 16:07:32 +00:00
|
|
|
})
|
|
|
|
public objectStorageAccessKey: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2023-03-10 05:53:56 +00:00
|
|
|
length: 1024,
|
2021-12-09 14:58:30 +00:00
|
|
|
nullable: true,
|
2019-05-15 16:07:32 +00:00
|
|
|
})
|
|
|
|
public objectStorageSecretKey: string | null;
|
|
|
|
|
|
|
|
@Column('integer', {
|
2021-12-09 14:58:30 +00:00
|
|
|
nullable: true,
|
2019-05-15 16:07:32 +00:00
|
|
|
})
|
|
|
|
public objectStoragePort: number | null;
|
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: true,
|
|
|
|
})
|
|
|
|
public objectStorageUseSSL: boolean;
|
2020-04-12 11:32:34 +00:00
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: true,
|
|
|
|
})
|
|
|
|
public objectStorageUseProxy: boolean;
|
2020-08-13 11:05:01 +00:00
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
|
|
|
})
|
|
|
|
public objectStorageSetPublicRead: boolean;
|
2021-02-06 02:48:57 +00:00
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: true,
|
|
|
|
})
|
|
|
|
public objectStorageS3ForcePathStyle: boolean;
|
2022-07-02 06:12:11 +00:00
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: false,
|
|
|
|
})
|
|
|
|
public enableIpLogging: boolean;
|
2022-07-09 06:05:55 +00:00
|
|
|
|
|
|
|
@Column('boolean', {
|
|
|
|
default: true,
|
|
|
|
})
|
|
|
|
public enableActiveEmailValidation: boolean;
|
2023-01-12 12:02:26 +00:00
|
|
|
|
2023-03-24 06:43:36 +00:00
|
|
|
@Column('boolean', {
|
|
|
|
default: true,
|
|
|
|
})
|
|
|
|
public enableChartsForRemoteUser: boolean;
|
|
|
|
|
2023-01-12 12:02:26 +00:00
|
|
|
@Column('jsonb', {
|
|
|
|
default: { },
|
|
|
|
})
|
2023-01-15 11:52:53 +00:00
|
|
|
public policies: Record<string, any>;
|
2019-04-07 12:50:36 +00:00
|
|
|
}
|