export class HttpResult {
  code: number = 0;
  message: string = ""
  data?: object = undefined;

  constructor(code: number, message: string, data?: object) {
    this.code = code;
    this.message = message;
    this.data = data;
  }

  isSuccess(): boolean {
    return this.code === 0;
  }
}