wip
This commit is contained in:
parent
335200c31e
commit
0481de6629
17 changed files with 149 additions and 703 deletions
|
@ -1,11 +1,11 @@
|
|||
import * as mongo from 'mongodb';
|
||||
import db from '../db/mongodb';
|
||||
|
||||
const Chart = db.get<IChart>('chart');
|
||||
Chart.createIndex('date', { unique: true });
|
||||
export default Chart;
|
||||
const Stats = db.get<IStats>('stats');
|
||||
Stats.createIndex({ date: -1 }, { unique: true });
|
||||
export default Stats;
|
||||
|
||||
export interface IChart {
|
||||
export interface IStats {
|
||||
_id: mongo.ObjectID;
|
||||
|
||||
date: Date;
|
Loading…
Add table
Add a link
Reference in a new issue