2023-07-27 05:31:52 +00:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2019-04-07 12:50:36 +00:00
|
|
|
import { Entity, PrimaryColumn, Index, Column } from 'typeorm';
|
2023-09-20 02:33:36 +00:00
|
|
|
import { id } from './util/id.js';
|
2019-04-07 12:50:36 +00:00
|
|
|
|
2023-08-16 08:51:28 +00:00
|
|
|
@Entity('instance')
|
|
|
|
export class MiInstance {
|
2019-04-07 12:50:36 +00:00
|
|
|
@PrimaryColumn(id())
|
|
|
|
public id: string;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* このインスタンスを捕捉した日時
|
|
|
|
*/
|
|
|
|
@Index()
|
|
|
|
@Column('timestamp with time zone', {
|
2021-12-09 14:58:30 +00:00
|
|
|
comment: 'The caught date of the Instance.',
|
2019-04-07 12:50:36 +00:00
|
|
|
})
|
2023-01-15 20:02:38 +00:00
|
|
|
public firstRetrievedAt: Date;
|
2019-04-07 12:50:36 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* ホスト
|
|
|
|
*/
|
|
|
|
@Index({ unique: true })
|
|
|
|
@Column('varchar', {
|
|
|
|
length: 128,
|
2021-12-09 14:58:30 +00:00
|
|
|
comment: 'The host of the Instance.',
|
2019-04-07 12:50:36 +00:00
|
|
|
})
|
|
|
|
public host: string;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* インスタンスのユーザー数
|
|
|
|
*/
|
|
|
|
@Column('integer', {
|
|
|
|
default: 0,
|
2021-12-09 14:58:30 +00:00
|
|
|
comment: 'The count of the users of the Instance.',
|
2019-04-07 12:50:36 +00:00
|
|
|
})
|
|
|
|
public usersCount: number;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* インスタンスの投稿数
|
|
|
|
*/
|
|
|
|
@Column('integer', {
|
|
|
|
default: 0,
|
2021-12-09 14:58:30 +00:00
|
|
|
comment: 'The count of the notes of the Instance.',
|
2019-04-07 12:50:36 +00:00
|
|
|
})
|
|
|
|
public notesCount: number;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* このインスタンスのユーザーからフォローされている、自インスタンスのユーザーの数
|
|
|
|
*/
|
|
|
|
@Column('integer', {
|
|
|
|
default: 0,
|
|
|
|
})
|
|
|
|
public followingCount: number;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* このインスタンスのユーザーをフォローしている、自インスタンスのユーザーの数
|
|
|
|
*/
|
|
|
|
@Column('integer', {
|
|
|
|
default: 0,
|
|
|
|
})
|
|
|
|
public followersCount: number;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 直近のリクエスト受信日時
|
|
|
|
*/
|
|
|
|
@Column('timestamp with time zone', {
|
|
|
|
nullable: true,
|
|
|
|
})
|
|
|
|
public latestRequestReceivedAt: Date | null;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* このインスタンスと不通かどうか
|
|
|
|
*/
|
|
|
|
@Column('boolean', {
|
2021-12-09 14:58:30 +00:00
|
|
|
default: false,
|
2019-04-07 12:50:36 +00:00
|
|
|
})
|
|
|
|
public isNotResponding: boolean;
|
|
|
|
|
|
|
|
/**
|
2020-01-29 20:56:14 +00:00
|
|
|
* このインスタンスへの配信を停止するか
|
2019-04-07 12:50:36 +00:00
|
|
|
*/
|
2020-01-29 20:56:14 +00:00
|
|
|
@Index()
|
2019-04-07 12:50:36 +00:00
|
|
|
@Column('boolean', {
|
2021-12-09 14:58:30 +00:00
|
|
|
default: false,
|
2019-04-07 12:50:36 +00:00
|
|
|
})
|
2020-01-29 20:56:14 +00:00
|
|
|
public isSuspended: boolean;
|
2019-11-05 13:14:42 +00:00
|
|
|
|
|
|
|
@Column('varchar', {
|
2022-05-05 13:45:22 +00:00
|
|
|
length: 64, nullable: true,
|
2021-12-09 14:58:30 +00:00
|
|
|
comment: 'The software of the Instance.',
|
2019-11-05 13:14:42 +00:00
|
|
|
})
|
|
|
|
public softwareName: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2022-05-05 13:45:22 +00:00
|
|
|
length: 64, nullable: true,
|
2019-11-05 13:14:42 +00:00
|
|
|
})
|
|
|
|
public softwareVersion: string | null;
|
|
|
|
|
|
|
|
@Column('boolean', {
|
2022-05-05 13:45:22 +00:00
|
|
|
nullable: true,
|
2019-11-05 13:14:42 +00:00
|
|
|
})
|
|
|
|
public openRegistrations: boolean | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2022-05-05 13:45:22 +00:00
|
|
|
length: 256, nullable: true,
|
2019-11-05 13:14:42 +00:00
|
|
|
})
|
|
|
|
public name: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2022-05-05 13:45:22 +00:00
|
|
|
length: 4096, nullable: true,
|
2019-11-05 13:14:42 +00:00
|
|
|
})
|
|
|
|
public description: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2022-05-05 13:45:22 +00:00
|
|
|
length: 128, nullable: true,
|
2019-11-05 13:14:42 +00:00
|
|
|
})
|
|
|
|
public maintainerName: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2022-05-05 13:45:22 +00:00
|
|
|
length: 256, nullable: true,
|
2019-11-05 13:14:42 +00:00
|
|
|
})
|
|
|
|
public maintainerEmail: string | null;
|
|
|
|
|
2020-07-26 02:04:07 +00:00
|
|
|
@Column('varchar', {
|
2022-05-05 13:45:22 +00:00
|
|
|
length: 256, nullable: true,
|
2020-07-26 02:04:07 +00:00
|
|
|
})
|
|
|
|
public iconUrl: string | null;
|
|
|
|
|
2020-10-27 07:16:59 +00:00
|
|
|
@Column('varchar', {
|
2022-05-05 13:45:22 +00:00
|
|
|
length: 256, nullable: true,
|
2020-10-27 07:16:59 +00:00
|
|
|
})
|
|
|
|
public faviconUrl: string | null;
|
|
|
|
|
|
|
|
@Column('varchar', {
|
2022-05-05 13:45:22 +00:00
|
|
|
length: 64, nullable: true,
|
2020-10-27 07:16:59 +00:00
|
|
|
})
|
|
|
|
public themeColor: string | null;
|
|
|
|
|
2019-11-05 13:14:42 +00:00
|
|
|
@Column('timestamp with time zone', {
|
|
|
|
nullable: true,
|
|
|
|
})
|
|
|
|
public infoUpdatedAt: Date | null;
|
2019-04-07 12:50:36 +00:00
|
|
|
}
|