1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
|
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { Entity, PrimaryColumn, Index, Column } from 'typeorm';
import { id } from './util/id.js';
@Entity('instance')
export class MiInstance {
@PrimaryColumn(id())
public id: string;
/**
* このインスタンスを捕捉した日時
*/
@Index()
@Column('timestamp with time zone', {
comment: 'The caught date of the Instance.',
})
public firstRetrievedAt: Date;
/**
* ホスト
*/
@Index({ unique: true })
@Column('varchar', {
length: 128,
comment: 'The host of the Instance.',
})
public host: string;
/**
* インスタンスのユーザー数
*/
@Column('integer', {
default: 0,
comment: 'The count of the users of the Instance.',
})
public usersCount: number;
/**
* インスタンスの投稿数
*/
@Column('integer', {
default: 0,
comment: 'The count of the notes of the Instance.',
})
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', {
default: false,
})
public isNotResponding: boolean;
/**
* このインスタンスと不通になった日時
*/
@Column('timestamp with time zone', {
nullable: true,
})
public notRespondingSince: Date | null;
/**
* このインスタンスへの配信状態
*/
@Index()
@Column('enum', {
default: 'none',
enum: ['none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding'],
})
public suspensionState: 'none' | 'manuallySuspended' | 'goneSuspended' | 'autoSuspendedForNotResponding';
@Column('varchar', {
length: 64, nullable: true,
comment: 'The software of the Instance.',
})
public softwareName: string | null;
@Column('varchar', {
length: 64, nullable: true,
})
public softwareVersion: string | null;
@Column('boolean', {
nullable: true,
})
public openRegistrations: boolean | null;
@Column('varchar', {
length: 256, nullable: true,
})
public name: string | null;
@Column('varchar', {
length: 4096, nullable: true,
})
public description: string | null;
@Column('varchar', {
length: 128, nullable: true,
})
public maintainerName: string | null;
@Column('varchar', {
length: 256, nullable: true,
})
public maintainerEmail: string | null;
@Column('varchar', {
length: 256, nullable: true,
})
public iconUrl: string | null;
@Column('varchar', {
length: 256, nullable: true,
})
public faviconUrl: string | null;
@Column('varchar', {
length: 64, nullable: true,
})
public themeColor: string | null;
@Column('timestamp with time zone', {
nullable: true,
})
public infoUpdatedAt: Date | null;
@Column('boolean', {
default: false,
})
public isNSFW: boolean;
@Column('boolean', {
default: false,
})
public rejectReports: boolean;
/**
* If true, quote posts from this instance will be downgraded to normal posts.
* The quote will be stripped and a process error will be generated.
*/
@Column('boolean', {
default: false,
})
public rejectQuotes: boolean;
@Column('varchar', {
length: 16384, default: '',
})
public moderationNote: string;
}
|