File size: 368 Bytes
813eca2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import _ from 'lodash';
import Body from './Body.ts';
export default class SuccessfulBody extends Body {
constructor(data: any, message?: string) {
super({
code: 0,
message: _.defaultTo(message, "OK"),
data
});
}
static isInstance(value) {
return value instanceof SuccessfulBody;
}
} |