/*
 * @Author       : WuWei
 * @LastEditors  : WuWei
 * @Date         : 2021-04-30 11:27:04
 * @LastEditTime : 2021-05-31 09:06:11
 * @FilePath     : /wisdom-huiguanjia-app/task_package/lib/src/models/task_plan_detail.dart
 * @Description  : Do not edit
 */
import 'package:json_annotation/json_annotation.dart';
part 'task_plan_detail.g.dart';

@JsonSerializable(nullable: true)
class TaskPlanDetailModel {
  final String? title;
  final String? content;
  final String? cronExpression;
  final bool? enable;
  final String? startTime;
  final String? endTime;
  final num? executorCount;
  final List<FileModel>? files;
  final String? inventoryName;
  final String? createdBy;

  TaskPlanDetailModel({
    this.title,
    this.content,
    this.cronExpression,
    this.enable,
    this.startTime,
    this.endTime,
    this.executorCount,
    this.files,
    this.inventoryName,
    this.createdBy,
  });

  ///
  ///
  ///
  ///
  ///
  ///
  ///
//***以下为模板代码谨慎修改***
  factory TaskPlanDetailModel.fromJson(Map<String, dynamic> json) =>
      _$TaskPlanDetailModelFromJson(json);
  Map<String, dynamic> toJson() => _$TaskPlanDetailModelToJson(this);
}

class FileModel {
  String? fileId;
  String? fileName;
  String? type;

  FileModel({
    this.fileId,
    this.fileName,
    this.type,
  });

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

    fileId = map['fileId'];
    fileName = map['fileName'];
    type = map['type'];
  }

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

    json['fileId'] = this.fileId;
    json['fileName'] = this.fileName;
    json['type'] = this.type;

    return json;
  }
}
