This commit is contained in:
syuilo
2018-10-24 06:17:55 +09:00
parent daa22d68fa
commit a136715111
5 changed files with 153 additions and 0 deletions

35
src/models/instance.ts Normal file
View File

@ -0,0 +1,35 @@
import * as mongo from 'mongodb';
import db from '../db/mongodb';
const Instance = db.get<IInstance>('instances');
Instance.createIndex('host', { unique: true });
export default Instance;
export interface IInstance {
_id: mongo.ObjectID;
/**
* ホスト
*/
host: string;
/**
* このインスタンスを捕捉した日時
*/
caughtAt: Date;
/**
* このインスタンスのシステム (MastodonとかMisskeyとかPleromaとか)
*/
system: string;
/**
* このインスタンスのユーザー数
*/
usersCount: number;
/**
* このインスタンスから受け取った投稿数
*/
notesCount: number;
}