export class DataOutput<T> {
  code: number;
  msg: string;
  recordsTotal?: number;
  recordsFiltered?: number;
  data?: any;
  validator?: any;
  constructor(
    options: {
      code?: number;
      msg?: string;
      recordsTotal?: number;
      recordsFiltered?: number;
      data?: T[];
      validator?: any;
    } = {}
  ) {
    this.code = options.code || -1;
    this.msg = options.msg || "";
    this.recordsTotal = options.recordsTotal || 0;
    this.recordsFiltered = options.recordsFiltered || 0;
    this.data = options.data;
    this.validator = options.validator || {};
  }
}
