egirlskey/src/models/chart.ts

89 lines
1.6 KiB
TypeScript
Raw Normal View History

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;
/**
*
*/
diff: number;
};
remote: {
/**
*
*/
total: number;
/**
*
*/
diff: number;
};
};
notes: {
local: {
/**
* 稿
*/
total: number;
diffs: {
/**
* 稿
*/
normal: number;
/**
* 稿
*/
reply: number;
/**
* Renoteの投稿数の前日比
*/
renote: number;
};
};
remote: {
/**
* 稿
*/
total: number;
diffs: {
/**
* 稿
*/
normal: number;
/**
* 稿
*/
reply: number;
/**
* Renoteの投稿数の前日比
*/
renote: number;
};
};
};
}