paricafe/src/models/instance.ts

56 lines
1.1 KiB
TypeScript
Raw Normal View History

2018-10-23 16:17:55 -05:00
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;
2019-02-07 00:00:44 -06:00
/**
*
*/
followingCount: number;
/**
*
*/
followersCount: number;
/**
*
*/
latestRequestSentAt?: Date;
/**
* HTTPステータス
*/
latestStatus?: number;
2018-10-23 16:17:55 -05:00
}