import 'package:hamlemuhcrm/features/projects/model/gorevler.dart';

class GorevlerCevap {
  List<Gorevler>? gorevler;
  int? success;
  String? message;

  GorevlerCevap({this.gorevler, this.success, this.message});

  GorevlerCevap.fromJson(Map<String, dynamic> json) {
    if (json['gorevler'] != null) {
      gorevler = <Gorevler>[];
      json['gorevler'].forEach((v) {
        gorevler!.add(Gorevler.fromJson(v));
      });
    }
    success = json['success'];
    message = json['message'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    if (gorevler != null) {
      data['gorevler'] = gorevler!.map((v) => v.toJson()).toList();
    }
    data['success'] = success;
    data['message'] = message;
    return data;
  }
}
