/*
 * @Author       : WuWei
 * @LastEditors  : WuWei
 * @Date         : 2022-05-20 15:57:31
 * @LastEditTime : 2023-05-16 09:47:58
 * @Description  : Do not edit
 */

class TimingListModel {
  String? id;
  String? name;
  String? taskCode;
  String? taskName;
  String? startTime;
  dynamic endTime;
  String? cronExpression;
  String? createdAt;
  String? createdBy;
  bool? enable;
  dynamic nextFireTime;
  ArgsOfTimingListModel? args;

  TimingListModel({
    this.id,
    this.name,
    this.taskCode,
    this.taskName,
    this.startTime,
    this.endTime,
    this.cronExpression,
    this.createdAt,
    this.createdBy,
    this.enable,
    this.nextFireTime,
    this.args,
  });

  TimingListModel.fromJson(json) {
    Map<String, dynamic> map = Map.from(json ?? {});

    id = map['id'];
    name = map['name'];
    taskCode = map['taskCode'];
    taskName = map['taskName'];
    startTime = map['startTime'];
    endTime = map['endTime'];
    cronExpression = map['cronExpression'];
    createdAt = map['createdAt'];
    createdBy = map['createdBy'];
    enable = map['enable'];
    nextFireTime = map['nextFireTime'];
    args = ArgsOfTimingListModel.fromJson(map["args"] ?? {});
  }

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = Map<String, dynamic>();

    json['id'] = this.id;
    json['name'] = this.name;
    json['taskCode'] = this.taskCode;
    json['taskName'] = this.taskName;
    json['startTime'] = this.startTime;
    json['endTime'] = this.endTime;
    json['cronExpression'] = this.cronExpression;
    json['createdAt'] = this.createdAt;
    json['createdBy'] = this.createdBy;
    json['enable'] = this.enable;
    json['nextFireTime'] = this.nextFireTime;
    json['args'] = this.args?.toJson();

    return json;
  }
}

class ArgsOfTimingListModel {
  String? controllerId;
  String? behavior;

  ArgsOfTimingListModel({
    this.controllerId,
    this.behavior,
  });

  ArgsOfTimingListModel.fromJson(json) {
    Map<String, dynamic> map = Map.from(json ?? {});

    controllerId = map['controllerId'];
    behavior = map['behavior'];
  }

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = Map<String, dynamic>();

    json['controllerId'] = this.controllerId;
    json['behavior'] = this.behavior;

    return json;
  }
}
