import { timeType } from "@/enums/uilibrary";
export class TimeProp implements ITimeProp {
  constructor(value?: ITimeProp) {
    if (value) {
      this.type = value.type;
      this.range = value.range;
      this.min = value.min;
      this.max = value.max;
      this.format = value.max;
    }
  }
  private _type = timeType.date;
  private _range = false;
  private _min = "";
  private _max = "";
  private _format = "yyyy/MM/dd hh:mm:ss";
  get type() {
    return this._type;
  }
  set type(v: timeType) {
    this._type = v;
  }
  get range() {
    return this._range;
  }
  set range(v: boolean) {
    this._range = v;
  }
  get min() {
    return this._min;
  }
  set min(v: string) {
    this._min = v;
  }
  get max() {
    return this._max;
  }
  set max(v: string) {
    this._max = v;
  }
  get format() {
    return this._format;
  }
  set format(v: string) {
    this._format = v;
  }
  public static rules() {
    return {
      //   value: [
      //     {
      //       required: true,
      //       message: "请输入实际值",
      //       trigger: "blur",
      //     },
      //   ],
    };
  }
}
