import { ICrudable , IModel } from '../crudable' ; import { IJwt , IMicroflowStorage } from '../types' ; export class EntityController < T extends IModel > { constructor ( private model , private store , protected storage , protected jwt , protected timeout = 10000 ) { } async data ( ) { return this . store . read ( this . model . id ) ; } async update ( data ) { return this . store . update ( this . model . id , data ) ; } }