22 lines
416 B
TypeScript
22 lines
416 B
TypeScript
export namespace main {
|
|
|
|
export class Dto {
|
|
code: number;
|
|
msg: string;
|
|
data: any;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new Dto(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.code = source["code"];
|
|
this.msg = source["msg"];
|
|
this.data = source["data"];
|
|
}
|
|
}
|
|
|
|
}
|
|
|