2018-08-18 11:22:56 +00:00
|
|
|
import * as mongo from 'mongodb';
|
|
|
|
import db from '../db/mongodb';
|
|
|
|
|
|
|
|
const Chart = db.get<IChart>('chart');
|
|
|
|
Chart.createIndex('date', { unique: true });
|
|
|
|
export default Chart;
|
|
|
|
|
|
|
|
export interface IChart {
|
|
|
|
_id: mongo.ObjectID;
|
|
|
|
|
|
|
|
date: Date;
|
|
|
|
|
|
|
|
users: {
|
|
|
|
local: {
|
|
|
|
/**
|
|
|
|
* この日時点での、ローカルのユーザーの総計
|
|
|
|
*/
|
|
|
|
total: number;
|
|
|
|
|
|
|
|
/**
|
2018-08-18 14:23:55 +00:00
|
|
|
* ローカルのユーザー数の前日比
|
2018-08-18 11:22:56 +00:00
|
|
|
*/
|
|
|
|
diff: number;
|
|
|
|
};
|
|
|
|
|
|
|
|
remote: {
|
|
|
|
/**
|
|
|
|
* この日時点での、リモートのユーザーの総計
|
|
|
|
*/
|
|
|
|
total: number;
|
|
|
|
|
|
|
|
/**
|
2018-08-18 14:23:55 +00:00
|
|
|
* リモートのユーザー数の前日比
|
2018-08-18 11:22:56 +00:00
|
|
|
*/
|
|
|
|
diff: number;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
notes: {
|
|
|
|
local: {
|
|
|
|
/**
|
|
|
|
* この日時点での、ローカルの投稿の総計
|
|
|
|
*/
|
|
|
|
total: number;
|
|
|
|
|
2018-08-18 14:23:55 +00:00
|
|
|
/**
|
|
|
|
* ローカルの投稿数の前日比
|
|
|
|
*/
|
|
|
|
diff: number;
|
|
|
|
|
2018-08-18 11:22:56 +00:00
|
|
|
diffs: {
|
|
|
|
/**
|
2018-08-18 14:23:55 +00:00
|
|
|
* ローカルの通常の投稿数の前日比
|
2018-08-18 11:22:56 +00:00
|
|
|
*/
|
|
|
|
normal: number;
|
|
|
|
|
|
|
|
/**
|
2018-08-18 14:23:55 +00:00
|
|
|
* ローカルのリプライの投稿数の前日比
|
2018-08-18 11:22:56 +00:00
|
|
|
*/
|
|
|
|
reply: number;
|
|
|
|
|
|
|
|
/**
|
2018-08-18 14:23:55 +00:00
|
|
|
* ローカルのRenoteの投稿数の前日比
|
2018-08-18 11:22:56 +00:00
|
|
|
*/
|
|
|
|
renote: number;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
remote: {
|
|
|
|
/**
|
|
|
|
* この日時点での、リモートの投稿の総計
|
|
|
|
*/
|
|
|
|
total: number;
|
|
|
|
|
2018-08-18 14:23:55 +00:00
|
|
|
/**
|
|
|
|
* リモートの投稿数の前日比
|
|
|
|
*/
|
|
|
|
diff: number;
|
|
|
|
|
2018-08-18 11:22:56 +00:00
|
|
|
diffs: {
|
|
|
|
/**
|
2018-08-18 14:23:55 +00:00
|
|
|
* リモートの通常の投稿数の前日比
|
2018-08-18 11:22:56 +00:00
|
|
|
*/
|
|
|
|
normal: number;
|
|
|
|
|
|
|
|
/**
|
2018-08-18 14:23:55 +00:00
|
|
|
* リモートのリプライの投稿数の前日比
|
2018-08-18 11:22:56 +00:00
|
|
|
*/
|
|
|
|
reply: number;
|
|
|
|
|
|
|
|
/**
|
2018-08-18 14:23:55 +00:00
|
|
|
* リモートのRenoteの投稿数の前日比
|
2018-08-18 11:22:56 +00:00
|
|
|
*/
|
|
|
|
renote: number;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|