paricafe/src/models/stats.ts

154 lines
2.6 KiB
TypeScript
Raw Normal View History

2018-08-18 06:22:56 -05:00
import * as mongo from 'mongodb';
import db from '../db/mongodb';
2018-08-18 10:27:23 -05:00
const Stats = db.get<IStats>('stats');
Stats.createIndex({ date: -1 }, { unique: true });
export default Stats;
2018-08-18 06:22:56 -05:00
2018-08-18 10:27:23 -05:00
export interface IStats {
2018-08-18 06:22:56 -05:00
_id: mongo.ObjectID;
date: Date;
2018-08-18 09:48:54 -05:00
/**
*
*/
2018-08-18 06:22:56 -05:00
users: {
local: {
/**
*
*/
total: number;
/**
2018-08-18 09:23:55 -05:00
*
2018-08-18 06:22:56 -05:00
*/
diff: number;
};
remote: {
/**
*
*/
total: number;
/**
2018-08-18 09:23:55 -05:00
*
2018-08-18 06:22:56 -05:00
*/
diff: number;
};
};
2018-08-18 09:48:54 -05:00
/**
* 稿
*/
2018-08-18 06:22:56 -05:00
notes: {
local: {
/**
* 稿
*/
total: number;
2018-08-18 09:23:55 -05:00
/**
* 稿
*/
diff: number;
2018-08-18 06:22:56 -05:00
diffs: {
/**
2018-08-18 09:23:55 -05:00
* 稿
2018-08-18 06:22:56 -05:00
*/
normal: number;
/**
2018-08-18 09:23:55 -05:00
* 稿
2018-08-18 06:22:56 -05:00
*/
reply: number;
/**
2018-08-18 09:23:55 -05:00
* Renoteの投稿数の前日比
2018-08-18 06:22:56 -05:00
*/
renote: number;
};
};
remote: {
/**
* 稿
*/
total: number;
2018-08-18 09:23:55 -05:00
/**
* 稿
*/
diff: number;
2018-08-18 06:22:56 -05:00
diffs: {
/**
2018-08-18 09:23:55 -05:00
* 稿
2018-08-18 06:22:56 -05:00
*/
normal: number;
/**
2018-08-18 09:23:55 -05:00
* 稿
2018-08-18 06:22:56 -05:00
*/
reply: number;
/**
2018-08-18 09:23:55 -05:00
* Renoteの投稿数の前日比
2018-08-18 06:22:56 -05:00
*/
renote: number;
};
};
};
2018-08-18 09:48:54 -05:00
/**
* ()
*/
drive: {
local: {
/**
*
*/
totalCount: number;
/**
*
*/
totalSize: number;
/**
*
*/
diffCount: number;
/**
*
*/
diffSize: number;
};
remote: {
/**
*
*/
totalCount: number;
/**
*
*/
totalSize: number;
/**
*
*/
diffCount: number;
/**
*
*/
diffSize: number;
};
};
2018-08-18 06:22:56 -05:00
}