2017-10-30 17:30:32 +09:00
|
|
|
import * as mongo from 'mongodb';
|
|
|
|
import db from '../../db/mongodb';
|
|
|
|
|
2017-10-31 21:42:11 +09:00
|
|
|
const collection = db.get('channels');
|
2017-10-30 17:30:32 +09:00
|
|
|
|
|
|
|
export default collection as any; // fuck type definition
|
|
|
|
|
2017-10-31 21:42:11 +09:00
|
|
|
export type IChannel = {
|
2017-10-30 17:30:32 +09:00
|
|
|
_id: mongo.ObjectID;
|
|
|
|
created_at: Date;
|
|
|
|
title: string;
|
|
|
|
user_id: mongo.ObjectID;
|
|
|
|
};
|