/// countdownSeconds : 0
/// tasks : [{"taskId":0,"taskCode":"string","taskName":"string","taskCategory":0,"iconUrl":"string","currentValue":0,"tiers":[{"tierIndex":0,"targetValue":0,"targetUnit":"string","rewardValue":0,"isCompleted":true,"isClaimed":true}]}]

class SCRoomTaskListRes {
  SCRoomTaskListRes({
      int? countdownSeconds,
      List<Tasks>? tasks,}){
    _countdown = countdown;
    _tasks = tasks;
}

  SCRoomTaskListRes.fromJson(dynamic json) {
    _countdown = json['countdown'];
    if (json['tasks'] != null) {
      _tasks = [];
      json['tasks'].forEach((v) {
        _tasks?.add(Tasks.fromJson(v));
      });
    }
  }
  int? _countdown;
  List<Tasks>? _tasks;

  int? get countdown => _countdown;
  List<Tasks>? get tasks => _tasks;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['countdown'] = _countdown;
    if (_tasks != null) {
      map['tasks'] = _tasks?.map((v) => v.toJson()).toList();
    }
    return map;
  }

}

/// taskId : 0
/// taskCode : "string"
/// taskName : "string"
/// taskCategory : 0
/// iconUrl : "string"
/// currentValue : 0
/// tiers : [{"tierIndex":0,"targetValue":0,"targetUnit":"string","rewardValue":0,"isCompleted":true,"isClaimed":true}]

class Tasks {
  Tasks({
      num? taskId,
      String? taskCode,
      String? taskName,
      num? taskCategory,
      String? iconUrl,
      int? currentValue,
      List<Tiers>? tiers,}){
    _taskId = taskId;
    _taskCode = taskCode;
    _taskName = taskName;
    _taskCategory = taskCategory;
    _iconUrl = iconUrl;
    _currentValue = currentValue;
    _tiers = tiers;
}

  Tasks.fromJson(dynamic json) {
    _taskId = json['taskId'];
    _taskCode = json['taskCode'];
    _taskName = json['taskName'];
    _taskCategory = json['taskCategory'];
    _iconUrl = json['iconUrl'];
    _currentValue = json['currentValue'];
    if (json['tiers'] != null) {
      _tiers = [];
      json['tiers'].forEach((v) {
        _tiers?.add(Tiers.fromJson(v));
      });
    }
  }
  num? _taskId;
  String? _taskCode;
  String? _taskName;
  num? _taskCategory;
  String? _iconUrl;
  int? _currentValue;
  List<Tiers>? _tiers;

  num? get taskId => _taskId;
  String? get taskCode => _taskCode;
  String? get taskName => _taskName;
  num? get taskCategory => _taskCategory;
  String? get iconUrl => _iconUrl;
  int? get currentValue => _currentValue;
  List<Tiers>? get tiers => _tiers;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['taskId'] = _taskId;
    map['taskCode'] = _taskCode;
    map['taskName'] = _taskName;
    map['taskCategory'] = _taskCategory;
    map['iconUrl'] = _iconUrl;
    map['currentValue'] = _currentValue;
    if (_tiers != null) {
      map['tiers'] = _tiers?.map((v) => v.toJson()).toList();
    }
    return map;
  }

}

/// tierIndex : 0
/// targetValue : 0
/// targetUnit : "string"
/// rewardValue : 0
/// isCompleted : true
/// isClaimed : true

class Tiers {
  Tiers({
      num? tierIndex,
      int? targetValue,
      String? targetUnit,
      num? rewardValue,
      bool? isCompleted,
      bool? isClaimed,}){
    _tierIndex = tierIndex;
    _targetValue = targetValue;
    _targetUnit = targetUnit;
    _rewardValue = rewardValue;
    _isCompleted = isCompleted;
    _isClaimed = isClaimed;
}

  Tiers.fromJson(dynamic json) {
    _tierIndex = json['tierIndex'];
    _targetValue = json['targetValue'];
    _targetUnit = json['targetUnit'];
    _rewardValue = json['rewardValue'];
    _isCompleted = json['isCompleted'];
    _isClaimed = json['isClaimed'];
  }
  num? _tierIndex;
  int? _targetValue;
  String? _targetUnit;
  num? _rewardValue;
  bool? _isCompleted;
  bool? _isClaimed;

  num? get tierIndex => _tierIndex;
  int? get targetValue => _targetValue;
  String? get targetUnit => _targetUnit;
  num? get rewardValue => _rewardValue;
  bool? get isCompleted => _isCompleted;
  bool? get isClaimed => _isClaimed;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['tierIndex'] = _tierIndex;
    map['targetValue'] = _targetValue;
    map['targetUnit'] = _targetUnit;
    map['rewardValue'] = _rewardValue;
    map['isCompleted'] = _isCompleted;
    map['isClaimed'] = _isClaimed;
    return map;
  }

}