import { MongoBaseService } from "cgserver"; import { MongoBaseModel } from "cgserver"; import { GCacheTool } from "cgserver"; import _ from "underscore"; export class BlindItem { level=0 small_blind=0 big_blind=0 ante=0 seconds=0 } export class BlindModel extends MongoBaseModel { id=0 items=new Array() } export let GBlindSer:BlindService=null export class BlindService extends MongoBaseService { async getById(id: any): Promise { let key = "blind_"+id let bm:BlindModel = GCacheTool.get(key) if(bm) { return bm } bm = await super.getById(id) GCacheTool.add(key,bm,10*60*1000) return bm } } GBlindSer=new BlindService("blind",BlindModel)