// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'hra_repository_models.dart';

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

AcademicYearEntity _$AcademicYearEntityFromJson(Map<String, dynamic> json) =>
    AcademicYearEntity(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      schoolId: (json['schoolId'] as num?)?.toInt(),
      startPeriod1: json['startPeriod1'] == null
          ? null
          : DateTime.parse(json['startPeriod1'] as String),
      startPeriod2: json['startPeriod2'] == null
          ? null
          : DateTime.parse(json['startPeriod2'] as String),
      end: json['end'] == null ? null : DateTime.parse(json['end'] as String),
      name: json['name'] as String?,
    );

Map<String, dynamic> _$AcademicYearEntityToJson(AcademicYearEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'schoolId': instance.schoolId,
      'startPeriod1': instance.startPeriod1?.toIso8601String(),
      'startPeriod2': instance.startPeriod2?.toIso8601String(),
      'end': instance.end?.toIso8601String(),
      'name': instance.name,
    };

AcademicYearEntityApiResponse _$AcademicYearEntityApiResponseFromJson(
        Map<String, dynamic> json) =>
    AcademicYearEntityApiResponse(
      data: json['data'] == null
          ? null
          : AcademicYearEntity.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$AcademicYearEntityApiResponseToJson(
        AcademicYearEntityApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

AcademicYearEntityListApiResponse _$AcademicYearEntityListApiResponseFromJson(
        Map<String, dynamic> json) =>
    AcademicYearEntityListApiResponse(
      data: (json['data'] as List<dynamic>?)
              ?.map(
                  (e) => AcademicYearEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$AcademicYearEntityListApiResponseToJson(
        AcademicYearEntityListApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.map((e) => e.toJson()).toList(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

ActivityEntity _$ActivityEntityFromJson(Map<String, dynamic> json) =>
    ActivityEntity(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      title: json['title'] as String?,
      description: json['description'] as String?,
      videoUrl: json['videoUrl'] as String?,
      tag: json['tag'] as String?,
      type: json['type'] as String?,
      imageUrl: json['imageUrl'] as String?,
      status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()),
      displayOrder: (json['displayOrder'] as num?)?.toInt(),
    );

Map<String, dynamic> _$ActivityEntityToJson(ActivityEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'title': instance.title,
      'description': instance.description,
      'videoUrl': instance.videoUrl,
      'tag': instance.tag,
      'type': instance.type,
      'imageUrl': instance.imageUrl,
      'status': commonStatusEnumToJson(instance.status),
      'displayOrder': instance.displayOrder,
    };

ActivityEntityApiResponse _$ActivityEntityApiResponseFromJson(
        Map<String, dynamic> json) =>
    ActivityEntityApiResponse(
      data: json['data'] == null
          ? null
          : ActivityEntity.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$ActivityEntityApiResponseToJson(
        ActivityEntityApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

ActivityGetListQuery _$ActivityGetListQueryFromJson(
        Map<String, dynamic> json) =>
    ActivityGetListQuery(
      sortExpression: json['sortExpression'] as String?,
      pageSize: (json['pageSize'] as num?)?.toInt(),
      pageIndex: (json['pageIndex'] as num?)?.toInt(),
      skip: (json['skip'] as num?)?.toInt(),
      notSkip: (json['notSkip'] as num?)?.toInt(),
      propertyIncludes: (json['propertyIncludes'] as List<dynamic>?)
              ?.map((e) => e as String)
              .toList() ??
          [],
      keyword: json['keyword'] as String?,
      status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()),
      tag: json['tag'] as String?,
      type: json['type'] as String?,
    );

Map<String, dynamic> _$ActivityGetListQueryToJson(
        ActivityGetListQuery instance) =>
    <String, dynamic>{
      'sortExpression': instance.sortExpression,
      'pageSize': instance.pageSize,
      'pageIndex': instance.pageIndex,
      'skip': instance.skip,
      'notSkip': instance.notSkip,
      'propertyIncludes': instance.propertyIncludes,
      'keyword': instance.keyword,
      'status': commonStatusEnumToJson(instance.status),
      'tag': instance.tag,
      'type': instance.type,
    };

ActivityListDto _$ActivityListDtoFromJson(Map<String, dynamic> json) =>
    ActivityListDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      title: json['title'] as String?,
      description: json['description'] as String?,
      videoUrl: json['videoUrl'] as String?,
      tag: json['tag'] as String?,
      type: json['type'] as String?,
      imageUrl: json['imageUrl'] as String?,
      status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()),
      displayOrder: (json['displayOrder'] as num?)?.toInt(),
    );

Map<String, dynamic> _$ActivityListDtoToJson(ActivityListDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'title': instance.title,
      'description': instance.description,
      'videoUrl': instance.videoUrl,
      'tag': instance.tag,
      'type': instance.type,
      'imageUrl': instance.imageUrl,
      'status': commonStatusEnumToJson(instance.status),
      'displayOrder': instance.displayOrder,
    };

ActivityListDtoFilterResult _$ActivityListDtoFilterResultFromJson(
        Map<String, dynamic> json) =>
    ActivityListDtoFilterResult(
      totalRows: (json['totalRows'] as num?)?.toInt(),
      data: (json['data'] as List<dynamic>?)
              ?.map((e) => ActivityListDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$ActivityListDtoFilterResultToJson(
        ActivityListDtoFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

ActivityListDtoFilterResultApiResponse
    _$ActivityListDtoFilterResultApiResponseFromJson(
            Map<String, dynamic> json) =>
        ActivityListDtoFilterResultApiResponse(
          data: json['data'] == null
              ? null
              : ActivityListDtoFilterResult.fromJson(
                  json['data'] as Map<String, dynamic>),
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic> _$ActivityListDtoFilterResultApiResponseToJson(
        ActivityListDtoFilterResultApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

ActivityLogEntity _$ActivityLogEntityFromJson(Map<String, dynamic> json) =>
    ActivityLogEntity(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      title: json['title'] as String?,
      data: json['data'] as String?,
      objectType: json['objectType'] as String?,
      ip: json['ip'] as String?,
    );

Map<String, dynamic> _$ActivityLogEntityToJson(ActivityLogEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'title': instance.title,
      'data': instance.data,
      'objectType': instance.objectType,
      'ip': instance.ip,
    };

ActivityLogEntityApiResponse _$ActivityLogEntityApiResponseFromJson(
        Map<String, dynamic> json) =>
    ActivityLogEntityApiResponse(
      data: json['data'] == null
          ? null
          : ActivityLogEntity.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$ActivityLogEntityApiResponseToJson(
        ActivityLogEntityApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

ActivitySaveDto _$ActivitySaveDtoFromJson(Map<String, dynamic> json) =>
    ActivitySaveDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      title: json['title'] as String?,
      description: json['description'] as String?,
      videoUrl: json['videoUrl'] as String?,
      tag: json['tag'] as String?,
      type: json['type'] as String?,
      imageUrl: json['imageUrl'] as String?,
      status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()),
      displayOrder: (json['displayOrder'] as num?)?.toInt(),
    );

Map<String, dynamic> _$ActivitySaveDtoToJson(ActivitySaveDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'title': instance.title,
      'description': instance.description,
      'videoUrl': instance.videoUrl,
      'tag': instance.tag,
      'type': instance.type,
      'imageUrl': instance.imageUrl,
      'status': commonStatusEnumToJson(instance.status),
      'displayOrder': instance.displayOrder,
    };

ActivitySaveDtoApiResponse _$ActivitySaveDtoApiResponseFromJson(
        Map<String, dynamic> json) =>
    ActivitySaveDtoApiResponse(
      data: json['data'] == null
          ? null
          : ActivitySaveDto.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$ActivitySaveDtoApiResponseToJson(
        ActivitySaveDtoApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

AiChatRequest _$AiChatRequestFromJson(Map<String, dynamic> json) =>
    AiChatRequest(
      systemPrompt: json['systemPrompt'] as String?,
      userMessage: json['userMessage'] as String?,
      userMessageContent: (json['userMessageContent'] as List<dynamic>?)
              ?.map((e) => AiMessageContent.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      model: json['model'] as String?,
      temperature: (json['temperature'] as num?)?.toDouble(),
      maxTokens: (json['maxTokens'] as num?)?.toInt(),
    );

Map<String, dynamic> _$AiChatRequestToJson(AiChatRequest instance) =>
    <String, dynamic>{
      'systemPrompt': instance.systemPrompt,
      'userMessage': instance.userMessage,
      'userMessageContent':
          instance.userMessageContent?.map((e) => e.toJson()).toList(),
      'model': instance.model,
      'temperature': instance.temperature,
      'maxTokens': instance.maxTokens,
    };

AiMessageContent _$AiMessageContentFromJson(Map<String, dynamic> json) =>
    AiMessageContent(
      type: json['type'] as String?,
    );

Map<String, dynamic> _$AiMessageContentToJson(AiMessageContent instance) =>
    <String, dynamic>{
      'type': instance.type,
    };

AiPromptEntity _$AiPromptEntityFromJson(Map<String, dynamic> json) =>
    AiPromptEntity(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      grade: (json['grade'] as num?)?.toInt(),
      categoryId: (json['categoryId'] as num?)?.toInt(),
      code: json['code'] as String?,
      name: json['name'] as String?,
      description: json['description'] as String?,
      prompt: json['prompt'] as String?,
      category: json['category'] == null
          ? null
          : CategoryEntity.fromJson(json['category'] as Map<String, dynamic>),
    );

Map<String, dynamic> _$AiPromptEntityToJson(AiPromptEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'grade': instance.grade,
      'categoryId': instance.categoryId,
      'code': instance.code,
      'name': instance.name,
      'description': instance.description,
      'prompt': instance.prompt,
      'category': instance.category?.toJson(),
    };

AiPromptEntityApiResponse _$AiPromptEntityApiResponseFromJson(
        Map<String, dynamic> json) =>
    AiPromptEntityApiResponse(
      data: json['data'] == null
          ? null
          : AiPromptEntity.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$AiPromptEntityApiResponseToJson(
        AiPromptEntityApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

AiPromptGetListQuery _$AiPromptGetListQueryFromJson(
        Map<String, dynamic> json) =>
    AiPromptGetListQuery(
      sortExpression: json['sortExpression'] as String?,
      pageSize: (json['pageSize'] as num?)?.toInt(),
      pageIndex: (json['pageIndex'] as num?)?.toInt(),
      skip: (json['skip'] as num?)?.toInt(),
      notSkip: (json['notSkip'] as num?)?.toInt(),
      propertyIncludes: (json['propertyIncludes'] as List<dynamic>?)
              ?.map((e) => e as String)
              .toList() ??
          [],
      keyword: json['keyword'] as String?,
      code: json['code'] as String?,
      grade: (json['grade'] as num?)?.toInt(),
      categoryId: (json['categoryId'] as num?)?.toInt(),
    );

Map<String, dynamic> _$AiPromptGetListQueryToJson(
        AiPromptGetListQuery instance) =>
    <String, dynamic>{
      'sortExpression': instance.sortExpression,
      'pageSize': instance.pageSize,
      'pageIndex': instance.pageIndex,
      'skip': instance.skip,
      'notSkip': instance.notSkip,
      'propertyIncludes': instance.propertyIncludes,
      'keyword': instance.keyword,
      'code': instance.code,
      'grade': instance.grade,
      'categoryId': instance.categoryId,
    };

AiPromptListDto _$AiPromptListDtoFromJson(Map<String, dynamic> json) =>
    AiPromptListDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      grade: (json['grade'] as num?)?.toInt(),
      categoryId: (json['categoryId'] as num?)?.toInt(),
      code: json['code'] as String?,
      name: json['name'] as String?,
      description: json['description'] as String?,
      prompt: json['prompt'] as String?,
      category: json['category'] == null
          ? null
          : CategoryEntity.fromJson(json['category'] as Map<String, dynamic>),
      categoryName: json['categoryName'] as String?,
    );

Map<String, dynamic> _$AiPromptListDtoToJson(AiPromptListDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'grade': instance.grade,
      'categoryId': instance.categoryId,
      'code': instance.code,
      'name': instance.name,
      'description': instance.description,
      'prompt': instance.prompt,
      'category': instance.category?.toJson(),
      'categoryName': instance.categoryName,
    };

AiPromptListDtoFilterResult _$AiPromptListDtoFilterResultFromJson(
        Map<String, dynamic> json) =>
    AiPromptListDtoFilterResult(
      totalRows: (json['totalRows'] as num?)?.toInt(),
      data: (json['data'] as List<dynamic>?)
              ?.map((e) => AiPromptListDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$AiPromptListDtoFilterResultToJson(
        AiPromptListDtoFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

AiPromptListDtoFilterResultApiResponse
    _$AiPromptListDtoFilterResultApiResponseFromJson(
            Map<String, dynamic> json) =>
        AiPromptListDtoFilterResultApiResponse(
          data: json['data'] == null
              ? null
              : AiPromptListDtoFilterResult.fromJson(
                  json['data'] as Map<String, dynamic>),
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic> _$AiPromptListDtoFilterResultApiResponseToJson(
        AiPromptListDtoFilterResultApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

AiPromptRequest _$AiPromptRequestFromJson(Map<String, dynamic> json) =>
    AiPromptRequest(
      promptCode: json['promptCode'] as String?,
      grade: (json['grade'] as num?)?.toInt(),
      categoryId: (json['categoryId'] as num?)?.toInt(),
      variables: json['variables'],
      userMessage: json['userMessage'] as String?,
      userMessageContent: (json['userMessageContent'] as List<dynamic>?)
              ?.map((e) => AiMessageContent.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      model: json['model'] as String?,
      temperature: (json['temperature'] as num?)?.toDouble(),
      maxTokens: (json['maxTokens'] as num?)?.toInt(),
    );

Map<String, dynamic> _$AiPromptRequestToJson(AiPromptRequest instance) =>
    <String, dynamic>{
      'promptCode': instance.promptCode,
      'grade': instance.grade,
      'categoryId': instance.categoryId,
      'variables': instance.variables,
      'userMessage': instance.userMessage,
      'userMessageContent':
          instance.userMessageContent?.map((e) => e.toJson()).toList(),
      'model': instance.model,
      'temperature': instance.temperature,
      'maxTokens': instance.maxTokens,
    };

AiResponse _$AiResponseFromJson(Map<String, dynamic> json) => AiResponse(
      success: json['success'] as bool?,
      content: json['content'] as String?,
      error: json['error'] as String?,
      model: json['model'] as String?,
      promptTokens: (json['promptTokens'] as num?)?.toInt(),
      completionTokens: (json['completionTokens'] as num?)?.toInt(),
      totalTokens: (json['totalTokens'] as num?)?.toInt(),
    );

Map<String, dynamic> _$AiResponseToJson(AiResponse instance) =>
    <String, dynamic>{
      'success': instance.success,
      'content': instance.content,
      'error': instance.error,
      'model': instance.model,
      'promptTokens': instance.promptTokens,
      'completionTokens': instance.completionTokens,
      'totalTokens': instance.totalTokens,
    };

AiResponseApiResponse _$AiResponseApiResponseFromJson(
        Map<String, dynamic> json) =>
    AiResponseApiResponse(
      data: json['data'] == null
          ? null
          : AiResponse.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$AiResponseApiResponseToJson(
        AiResponseApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

AssignExamAddDto _$AssignExamAddDtoFromJson(Map<String, dynamic> json) =>
    AssignExamAddDto(
      id: (json['id'] as num?)?.toInt(),
      classId: (json['classId'] as num?)?.toInt(),
      title: json['title'] as String?,
      examId: (json['examId'] as num?)?.toInt(),
      fromDate: json['fromDate'] == null
          ? null
          : DateTime.parse(json['fromDate'] as String),
      toDate: json['toDate'] == null
          ? null
          : DateTime.parse(json['toDate'] as String),
      allowDeadline: json['allowDeadline'] as bool?,
      status: assignExamStatusEnumFromJson((json['status'] as num?)?.toInt()),
      type: assignExamTypeEnumFromJson((json['type'] as num?)?.toInt()),
      allowViewAnswer: json['allowViewAnswer'] as bool?,
      duration: (json['duration'] as num?)?.toInt(),
    );

Map<String, dynamic> _$AssignExamAddDtoToJson(AssignExamAddDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'classId': instance.classId,
      'title': instance.title,
      'examId': instance.examId,
      'fromDate': instance.fromDate?.toIso8601String(),
      'toDate': instance.toDate?.toIso8601String(),
      'allowDeadline': instance.allowDeadline,
      'status': assignExamStatusEnumToJson(instance.status),
      'type': assignExamTypeEnumToJson(instance.type),
      'allowViewAnswer': instance.allowViewAnswer,
      'duration': instance.duration,
    };

AssignExamAddMultipleDto _$AssignExamAddMultipleDtoFromJson(
        Map<String, dynamic> json) =>
    AssignExamAddMultipleDto(
      classes: (json['classes'] as List<dynamic>?)
              ?.map((e) => ClassShortDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      assignExam: json['assignExam'] == null
          ? null
          : AssignExamAddDto.fromJson(
              json['assignExam'] as Map<String, dynamic>),
    );

Map<String, dynamic> _$AssignExamAddMultipleDtoToJson(
        AssignExamAddMultipleDto instance) =>
    <String, dynamic>{
      'classes': instance.classes?.map((e) => e.toJson()).toList(),
      'assignExam': instance.assignExam?.toJson(),
    };

AssignExamCheckDoExamDto _$AssignExamCheckDoExamDtoFromJson(
        Map<String, dynamic> json) =>
    AssignExamCheckDoExamDto(
      message: json['message'] as String?,
      isCanViewResult: json['isCanViewResult'] as bool?,
      classId: (json['classId'] as num?)?.toInt(),
    );

Map<String, dynamic> _$AssignExamCheckDoExamDtoToJson(
        AssignExamCheckDoExamDto instance) =>
    <String, dynamic>{
      'message': instance.message,
      'isCanViewResult': instance.isCanViewResult,
      'classId': instance.classId,
    };

AssignExamCheckDoExamDtoApiResponse
    _$AssignExamCheckDoExamDtoApiResponseFromJson(Map<String, dynamic> json) =>
        AssignExamCheckDoExamDtoApiResponse(
          data: json['data'] == null
              ? null
              : AssignExamCheckDoExamDto.fromJson(
                  json['data'] as Map<String, dynamic>),
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic> _$AssignExamCheckDoExamDtoApiResponseToJson(
        AssignExamCheckDoExamDtoApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

AssignExamCountDto _$AssignExamCountDtoFromJson(Map<String, dynamic> json) =>
    AssignExamCountDto(
      countExam: (json['countExam'] as num?)?.toInt(),
      countTest: (json['countTest'] as num?)?.toInt(),
      countExercise: (json['countExercise'] as num?)?.toInt(),
    );

Map<String, dynamic> _$AssignExamCountDtoToJson(AssignExamCountDto instance) =>
    <String, dynamic>{
      'countExam': instance.countExam,
      'countTest': instance.countTest,
      'countExercise': instance.countExercise,
    };

AssignExamCountDtoApiResponse _$AssignExamCountDtoApiResponseFromJson(
        Map<String, dynamic> json) =>
    AssignExamCountDtoApiResponse(
      data: json['data'] == null
          ? null
          : AssignExamCountDto.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$AssignExamCountDtoApiResponseToJson(
        AssignExamCountDtoApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

AssignExamDetailDto _$AssignExamDetailDtoFromJson(Map<String, dynamic> json) =>
    AssignExamDetailDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      title: json['title'] as String?,
      classId: (json['classId'] as num?)?.toInt(),
      examId: (json['examId'] as num?)?.toInt(),
      fromDate: json['fromDate'] == null
          ? null
          : DateTime.parse(json['fromDate'] as String),
      toDate: json['toDate'] == null
          ? null
          : DateTime.parse(json['toDate'] as String),
      allowDeadline: json['allowDeadline'] as bool?,
      allowViewAnswer: json['allowViewAnswer'] as bool?,
      duration: (json['duration'] as num?)?.toInt(),
      status: assignExamStatusEnumFromJson((json['status'] as num?)?.toInt()),
      type: assignExamTypeEnumFromJson((json['type'] as num?)?.toInt()),
      assignExamUsers: (json['assignExamUsers'] as List<dynamic>?)
              ?.map((e) =>
                  AssignExamUserEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      subject: json['subject'] as String?,
      questionCount: (json['questionCount'] as num?)?.toInt(),
      canEdit: json['canEdit'] as bool?,
    );

Map<String, dynamic> _$AssignExamDetailDtoToJson(
        AssignExamDetailDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'title': instance.title,
      'classId': instance.classId,
      'examId': instance.examId,
      'fromDate': instance.fromDate?.toIso8601String(),
      'toDate': instance.toDate?.toIso8601String(),
      'allowDeadline': instance.allowDeadline,
      'allowViewAnswer': instance.allowViewAnswer,
      'duration': instance.duration,
      'status': assignExamStatusEnumToJson(instance.status),
      'type': assignExamTypeEnumToJson(instance.type),
      'assignExamUsers':
          instance.assignExamUsers?.map((e) => e.toJson()).toList(),
      'subject': instance.subject,
      'questionCount': instance.questionCount,
      'canEdit': instance.canEdit,
    };

AssignExamDoneDto _$AssignExamDoneDtoFromJson(Map<String, dynamic> json) =>
    AssignExamDoneDto(
      id: (json['id'] as num?)?.toInt(),
      title: json['title'] as String?,
      endDate: json['endDate'] == null
          ? null
          : DateTime.parse(json['endDate'] as String),
      mark: (json['mark'] as num?)?.toDouble(),
      totalMark: (json['totalMark'] as num?)?.toDouble(),
      examId: (json['examId'] as num?)?.toInt(),
      examResultId: (json['examResultId'] as num?)?.toInt(),
      status:
          assignExamUserStatusEnumFromJson((json['status'] as num?)?.toInt()),
    );

Map<String, dynamic> _$AssignExamDoneDtoToJson(AssignExamDoneDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'title': instance.title,
      'endDate': instance.endDate?.toIso8601String(),
      'mark': instance.mark,
      'totalMark': instance.totalMark,
      'examId': instance.examId,
      'examResultId': instance.examResultId,
      'status': assignExamUserStatusEnumToJson(instance.status),
    };

AssignExamDoneDtoListApiResponse _$AssignExamDoneDtoListApiResponseFromJson(
        Map<String, dynamic> json) =>
    AssignExamDoneDtoListApiResponse(
      data: (json['data'] as List<dynamic>?)
              ?.map(
                  (e) => AssignExamDoneDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$AssignExamDoneDtoListApiResponseToJson(
        AssignExamDoneDtoListApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.map((e) => e.toJson()).toList(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

AssignExamEditDto _$AssignExamEditDtoFromJson(Map<String, dynamic> json) =>
    AssignExamEditDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      title: json['title'] as String?,
      classId: (json['classId'] as num?)?.toInt(),
      examId: (json['examId'] as num?)?.toInt(),
      fromDate: json['fromDate'] == null
          ? null
          : DateTime.parse(json['fromDate'] as String),
      toDate: json['toDate'] == null
          ? null
          : DateTime.parse(json['toDate'] as String),
      allowDeadline: json['allowDeadline'] as bool?,
      allowViewAnswer: json['allowViewAnswer'] as bool?,
      duration: (json['duration'] as num?)?.toInt(),
      status: assignExamStatusEnumFromJson((json['status'] as num?)?.toInt()),
      type: assignExamTypeEnumFromJson((json['type'] as num?)?.toInt()),
      assignExamUsers: (json['assignExamUsers'] as List<dynamic>?)
              ?.map((e) =>
                  AssignExamUserEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      assignUsers: (json['assignUsers'] as List<dynamic>?)
              ?.map((e) =>
                  AssignExamUserEditDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$AssignExamEditDtoToJson(AssignExamEditDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'title': instance.title,
      'classId': instance.classId,
      'examId': instance.examId,
      'fromDate': instance.fromDate?.toIso8601String(),
      'toDate': instance.toDate?.toIso8601String(),
      'allowDeadline': instance.allowDeadline,
      'allowViewAnswer': instance.allowViewAnswer,
      'duration': instance.duration,
      'status': assignExamStatusEnumToJson(instance.status),
      'type': assignExamTypeEnumToJson(instance.type),
      'assignExamUsers':
          instance.assignExamUsers?.map((e) => e.toJson()).toList(),
      'assignUsers': instance.assignUsers?.map((e) => e.toJson()).toList(),
    };

AssignExamEntity _$AssignExamEntityFromJson(Map<String, dynamic> json) =>
    AssignExamEntity(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      title: json['title'] as String?,
      classId: (json['classId'] as num?)?.toInt(),
      examId: (json['examId'] as num?)?.toInt(),
      fromDate: json['fromDate'] == null
          ? null
          : DateTime.parse(json['fromDate'] as String),
      toDate: json['toDate'] == null
          ? null
          : DateTime.parse(json['toDate'] as String),
      allowDeadline: json['allowDeadline'] as bool?,
      allowViewAnswer: json['allowViewAnswer'] as bool?,
      duration: (json['duration'] as num?)?.toInt(),
      status: assignExamStatusEnumFromJson((json['status'] as num?)?.toInt()),
      type: assignExamTypeEnumFromJson((json['type'] as num?)?.toInt()),
      assignExamUsers: (json['assignExamUsers'] as List<dynamic>?)
              ?.map((e) =>
                  AssignExamUserEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$AssignExamEntityToJson(AssignExamEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'title': instance.title,
      'classId': instance.classId,
      'examId': instance.examId,
      'fromDate': instance.fromDate?.toIso8601String(),
      'toDate': instance.toDate?.toIso8601String(),
      'allowDeadline': instance.allowDeadline,
      'allowViewAnswer': instance.allowViewAnswer,
      'duration': instance.duration,
      'status': assignExamStatusEnumToJson(instance.status),
      'type': assignExamTypeEnumToJson(instance.type),
      'assignExamUsers':
          instance.assignExamUsers?.map((e) => e.toJson()).toList(),
    };

AssignExamListByClassQuery _$AssignExamListByClassQueryFromJson(
        Map<String, dynamic> json) =>
    AssignExamListByClassQuery(
      sortExpression: json['sortExpression'] as String?,
      pageSize: (json['pageSize'] as num?)?.toInt(),
      pageIndex: (json['pageIndex'] as num?)?.toInt(),
      skip: (json['skip'] as num?)?.toInt(),
      notSkip: (json['notSkip'] as num?)?.toInt(),
      propertyIncludes: (json['propertyIncludes'] as List<dynamic>?)
              ?.map((e) => e as String)
              .toList() ??
          [],
      keyword: json['keyword'] as String?,
      subjectId: (json['subjectId'] as num?)?.toInt(),
      fromDate: json['fromDate'] == null
          ? null
          : DateTime.parse(json['fromDate'] as String),
      toDate: json['toDate'] == null
          ? null
          : DateTime.parse(json['toDate'] as String),
      classId: (json['classId'] as num?)?.toInt(),
      type: assignExamTypeEnumFromJson((json['type'] as num?)?.toInt()),
      userId: (json['userId'] as num?)?.toInt(),
      isGetAll: json['isGetAll'] as bool?,
      status: (json['status'] as num?)?.toInt(),
    );

Map<String, dynamic> _$AssignExamListByClassQueryToJson(
        AssignExamListByClassQuery instance) =>
    <String, dynamic>{
      'sortExpression': instance.sortExpression,
      'pageSize': instance.pageSize,
      'pageIndex': instance.pageIndex,
      'skip': instance.skip,
      'notSkip': instance.notSkip,
      'propertyIncludes': instance.propertyIncludes,
      'keyword': instance.keyword,
      'subjectId': instance.subjectId,
      'fromDate': instance.fromDate?.toIso8601String(),
      'toDate': instance.toDate?.toIso8601String(),
      'classId': instance.classId,
      'type': assignExamTypeEnumToJson(instance.type),
      'userId': instance.userId,
      'isGetAll': instance.isGetAll,
      'status': instance.status,
    };

AssignExamListByExamIdDto _$AssignExamListByExamIdDtoFromJson(
        Map<String, dynamic> json) =>
    AssignExamListByExamIdDto(
      id: (json['id'] as num?)?.toInt(),
      examId: (json['examId'] as num?)?.toInt(),
      className: json['className'] as String?,
      type: assignExamTypeEnumFromJson((json['type'] as num?)?.toInt()),
      fromDate: json['fromDate'] == null
          ? null
          : DateTime.parse(json['fromDate'] as String),
      countPupilDone: (json['countPupilDone'] as num?)?.toInt(),
      countPupil: (json['countPupil'] as num?)?.toInt(),
      countNeedMark: (json['countNeedMark'] as num?)?.toInt(),
      classId: (json['classId'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
    );

Map<String, dynamic> _$AssignExamListByExamIdDtoToJson(
        AssignExamListByExamIdDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'examId': instance.examId,
      'className': instance.className,
      'type': assignExamTypeEnumToJson(instance.type),
      'fromDate': instance.fromDate?.toIso8601String(),
      'countPupilDone': instance.countPupilDone,
      'countPupil': instance.countPupil,
      'countNeedMark': instance.countNeedMark,
      'classId': instance.classId,
      'createdBy': instance.createdBy,
    };

AssignExamListByExamIdDtoFilterResult
    _$AssignExamListByExamIdDtoFilterResultFromJson(
            Map<String, dynamic> json) =>
        AssignExamListByExamIdDtoFilterResult(
          totalRows: (json['totalRows'] as num?)?.toInt(),
          data: (json['data'] as List<dynamic>?)
                  ?.map((e) => AssignExamListByExamIdDto.fromJson(
                      e as Map<String, dynamic>))
                  .toList() ??
              [],
        );

Map<String, dynamic> _$AssignExamListByExamIdDtoFilterResultToJson(
        AssignExamListByExamIdDtoFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

AssignExamListByExamIdFilterDto _$AssignExamListByExamIdFilterDtoFromJson(
        Map<String, dynamic> json) =>
    AssignExamListByExamIdFilterDto(
      sortExpression: json['sortExpression'] as String?,
      pageSize: (json['pageSize'] as num?)?.toInt(),
      pageIndex: (json['pageIndex'] as num?)?.toInt(),
      skip: (json['skip'] as num?)?.toInt(),
      notSkip: (json['notSkip'] as num?)?.toInt(),
      propertyIncludes: (json['propertyIncludes'] as List<dynamic>?)
              ?.map((e) => e as String)
              .toList() ??
          [],
      examId: (json['examId'] as num?)?.toInt(),
      fromDate: json['fromDate'] == null
          ? null
          : DateTime.parse(json['fromDate'] as String),
      toDate: json['toDate'] == null
          ? null
          : DateTime.parse(json['toDate'] as String),
      type: assignExamTypeEnumFromJson((json['type'] as num?)?.toInt()),
      classId: (json['classId'] as num?)?.toInt(),
    );

Map<String, dynamic> _$AssignExamListByExamIdFilterDtoToJson(
        AssignExamListByExamIdFilterDto instance) =>
    <String, dynamic>{
      'sortExpression': instance.sortExpression,
      'pageSize': instance.pageSize,
      'pageIndex': instance.pageIndex,
      'skip': instance.skip,
      'notSkip': instance.notSkip,
      'propertyIncludes': instance.propertyIncludes,
      'examId': instance.examId,
      'fromDate': instance.fromDate?.toIso8601String(),
      'toDate': instance.toDate?.toIso8601String(),
      'type': assignExamTypeEnumToJson(instance.type),
      'classId': instance.classId,
    };

AssignExamListDto _$AssignExamListDtoFromJson(Map<String, dynamic> json) =>
    AssignExamListDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      classId: (json['classId'] as num?)?.toInt(),
      title: json['title'] as String?,
      subjectId: (json['subjectId'] as num?)?.toInt(),
      subject: json['subject'] as String?,
      fromDate: json['fromDate'] == null
          ? null
          : DateTime.parse(json['fromDate'] as String),
      isHot: json['isHot'] as bool?,
      toDate: json['toDate'] == null
          ? null
          : DateTime.parse(json['toDate'] as String),
      status: assignExamStatusEnumFromJson((json['status'] as num?)?.toInt()),
      countPupil: (json['countPupil'] as num?)?.toInt(),
      countPupilDone: (json['countPupilDone'] as num?)?.toInt(),
      isOwner: json['isOwner'] as bool?,
      isTeacher: json['isTeacher'] as bool?,
      examId: (json['examId'] as num?)?.toInt(),
      mark: (json['mark'] as num?)?.toDouble(),
      userStatus: assignExamUserStatusEnumFromJson(
          (json['userStatus'] as num?)?.toInt()),
      examResultId: (json['examResultId'] as num?)?.toInt(),
      allowViewAnswer: json['allowViewAnswer'] as bool?,
      pupilSubmissionTime: json['pupilSubmissionTime'] == null
          ? null
          : DateTime.parse(json['pupilSubmissionTime'] as String),
      countNeedMark: (json['countNeedMark'] as num?)?.toInt(),
      duration: (json['duration'] as num?)?.toInt(),
    );

Map<String, dynamic> _$AssignExamListDtoToJson(AssignExamListDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'classId': instance.classId,
      'title': instance.title,
      'subjectId': instance.subjectId,
      'subject': instance.subject,
      'fromDate': instance.fromDate?.toIso8601String(),
      'isHot': instance.isHot,
      'toDate': instance.toDate?.toIso8601String(),
      'status': assignExamStatusEnumToJson(instance.status),
      'countPupil': instance.countPupil,
      'countPupilDone': instance.countPupilDone,
      'isOwner': instance.isOwner,
      'isTeacher': instance.isTeacher,
      'examId': instance.examId,
      'mark': instance.mark,
      'userStatus': assignExamUserStatusEnumToJson(instance.userStatus),
      'examResultId': instance.examResultId,
      'allowViewAnswer': instance.allowViewAnswer,
      'pupilSubmissionTime': instance.pupilSubmissionTime?.toIso8601String(),
      'countNeedMark': instance.countNeedMark,
      'duration': instance.duration,
    };

AssignExamListDtoFilterResult _$AssignExamListDtoFilterResultFromJson(
        Map<String, dynamic> json) =>
    AssignExamListDtoFilterResult(
      totalRows: (json['totalRows'] as num?)?.toInt(),
      data: (json['data'] as List<dynamic>?)
              ?.map(
                  (e) => AssignExamListDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$AssignExamListDtoFilterResultToJson(
        AssignExamListDtoFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

AssignExamListExamDto _$AssignExamListExamDtoFromJson(
        Map<String, dynamic> json) =>
    AssignExamListExamDto(
      id: (json['id'] as num?)?.toInt(),
      title: json['title'] as String?,
      subject: json['subject'] as String?,
      fromDate: json['fromDate'] == null
          ? null
          : DateTime.parse(json['fromDate'] as String),
      toDate: json['toDate'] == null
          ? null
          : DateTime.parse(json['toDate'] as String),
      status: assignExamStatusEnumFromJson((json['status'] as num?)?.toInt()),
      type: assignExamTypeEnumFromJson((json['type'] as num?)?.toInt()),
    );

Map<String, dynamic> _$AssignExamListExamDtoToJson(
        AssignExamListExamDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'title': instance.title,
      'subject': instance.subject,
      'fromDate': instance.fromDate?.toIso8601String(),
      'toDate': instance.toDate?.toIso8601String(),
      'status': assignExamStatusEnumToJson(instance.status),
      'type': assignExamTypeEnumToJson(instance.type),
    };

AssignExamListExamDtoFilterResult _$AssignExamListExamDtoFilterResultFromJson(
        Map<String, dynamic> json) =>
    AssignExamListExamDtoFilterResult(
      totalRows: (json['totalRows'] as num?)?.toInt(),
      data: (json['data'] as List<dynamic>?)
              ?.map((e) =>
                  AssignExamListExamDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$AssignExamListExamDtoFilterResultToJson(
        AssignExamListExamDtoFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

AssignExamListExamDtoFilterResultApiResponse
    _$AssignExamListExamDtoFilterResultApiResponseFromJson(
            Map<String, dynamic> json) =>
        AssignExamListExamDtoFilterResultApiResponse(
          data: json['data'] == null
              ? null
              : AssignExamListExamDtoFilterResult.fromJson(
                  json['data'] as Map<String, dynamic>),
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic> _$AssignExamListExamDtoFilterResultApiResponseToJson(
        AssignExamListExamDtoFilterResultApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

AssignExamListExamFilterDto _$AssignExamListExamFilterDtoFromJson(
        Map<String, dynamic> json) =>
    AssignExamListExamFilterDto(
      sortExpression: json['sortExpression'] as String?,
      pageSize: (json['pageSize'] as num?)?.toInt(),
      pageIndex: (json['pageIndex'] as num?)?.toInt(),
      skip: (json['skip'] as num?)?.toInt(),
      notSkip: (json['notSkip'] as num?)?.toInt(),
      propertyIncludes: (json['propertyIncludes'] as List<dynamic>?)
              ?.map((e) => e as String)
              .toList() ??
          [],
      keyword: json['keyword'] as String?,
      userId: (json['userId'] as num?)?.toInt(),
      userStatus: assignExamUserStatusEnumFromJson(
          (json['userStatus'] as num?)?.toInt()),
    );

Map<String, dynamic> _$AssignExamListExamFilterDtoToJson(
        AssignExamListExamFilterDto instance) =>
    <String, dynamic>{
      'sortExpression': instance.sortExpression,
      'pageSize': instance.pageSize,
      'pageIndex': instance.pageIndex,
      'skip': instance.skip,
      'notSkip': instance.notSkip,
      'propertyIncludes': instance.propertyIncludes,
      'keyword': instance.keyword,
      'userId': instance.userId,
      'userStatus': assignExamUserStatusEnumToJson(instance.userStatus),
    };

AssignExamListUserDto _$AssignExamListUserDtoFromJson(
        Map<String, dynamic> json) =>
    AssignExamListUserDto(
      assignExamId: (json['assignExamId'] as num?)?.toInt(),
      userId: (json['userId'] as num?)?.toInt(),
      status:
          assignExamUserStatusEnumFromJson((json['status'] as num?)?.toInt()),
      examResultId: (json['examResultId'] as num?)?.toInt(),
      startDate: json['startDate'] == null
          ? null
          : DateTime.parse(json['startDate'] as String),
      mark: (json['mark'] as num?)?.toDouble(),
      duration: (json['duration'] as num?)?.toInt(),
      endDate: json['endDate'] == null
          ? null
          : DateTime.parse(json['endDate'] as String),
      note: json['note'] as String?,
      avatar: json['avatar'] as String?,
      fullName: json['fullName'] as String?,
      overdue: json['overdue'] as bool?,
      timeMarking: json['timeMarking'] == null
          ? null
          : DateTime.parse(json['timeMarking'] as String),
    );

Map<String, dynamic> _$AssignExamListUserDtoToJson(
        AssignExamListUserDto instance) =>
    <String, dynamic>{
      'assignExamId': instance.assignExamId,
      'userId': instance.userId,
      'status': assignExamUserStatusEnumToJson(instance.status),
      'examResultId': instance.examResultId,
      'startDate': instance.startDate?.toIso8601String(),
      'mark': instance.mark,
      'duration': instance.duration,
      'endDate': instance.endDate?.toIso8601String(),
      'note': instance.note,
      'avatar': instance.avatar,
      'fullName': instance.fullName,
      'overdue': instance.overdue,
      'timeMarking': instance.timeMarking?.toIso8601String(),
    };

AssignExamListUserFilterDto _$AssignExamListUserFilterDtoFromJson(
        Map<String, dynamic> json) =>
    AssignExamListUserFilterDto(
      keyword: json['keyword'] as String?,
      id: (json['id'] as num?)?.toInt(),
      fromDate: json['fromDate'] == null
          ? null
          : DateTime.parse(json['fromDate'] as String),
      toDate: json['toDate'] == null
          ? null
          : DateTime.parse(json['toDate'] as String),
      status:
          assignExamUserStatusEnumFromJson((json['status'] as num?)?.toInt()),
      sortExpression: json['sortExpression'] as String?,
    );

Map<String, dynamic> _$AssignExamListUserFilterDtoToJson(
        AssignExamListUserFilterDto instance) =>
    <String, dynamic>{
      'keyword': instance.keyword,
      'id': instance.id,
      'fromDate': instance.fromDate?.toIso8601String(),
      'toDate': instance.toDate?.toIso8601String(),
      'status': assignExamUserStatusEnumToJson(instance.status),
      'sortExpression': instance.sortExpression,
    };

AssignExamNeedDoDto _$AssignExamNeedDoDtoFromJson(Map<String, dynamic> json) =>
    AssignExamNeedDoDto(
      examId: (json['examId'] as num?)?.toInt(),
      id: (json['id'] as num?)?.toInt(),
      title: json['title'] as String?,
      subjectId: (json['subjectId'] as num?)?.toInt(),
      subject: json['subject'] as String?,
      toDate: json['toDate'] == null
          ? null
          : DateTime.parse(json['toDate'] as String),
      type: assignExamTypeEnumFromJson((json['type'] as num?)?.toInt()),
      duration: (json['duration'] as num?)?.toInt(),
    );

Map<String, dynamic> _$AssignExamNeedDoDtoToJson(
        AssignExamNeedDoDto instance) =>
    <String, dynamic>{
      'examId': instance.examId,
      'id': instance.id,
      'title': instance.title,
      'subjectId': instance.subjectId,
      'subject': instance.subject,
      'toDate': instance.toDate?.toIso8601String(),
      'type': assignExamTypeEnumToJson(instance.type),
      'duration': instance.duration,
    };

AssignExamNeedDoDtoListApiResponse _$AssignExamNeedDoDtoListApiResponseFromJson(
        Map<String, dynamic> json) =>
    AssignExamNeedDoDtoListApiResponse(
      data: (json['data'] as List<dynamic>?)
              ?.map((e) =>
                  AssignExamNeedDoDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$AssignExamNeedDoDtoListApiResponseToJson(
        AssignExamNeedDoDtoListApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.map((e) => e.toJson()).toList(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

AssignExamScoreDistributionDto _$AssignExamScoreDistributionDtoFromJson(
        Map<String, dynamic> json) =>
    AssignExamScoreDistributionDto(
      scoreName: json['scoreName'] as String?,
      count: (json['count'] as num?)?.toInt(),
    );

Map<String, dynamic> _$AssignExamScoreDistributionDtoToJson(
        AssignExamScoreDistributionDto instance) =>
    <String, dynamic>{
      'scoreName': instance.scoreName,
      'count': instance.count,
    };

AssignExamScoreDistributionDtoListApiResponse
    _$AssignExamScoreDistributionDtoListApiResponseFromJson(
            Map<String, dynamic> json) =>
        AssignExamScoreDistributionDtoListApiResponse(
          data: (json['data'] as List<dynamic>?)
                  ?.map((e) => AssignExamScoreDistributionDto.fromJson(
                      e as Map<String, dynamic>))
                  .toList() ??
              [],
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic> _$AssignExamScoreDistributionDtoListApiResponseToJson(
        AssignExamScoreDistributionDtoListApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.map((e) => e.toJson()).toList(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

AssignExamTopDifficultQuestionDto _$AssignExamTopDifficultQuestionDtoFromJson(
        Map<String, dynamic> json) =>
    AssignExamTopDifficultQuestionDto(
      questionId: (json['questionId'] as num?)?.toInt(),
      question: json['question'] as String?,
      count: (json['count'] as num?)?.toInt(),
    );

Map<String, dynamic> _$AssignExamTopDifficultQuestionDtoToJson(
        AssignExamTopDifficultQuestionDto instance) =>
    <String, dynamic>{
      'questionId': instance.questionId,
      'question': instance.question,
      'count': instance.count,
    };

AssignExamTopDifficultQuestionDtoListApiResponse
    _$AssignExamTopDifficultQuestionDtoListApiResponseFromJson(
            Map<String, dynamic> json) =>
        AssignExamTopDifficultQuestionDtoListApiResponse(
          data: (json['data'] as List<dynamic>?)
                  ?.map((e) => AssignExamTopDifficultQuestionDto.fromJson(
                      e as Map<String, dynamic>))
                  .toList() ??
              [],
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic> _$AssignExamTopDifficultQuestionDtoListApiResponseToJson(
        AssignExamTopDifficultQuestionDtoListApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.map((e) => e.toJson()).toList(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

AssignExamUpdateNoteDto _$AssignExamUpdateNoteDtoFromJson(
        Map<String, dynamic> json) =>
    AssignExamUpdateNoteDto(
      id: (json['id'] as num?)?.toInt(),
      userId: (json['userId'] as num?)?.toInt(),
      note: json['note'] as String?,
    );

Map<String, dynamic> _$AssignExamUpdateNoteDtoToJson(
        AssignExamUpdateNoteDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'userId': instance.userId,
      'note': instance.note,
    };

AssignExamUpdateTimeDto _$AssignExamUpdateTimeDtoFromJson(
        Map<String, dynamic> json) =>
    AssignExamUpdateTimeDto(
      id: (json['id'] as num?)?.toInt(),
      time:
          json['time'] == null ? null : DateTime.parse(json['time'] as String),
    );

Map<String, dynamic> _$AssignExamUpdateTimeDtoToJson(
        AssignExamUpdateTimeDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'time': instance.time?.toIso8601String(),
    };

AssignExamUserEditDto _$AssignExamUserEditDtoFromJson(
        Map<String, dynamic> json) =>
    AssignExamUserEditDto(
      assignExamId: (json['assignExamId'] as num?)?.toInt(),
      userId: (json['userId'] as num?)?.toInt(),
      status:
          assignExamUserStatusEnumFromJson((json['status'] as num?)?.toInt()),
      examResultId: (json['examResultId'] as num?)?.toInt(),
      startDate: json['startDate'] == null
          ? null
          : DateTime.parse(json['startDate'] as String),
      mark: (json['mark'] as num?)?.toDouble(),
      duration: (json['duration'] as num?)?.toInt(),
      endDate: json['endDate'] == null
          ? null
          : DateTime.parse(json['endDate'] as String),
      note: json['note'] as String?,
      classUserId: (json['classUserId'] as num?)?.toInt(),
    );

Map<String, dynamic> _$AssignExamUserEditDtoToJson(
        AssignExamUserEditDto instance) =>
    <String, dynamic>{
      'assignExamId': instance.assignExamId,
      'userId': instance.userId,
      'status': assignExamUserStatusEnumToJson(instance.status),
      'examResultId': instance.examResultId,
      'startDate': instance.startDate?.toIso8601String(),
      'mark': instance.mark,
      'duration': instance.duration,
      'endDate': instance.endDate?.toIso8601String(),
      'note': instance.note,
      'classUserId': instance.classUserId,
    };

AssignExamUserEntity _$AssignExamUserEntityFromJson(
        Map<String, dynamic> json) =>
    AssignExamUserEntity(
      assignExamId: (json['assignExamId'] as num?)?.toInt(),
      userId: (json['userId'] as num?)?.toInt(),
      status:
          assignExamUserStatusEnumFromJson((json['status'] as num?)?.toInt()),
      examResultId: (json['examResultId'] as num?)?.toInt(),
      startDate: json['startDate'] == null
          ? null
          : DateTime.parse(json['startDate'] as String),
      mark: (json['mark'] as num?)?.toDouble(),
      duration: (json['duration'] as num?)?.toInt(),
      endDate: json['endDate'] == null
          ? null
          : DateTime.parse(json['endDate'] as String),
      note: json['note'] as String?,
    );

Map<String, dynamic> _$AssignExamUserEntityToJson(
        AssignExamUserEntity instance) =>
    <String, dynamic>{
      'assignExamId': instance.assignExamId,
      'userId': instance.userId,
      'status': assignExamUserStatusEnumToJson(instance.status),
      'examResultId': instance.examResultId,
      'startDate': instance.startDate?.toIso8601String(),
      'mark': instance.mark,
      'duration': instance.duration,
      'endDate': instance.endDate?.toIso8601String(),
      'note': instance.note,
    };

AssignExistingTeacherDto _$AssignExistingTeacherDtoFromJson(
        Map<String, dynamic> json) =>
    AssignExistingTeacherDto(
      schoolId: (json['schoolId'] as num?)?.toInt(),
      userId: (json['userId'] as num?)?.toInt(),
      subject: (json['subject'] as List<dynamic>?)
              ?.map((e) => (e as num).toInt())
              .toList() ??
          [],
      classManage: (json['classManage'] as List<dynamic>?)
              ?.map((e) => (e as num).toInt())
              .toList() ??
          [],
      classList: (json['classList'] as List<dynamic>?)
              ?.map((e) => (e as num).toInt())
              .toList() ??
          [],
    );

Map<String, dynamic> _$AssignExistingTeacherDtoToJson(
        AssignExistingTeacherDto instance) =>
    <String, dynamic>{
      'schoolId': instance.schoolId,
      'userId': instance.userId,
      'subject': instance.subject,
      'classManage': instance.classManage,
      'classList': instance.classList,
    };

BooleanApiResponse _$BooleanApiResponseFromJson(Map<String, dynamic> json) =>
    BooleanApiResponse(
      data: json['data'] as bool?,
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$BooleanApiResponseToJson(BooleanApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data,
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

CartAddItemDto _$CartAddItemDtoFromJson(Map<String, dynamic> json) =>
    CartAddItemDto(
      productId: (json['productId'] as num?)?.toInt(),
      quantity: (json['quantity'] as num?)?.toInt(),
    );

Map<String, dynamic> _$CartAddItemDtoToJson(CartAddItemDto instance) =>
    <String, dynamic>{
      'productId': instance.productId,
      'quantity': instance.quantity,
    };

CartDto _$CartDtoFromJson(Map<String, dynamic> json) => CartDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      userId: (json['userId'] as num?)?.toInt(),
      notes: json['notes'] as String?,
      items: (json['items'] as List<dynamic>?)
              ?.map((e) => CartItemDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$CartDtoToJson(CartDto instance) => <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'userId': instance.userId,
      'notes': instance.notes,
      'items': instance.items?.map((e) => e.toJson()).toList(),
    };

CartDtoApiResponse _$CartDtoApiResponseFromJson(Map<String, dynamic> json) =>
    CartDtoApiResponse(
      data: json['data'] == null
          ? null
          : CartDto.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$CartDtoApiResponseToJson(CartDtoApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

CartEntity _$CartEntityFromJson(Map<String, dynamic> json) => CartEntity(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      userId: (json['userId'] as num?)?.toInt(),
      notes: json['notes'] as String?,
      items: (json['items'] as List<dynamic>?)
              ?.map((e) => CartItemEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$CartEntityToJson(CartEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'userId': instance.userId,
      'notes': instance.notes,
      'items': instance.items?.map((e) => e.toJson()).toList(),
    };

CartItemDto _$CartItemDtoFromJson(Map<String, dynamic> json) => CartItemDto(
      id: (json['id'] as num?)?.toInt(),
      cartId: (json['cartId'] as num?)?.toInt(),
      productId: (json['productId'] as num?)?.toInt(),
      quantity: (json['quantity'] as num?)?.toInt(),
      product: json['product'] == null
          ? null
          : ProductListDto.fromJson(json['product'] as Map<String, dynamic>),
    );

Map<String, dynamic> _$CartItemDtoToJson(CartItemDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'cartId': instance.cartId,
      'productId': instance.productId,
      'quantity': instance.quantity,
      'product': instance.product?.toJson(),
    };

CartItemEntity _$CartItemEntityFromJson(Map<String, dynamic> json) =>
    CartItemEntity(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      cartId: (json['cartId'] as num?)?.toInt(),
      productId: (json['productId'] as num?)?.toInt(),
      quantity: (json['quantity'] as num?)?.toInt(),
      cart: json['cart'] == null
          ? null
          : CartEntity.fromJson(json['cart'] as Map<String, dynamic>),
      product: json['product'] == null
          ? null
          : ProductEntity.fromJson(json['product'] as Map<String, dynamic>),
    );

Map<String, dynamic> _$CartItemEntityToJson(CartItemEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'cartId': instance.cartId,
      'productId': instance.productId,
      'quantity': instance.quantity,
      'cart': instance.cart?.toJson(),
      'product': instance.product?.toJson(),
    };

CartUpdateItemDto _$CartUpdateItemDtoFromJson(Map<String, dynamic> json) =>
    CartUpdateItemDto(
      cartItemId: (json['cartItemId'] as num?)?.toInt(),
      quantity: (json['quantity'] as num?)?.toInt(),
    );

Map<String, dynamic> _$CartUpdateItemDtoToJson(CartUpdateItemDto instance) =>
    <String, dynamic>{
      'cartItemId': instance.cartItemId,
      'quantity': instance.quantity,
    };

CategoryClassLevelEntity _$CategoryClassLevelEntityFromJson(
        Map<String, dynamic> json) =>
    CategoryClassLevelEntity(
      categoryId: (json['categoryId'] as num?)?.toInt(),
      classLevel: (json['classLevel'] as num?)?.toInt(),
      category: json['category'] == null
          ? null
          : CategoryEntity.fromJson(json['category'] as Map<String, dynamic>),
    );

Map<String, dynamic> _$CategoryClassLevelEntityToJson(
        CategoryClassLevelEntity instance) =>
    <String, dynamic>{
      'categoryId': instance.categoryId,
      'classLevel': instance.classLevel,
      'category': instance.category?.toJson(),
    };

CategoryEntity _$CategoryEntityFromJson(Map<String, dynamic> json) =>
    CategoryEntity(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      name: json['name'] as String?,
      description: json['description'] as String?,
      url: json['url'] as String?,
      code: json['code'] as String?,
      parentId: (json['parentId'] as num?)?.toInt(),
      level: (json['level'] as num?)?.toInt(),
      path: json['path'] as String?,
      icon: json['icon'] as String?,
      status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()),
      categoryClassLevels: (json['categoryClassLevels'] as List<dynamic>?)
              ?.map((e) =>
                  CategoryClassLevelEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$CategoryEntityToJson(CategoryEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'name': instance.name,
      'description': instance.description,
      'url': instance.url,
      'code': instance.code,
      'parentId': instance.parentId,
      'level': instance.level,
      'path': instance.path,
      'icon': instance.icon,
      'status': commonStatusEnumToJson(instance.status),
      'categoryClassLevels':
          instance.categoryClassLevels?.map((e) => e.toJson()).toList(),
    };

CategoryEntityApiResponse _$CategoryEntityApiResponseFromJson(
        Map<String, dynamic> json) =>
    CategoryEntityApiResponse(
      data: json['data'] == null
          ? null
          : CategoryEntity.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$CategoryEntityApiResponseToJson(
        CategoryEntityApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

CategoryGetListQuery _$CategoryGetListQueryFromJson(
        Map<String, dynamic> json) =>
    CategoryGetListQuery(
      sortExpression: json['sortExpression'] as String?,
      pageSize: (json['pageSize'] as num?)?.toInt(),
      pageIndex: (json['pageIndex'] as num?)?.toInt(),
      skip: (json['skip'] as num?)?.toInt(),
      notSkip: (json['notSkip'] as num?)?.toInt(),
      propertyIncludes: (json['propertyIncludes'] as List<dynamic>?)
              ?.map((e) => e as String)
              .toList() ??
          [],
      keyword: json['keyword'] as String?,
      zoneId: (json['zoneId'] as num?)?.toInt(),
      code: json['code'] as String?,
    );

Map<String, dynamic> _$CategoryGetListQueryToJson(
        CategoryGetListQuery instance) =>
    <String, dynamic>{
      'sortExpression': instance.sortExpression,
      'pageSize': instance.pageSize,
      'pageIndex': instance.pageIndex,
      'skip': instance.skip,
      'notSkip': instance.notSkip,
      'propertyIncludes': instance.propertyIncludes,
      'keyword': instance.keyword,
      'zoneId': instance.zoneId,
      'code': instance.code,
    };

CategoryGetListWithGalleryCountQuery
    _$CategoryGetListWithGalleryCountQueryFromJson(Map<String, dynamic> json) =>
        CategoryGetListWithGalleryCountQuery(
          code: json['code'] as String?,
          includeTotal: json['includeTotal'] as bool?,
        );

Map<String, dynamic> _$CategoryGetListWithGalleryCountQueryToJson(
        CategoryGetListWithGalleryCountQuery instance) =>
    <String, dynamic>{
      'code': instance.code,
      'includeTotal': instance.includeTotal,
    };

CategoryGetListWithNewsCountQuery _$CategoryGetListWithNewsCountQueryFromJson(
        Map<String, dynamic> json) =>
    CategoryGetListWithNewsCountQuery(
      code: json['code'] as String?,
      includeTotal: json['includeTotal'] as bool?,
    );

Map<String, dynamic> _$CategoryGetListWithNewsCountQueryToJson(
        CategoryGetListWithNewsCountQuery instance) =>
    <String, dynamic>{
      'code': instance.code,
      'includeTotal': instance.includeTotal,
    };

CategoryListDto _$CategoryListDtoFromJson(Map<String, dynamic> json) =>
    CategoryListDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      name: json['name'] as String?,
      description: json['description'] as String?,
      url: json['url'] as String?,
      code: json['code'] as String?,
      parentId: (json['parentId'] as num?)?.toInt(),
      level: (json['level'] as num?)?.toInt(),
      path: json['path'] as String?,
      icon: json['icon'] as String?,
      status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()),
      categoryClassLevels: (json['categoryClassLevels'] as List<dynamic>?)
              ?.map((e) =>
                  CategoryClassLevelEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$CategoryListDtoToJson(CategoryListDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'name': instance.name,
      'description': instance.description,
      'url': instance.url,
      'code': instance.code,
      'parentId': instance.parentId,
      'level': instance.level,
      'path': instance.path,
      'icon': instance.icon,
      'status': commonStatusEnumToJson(instance.status),
      'categoryClassLevels':
          instance.categoryClassLevels?.map((e) => e.toJson()).toList(),
    };

CategoryListDtoFilterResult _$CategoryListDtoFilterResultFromJson(
        Map<String, dynamic> json) =>
    CategoryListDtoFilterResult(
      totalRows: (json['totalRows'] as num?)?.toInt(),
      data: (json['data'] as List<dynamic>?)
              ?.map((e) => CategoryListDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$CategoryListDtoFilterResultToJson(
        CategoryListDtoFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

CategoryListDtoFilterResultApiResponse
    _$CategoryListDtoFilterResultApiResponseFromJson(
            Map<String, dynamic> json) =>
        CategoryListDtoFilterResultApiResponse(
          data: json['data'] == null
              ? null
              : CategoryListDtoFilterResult.fromJson(
                  json['data'] as Map<String, dynamic>),
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic> _$CategoryListDtoFilterResultApiResponseToJson(
        CategoryListDtoFilterResultApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

CategoryWithGalleryCountDto _$CategoryWithGalleryCountDtoFromJson(
        Map<String, dynamic> json) =>
    CategoryWithGalleryCountDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      name: json['name'] as String?,
      description: json['description'] as String?,
      url: json['url'] as String?,
      code: json['code'] as String?,
      parentId: (json['parentId'] as num?)?.toInt(),
      level: (json['level'] as num?)?.toInt(),
      path: json['path'] as String?,
      icon: json['icon'] as String?,
      status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()),
      categoryClassLevels: (json['categoryClassLevels'] as List<dynamic>?)
              ?.map((e) =>
                  CategoryClassLevelEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      galleryCount: (json['galleryCount'] as num?)?.toInt(),
    );

Map<String, dynamic> _$CategoryWithGalleryCountDtoToJson(
        CategoryWithGalleryCountDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'name': instance.name,
      'description': instance.description,
      'url': instance.url,
      'code': instance.code,
      'parentId': instance.parentId,
      'level': instance.level,
      'path': instance.path,
      'icon': instance.icon,
      'status': commonStatusEnumToJson(instance.status),
      'categoryClassLevels':
          instance.categoryClassLevels?.map((e) => e.toJson()).toList(),
      'galleryCount': instance.galleryCount,
    };

CategoryWithGalleryCountDtoListApiResponse
    _$CategoryWithGalleryCountDtoListApiResponseFromJson(
            Map<String, dynamic> json) =>
        CategoryWithGalleryCountDtoListApiResponse(
          data: (json['data'] as List<dynamic>?)
                  ?.map((e) => CategoryWithGalleryCountDto.fromJson(
                      e as Map<String, dynamic>))
                  .toList() ??
              [],
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic> _$CategoryWithGalleryCountDtoListApiResponseToJson(
        CategoryWithGalleryCountDtoListApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.map((e) => e.toJson()).toList(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

CategoryWithNewsCountDto _$CategoryWithNewsCountDtoFromJson(
        Map<String, dynamic> json) =>
    CategoryWithNewsCountDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      name: json['name'] as String?,
      description: json['description'] as String?,
      url: json['url'] as String?,
      code: json['code'] as String?,
      parentId: (json['parentId'] as num?)?.toInt(),
      level: (json['level'] as num?)?.toInt(),
      path: json['path'] as String?,
      icon: json['icon'] as String?,
      status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()),
      categoryClassLevels: (json['categoryClassLevels'] as List<dynamic>?)
              ?.map((e) =>
                  CategoryClassLevelEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      newsCount: (json['newsCount'] as num?)?.toInt(),
    );

Map<String, dynamic> _$CategoryWithNewsCountDtoToJson(
        CategoryWithNewsCountDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'name': instance.name,
      'description': instance.description,
      'url': instance.url,
      'code': instance.code,
      'parentId': instance.parentId,
      'level': instance.level,
      'path': instance.path,
      'icon': instance.icon,
      'status': commonStatusEnumToJson(instance.status),
      'categoryClassLevels':
          instance.categoryClassLevels?.map((e) => e.toJson()).toList(),
      'newsCount': instance.newsCount,
    };

CategoryWithNewsCountDtoListApiResponse
    _$CategoryWithNewsCountDtoListApiResponseFromJson(
            Map<String, dynamic> json) =>
        CategoryWithNewsCountDtoListApiResponse(
          data: (json['data'] as List<dynamic>?)
                  ?.map((e) => CategoryWithNewsCountDto.fromJson(
                      e as Map<String, dynamic>))
                  .toList() ??
              [],
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic> _$CategoryWithNewsCountDtoListApiResponseToJson(
        CategoryWithNewsCountDtoListApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.map((e) => e.toJson()).toList(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

ChangeEmailDto _$ChangeEmailDtoFromJson(Map<String, dynamic> json) =>
    ChangeEmailDto(
      id: (json['id'] as num?)?.toInt(),
      password: json['password'] as String?,
      email: json['email'] as String?,
    );

Map<String, dynamic> _$ChangeEmailDtoToJson(ChangeEmailDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'password': instance.password,
      'email': instance.email,
    };

ChangePasswordDto _$ChangePasswordDtoFromJson(Map<String, dynamic> json) =>
    ChangePasswordDto(
      oldPassword: json['oldPassword'] as String?,
      newPassword: json['newPassword'] as String?,
      reNewPassword: json['reNewPassword'] as String?,
    );

Map<String, dynamic> _$ChangePasswordDtoToJson(ChangePasswordDto instance) =>
    <String, dynamic>{
      'oldPassword': instance.oldPassword,
      'newPassword': instance.newPassword,
      'reNewPassword': instance.reNewPassword,
    };

ChatGroupDetailDto _$ChatGroupDetailDtoFromJson(Map<String, dynamic> json) =>
    ChatGroupDetailDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      name: json['name'] as String?,
      avatar: json['avatar'] as String?,
      status: (json['status'] as num?)?.toInt(),
      type: (json['type'] as num?)?.toInt(),
      documentId: (json['documentId'] as num?)?.toInt(),
      listUserOfGroup: (json['listUserOfGroup'] as List<dynamic>?)
              ?.map((e) =>
                  UserWithSimpleInfoDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      isOnline: json['isOnline'] as bool?,
    );

Map<String, dynamic> _$ChatGroupDetailDtoToJson(ChatGroupDetailDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'name': instance.name,
      'avatar': instance.avatar,
      'status': instance.status,
      'type': instance.type,
      'documentId': instance.documentId,
      'listUserOfGroup':
          instance.listUserOfGroup?.map((e) => e.toJson()).toList(),
      'isOnline': instance.isOnline,
    };

ChatGroupDetailDtoApiResponse _$ChatGroupDetailDtoApiResponseFromJson(
        Map<String, dynamic> json) =>
    ChatGroupDetailDtoApiResponse(
      data: json['data'] == null
          ? null
          : ChatGroupDetailDto.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$ChatGroupDetailDtoApiResponseToJson(
        ChatGroupDetailDtoApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

ChatGroupEntity _$ChatGroupEntityFromJson(Map<String, dynamic> json) =>
    ChatGroupEntity(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      name: json['name'] as String?,
      avatar: json['avatar'] as String?,
      status: (json['status'] as num?)?.toInt(),
      type: (json['type'] as num?)?.toInt(),
      documentId: (json['documentId'] as num?)?.toInt(),
    );

Map<String, dynamic> _$ChatGroupEntityToJson(ChatGroupEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'name': instance.name,
      'avatar': instance.avatar,
      'status': instance.status,
      'type': instance.type,
      'documentId': instance.documentId,
    };

ChatGroupEntityApiResponse _$ChatGroupEntityApiResponseFromJson(
        Map<String, dynamic> json) =>
    ChatGroupEntityApiResponse(
      data: json['data'] == null
          ? null
          : ChatGroupEntity.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$ChatGroupEntityApiResponseToJson(
        ChatGroupEntityApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

ClassAddListUserCommand _$ClassAddListUserCommandFromJson(
        Map<String, dynamic> json) =>
    ClassAddListUserCommand(
      userIds: (json['userIds'] as List<dynamic>?)
              ?.map((e) => (e as num).toInt())
              .toList() ??
          [],
      classId: (json['classId'] as num?)?.toInt(),
      role: classUserRoleEnumFromJson((json['role'] as num?)?.toInt()),
    );

Map<String, dynamic> _$ClassAddListUserCommandToJson(
        ClassAddListUserCommand instance) =>
    <String, dynamic>{
      'userIds': instance.userIds,
      'classId': instance.classId,
      'role': classUserRoleEnumToJson(instance.role),
    };

ClassByUserDto _$ClassByUserDtoFromJson(Map<String, dynamic> json) =>
    ClassByUserDto(
      id: (json['id'] as num?)?.toInt(),
      name: json['name'] as String?,
    );

Map<String, dynamic> _$ClassByUserDtoToJson(ClassByUserDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'name': instance.name,
    };

ClassChangeClassCommand _$ClassChangeClassCommandFromJson(
        Map<String, dynamic> json) =>
    ClassChangeClassCommand(
      userIds: (json['userIds'] as List<dynamic>?)
              ?.map((e) => (e as num).toInt())
              .toList() ??
          [],
      oldClassId: (json['oldClassId'] as num?)?.toInt(),
      newClassId: (json['newClassId'] as num?)?.toInt(),
      status: classUserStatusEnumFromJson((json['status'] as num?)?.toInt()),
    );

Map<String, dynamic> _$ClassChangeClassCommandToJson(
        ClassChangeClassCommand instance) =>
    <String, dynamic>{
      'userIds': instance.userIds,
      'oldClassId': instance.oldClassId,
      'newClassId': instance.newClassId,
      'status': classUserStatusEnumToJson(instance.status),
    };

ClassDetailDto _$ClassDetailDtoFromJson(Map<String, dynamic> json) =>
    ClassDetailDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      name: json['name'] as String?,
      schoolId: (json['schoolId'] as num?)?.toInt(),
      academicYearId: (json['academicYearId'] as num?)?.toInt(),
      status: classStatusEnumFromJson((json['status'] as num?)?.toInt()),
      grade: (json['grade'] as num?)?.toInt(),
      classProgramTypeId: (json['classProgramTypeId'] as num?)?.toInt(),
      classProgramType: json['classProgramType'] == null
          ? null
          : ClassProgramTypeEntity.fromJson(
              json['classProgramType'] as Map<String, dynamic>),
      classType: classTypeEnumFromJson((json['classType'] as num?)?.toInt()),
      productId: (json['productId'] as num?)?.toInt(),
      maxStudents: (json['maxStudents'] as num?)?.toInt(),
      startDate: json['startDate'] == null
          ? null
          : DateTime.parse(json['startDate'] as String),
      endDate: json['endDate'] == null
          ? null
          : DateTime.parse(json['endDate'] as String),
      zoomMeetingId: json['zoomMeetingId'] as String?,
      zoomPassword: json['zoomPassword'] as String?,
      description: json['description'] as String?,
      zoomHostVideo: json['zoomHostVideo'] as bool?,
      zoomParticipantVideo: json['zoomParticipantVideo'] as bool?,
      zoomJoinBeforeHost: json['zoomJoinBeforeHost'] as bool?,
      zoomMuteUponEntry: json['zoomMuteUponEntry'] as bool?,
      zoomAutoRecording: json['zoomAutoRecording'] as String?,
      classUsers: (json['classUsers'] as List<dynamic>?)
              ?.map((e) => ClassUserEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      assignExams: (json['assignExams'] as List<dynamic>?)
              ?.map((e) => AssignExamEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      classSessions: (json['classSessions'] as List<dynamic>?)
              ?.map(
                  (e) => ClassSessionEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      currentRole:
          classUserRoleEnumFromJson((json['currentRole'] as num?)?.toInt()),
    );

Map<String, dynamic> _$ClassDetailDtoToJson(ClassDetailDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'name': instance.name,
      'schoolId': instance.schoolId,
      'academicYearId': instance.academicYearId,
      'status': classStatusEnumToJson(instance.status),
      'grade': instance.grade,
      'classProgramTypeId': instance.classProgramTypeId,
      'classProgramType': instance.classProgramType?.toJson(),
      'classType': classTypeEnumToJson(instance.classType),
      'productId': instance.productId,
      'maxStudents': instance.maxStudents,
      'startDate': instance.startDate?.toIso8601String(),
      'endDate': instance.endDate?.toIso8601String(),
      'zoomMeetingId': instance.zoomMeetingId,
      'zoomPassword': instance.zoomPassword,
      'description': instance.description,
      'zoomHostVideo': instance.zoomHostVideo,
      'zoomParticipantVideo': instance.zoomParticipantVideo,
      'zoomJoinBeforeHost': instance.zoomJoinBeforeHost,
      'zoomMuteUponEntry': instance.zoomMuteUponEntry,
      'zoomAutoRecording': instance.zoomAutoRecording,
      'classUsers': instance.classUsers?.map((e) => e.toJson()).toList(),
      'assignExams': instance.assignExams?.map((e) => e.toJson()).toList(),
      'classSessions': instance.classSessions?.map((e) => e.toJson()).toList(),
      'currentRole': classUserRoleEnumToJson(instance.currentRole),
    };

ClassEntity _$ClassEntityFromJson(Map<String, dynamic> json) => ClassEntity(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      name: json['name'] as String?,
      schoolId: (json['schoolId'] as num?)?.toInt(),
      academicYearId: (json['academicYearId'] as num?)?.toInt(),
      status: classStatusEnumFromJson((json['status'] as num?)?.toInt()),
      grade: (json['grade'] as num?)?.toInt(),
      classProgramTypeId: (json['classProgramTypeId'] as num?)?.toInt(),
      classProgramType: json['classProgramType'] == null
          ? null
          : ClassProgramTypeEntity.fromJson(
              json['classProgramType'] as Map<String, dynamic>),
      classType: classTypeEnumFromJson((json['classType'] as num?)?.toInt()),
      productId: (json['productId'] as num?)?.toInt(),
      maxStudents: (json['maxStudents'] as num?)?.toInt(),
      startDate: json['startDate'] == null
          ? null
          : DateTime.parse(json['startDate'] as String),
      endDate: json['endDate'] == null
          ? null
          : DateTime.parse(json['endDate'] as String),
      zoomMeetingId: json['zoomMeetingId'] as String?,
      zoomPassword: json['zoomPassword'] as String?,
      description: json['description'] as String?,
      zoomHostVideo: json['zoomHostVideo'] as bool?,
      zoomParticipantVideo: json['zoomParticipantVideo'] as bool?,
      zoomJoinBeforeHost: json['zoomJoinBeforeHost'] as bool?,
      zoomMuteUponEntry: json['zoomMuteUponEntry'] as bool?,
      zoomAutoRecording: json['zoomAutoRecording'] as String?,
      classUsers: (json['classUsers'] as List<dynamic>?)
              ?.map((e) => ClassUserEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      assignExams: (json['assignExams'] as List<dynamic>?)
              ?.map((e) => AssignExamEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      classSessions: (json['classSessions'] as List<dynamic>?)
              ?.map(
                  (e) => ClassSessionEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$ClassEntityToJson(ClassEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'name': instance.name,
      'schoolId': instance.schoolId,
      'academicYearId': instance.academicYearId,
      'status': classStatusEnumToJson(instance.status),
      'grade': instance.grade,
      'classProgramTypeId': instance.classProgramTypeId,
      'classProgramType': instance.classProgramType?.toJson(),
      'classType': classTypeEnumToJson(instance.classType),
      'productId': instance.productId,
      'maxStudents': instance.maxStudents,
      'startDate': instance.startDate?.toIso8601String(),
      'endDate': instance.endDate?.toIso8601String(),
      'zoomMeetingId': instance.zoomMeetingId,
      'zoomPassword': instance.zoomPassword,
      'description': instance.description,
      'zoomHostVideo': instance.zoomHostVideo,
      'zoomParticipantVideo': instance.zoomParticipantVideo,
      'zoomJoinBeforeHost': instance.zoomJoinBeforeHost,
      'zoomMuteUponEntry': instance.zoomMuteUponEntry,
      'zoomAutoRecording': instance.zoomAutoRecording,
      'classUsers': instance.classUsers?.map((e) => e.toJson()).toList(),
      'assignExams': instance.assignExams?.map((e) => e.toJson()).toList(),
      'classSessions': instance.classSessions?.map((e) => e.toJson()).toList(),
    };

ClassGetListFilter _$ClassGetListFilterFromJson(Map<String, dynamic> json) =>
    ClassGetListFilter(
      sortExpression: json['sortExpression'] as String?,
      pageSize: (json['pageSize'] as num?)?.toInt(),
      pageIndex: (json['pageIndex'] as num?)?.toInt(),
      skip: (json['skip'] as num?)?.toInt(),
      notSkip: (json['notSkip'] as num?)?.toInt(),
      propertyIncludes: (json['propertyIncludes'] as List<dynamic>?)
              ?.map((e) => e as String)
              .toList() ??
          [],
      keyword: json['keyword'] as String?,
      schoolId: (json['schoolId'] as num?)?.toInt(),
      academicYearId: (json['academicYearId'] as num?)?.toInt(),
      status: classStatusEnumFromJson((json['status'] as num?)?.toInt()),
      isGetAll: json['isGetAll'] as bool?,
      userId: (json['userId'] as num?)?.toInt(),
      grade: (json['grade'] as num?)?.toInt(),
      searchType: classListSearchTypeEnumFromJson(
          (json['searchType'] as num?)?.toInt()),
    );

Map<String, dynamic> _$ClassGetListFilterToJson(ClassGetListFilter instance) =>
    <String, dynamic>{
      'sortExpression': instance.sortExpression,
      'pageSize': instance.pageSize,
      'pageIndex': instance.pageIndex,
      'skip': instance.skip,
      'notSkip': instance.notSkip,
      'propertyIncludes': instance.propertyIncludes,
      'keyword': instance.keyword,
      'schoolId': instance.schoolId,
      'academicYearId': instance.academicYearId,
      'status': classStatusEnumToJson(instance.status),
      'isGetAll': instance.isGetAll,
      'userId': instance.userId,
      'grade': instance.grade,
      'searchType': classListSearchTypeEnumToJson(instance.searchType),
    };

ClassLevel _$ClassLevelFromJson(Map<String, dynamic> json) => ClassLevel(
      id: (json['id'] as num?)?.toInt(),
      grade: (json['grade'] as num?)?.toInt(),
      name: json['name'] as String?,
      subjects: (json['subjects'] as List<dynamic>?)
              ?.map((e) => Subject.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$ClassLevelToJson(ClassLevel instance) =>
    <String, dynamic>{
      'id': instance.id,
      'grade': instance.grade,
      'name': instance.name,
      'subjects': instance.subjects?.map((e) => e.toJson()).toList(),
    };

ClassListDto _$ClassListDtoFromJson(Map<String, dynamic> json) => ClassListDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      name: json['name'] as String?,
      schoolId: (json['schoolId'] as num?)?.toInt(),
      academicYearId: (json['academicYearId'] as num?)?.toInt(),
      status: classStatusEnumFromJson((json['status'] as num?)?.toInt()),
      grade: (json['grade'] as num?)?.toInt(),
      classProgramTypeId: (json['classProgramTypeId'] as num?)?.toInt(),
      classProgramType: json['classProgramType'] == null
          ? null
          : ClassProgramTypeEntity.fromJson(
              json['classProgramType'] as Map<String, dynamic>),
      classType: classTypeEnumFromJson((json['classType'] as num?)?.toInt()),
      productId: (json['productId'] as num?)?.toInt(),
      maxStudents: (json['maxStudents'] as num?)?.toInt(),
      startDate: json['startDate'] == null
          ? null
          : DateTime.parse(json['startDate'] as String),
      endDate: json['endDate'] == null
          ? null
          : DateTime.parse(json['endDate'] as String),
      zoomMeetingId: json['zoomMeetingId'] as String?,
      zoomPassword: json['zoomPassword'] as String?,
      description: json['description'] as String?,
      zoomHostVideo: json['zoomHostVideo'] as bool?,
      zoomParticipantVideo: json['zoomParticipantVideo'] as bool?,
      zoomJoinBeforeHost: json['zoomJoinBeforeHost'] as bool?,
      zoomMuteUponEntry: json['zoomMuteUponEntry'] as bool?,
      zoomAutoRecording: json['zoomAutoRecording'] as String?,
      classUsers: (json['classUsers'] as List<dynamic>?)
              ?.map((e) => ClassUserEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      assignExams: (json['assignExams'] as List<dynamic>?)
              ?.map((e) => AssignExamEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      classSessions: (json['classSessions'] as List<dynamic>?)
              ?.map(
                  (e) => ClassSessionEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      countPupil: (json['countPupil'] as num?)?.toInt(),
      countExercise: (json['countExercise'] as num?)?.toInt(),
      countTest: (json['countTest'] as num?)?.toInt(),
      countNeedMark: (json['countNeedMark'] as num?)?.toInt(),
      testAverageScore: (json['testAverageScore'] as num?)?.toDouble(),
      studentCountTest: (json['studentCountTest'] as num?)?.toInt(),
      studentCountTestDone: (json['studentCountTestDone'] as num?)?.toInt(),
      currentRole:
          classUserRoleEnumFromJson((json['currentRole'] as num?)?.toInt()),
      isManager: json['isManager'] as bool?,
      schoolName: json['schoolName'] as String?,
      subject: json['subject'] as String?,
    );

Map<String, dynamic> _$ClassListDtoToJson(ClassListDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'name': instance.name,
      'schoolId': instance.schoolId,
      'academicYearId': instance.academicYearId,
      'status': classStatusEnumToJson(instance.status),
      'grade': instance.grade,
      'classProgramTypeId': instance.classProgramTypeId,
      'classProgramType': instance.classProgramType?.toJson(),
      'classType': classTypeEnumToJson(instance.classType),
      'productId': instance.productId,
      'maxStudents': instance.maxStudents,
      'startDate': instance.startDate?.toIso8601String(),
      'endDate': instance.endDate?.toIso8601String(),
      'zoomMeetingId': instance.zoomMeetingId,
      'zoomPassword': instance.zoomPassword,
      'description': instance.description,
      'zoomHostVideo': instance.zoomHostVideo,
      'zoomParticipantVideo': instance.zoomParticipantVideo,
      'zoomJoinBeforeHost': instance.zoomJoinBeforeHost,
      'zoomMuteUponEntry': instance.zoomMuteUponEntry,
      'zoomAutoRecording': instance.zoomAutoRecording,
      'classUsers': instance.classUsers?.map((e) => e.toJson()).toList(),
      'assignExams': instance.assignExams?.map((e) => e.toJson()).toList(),
      'classSessions': instance.classSessions?.map((e) => e.toJson()).toList(),
      'countPupil': instance.countPupil,
      'countExercise': instance.countExercise,
      'countTest': instance.countTest,
      'countNeedMark': instance.countNeedMark,
      'testAverageScore': instance.testAverageScore,
      'studentCountTest': instance.studentCountTest,
      'studentCountTestDone': instance.studentCountTestDone,
      'currentRole': classUserRoleEnumToJson(instance.currentRole),
      'isManager': instance.isManager,
      'schoolName': instance.schoolName,
      'subject': instance.subject,
    };

ClassListDtoFilterResult _$ClassListDtoFilterResultFromJson(
        Map<String, dynamic> json) =>
    ClassListDtoFilterResult(
      totalRows: (json['totalRows'] as num?)?.toInt(),
      data: (json['data'] as List<dynamic>?)
              ?.map((e) => ClassListDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$ClassListDtoFilterResultToJson(
        ClassListDtoFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

ClassListOfSchoolDto _$ClassListOfSchoolDtoFromJson(
        Map<String, dynamic> json) =>
    ClassListOfSchoolDto(
      id: (json['id'] as num?)?.toInt(),
      name: json['name'] as String?,
      grade: (json['grade'] as num?)?.toInt(),
      countPupil: (json['countPupil'] as num?)?.toInt(),
      countTeacher: (json['countTeacher'] as num?)?.toInt(),
      countExam: (json['countExam'] as num?)?.toInt(),
      countNeedMark: (json['countNeedMark'] as num?)?.toInt(),
      testAverageScore: (json['testAverageScore'] as num?)?.toDouble(),
    );

Map<String, dynamic> _$ClassListOfSchoolDtoToJson(
        ClassListOfSchoolDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'name': instance.name,
      'grade': instance.grade,
      'countPupil': instance.countPupil,
      'countTeacher': instance.countTeacher,
      'countExam': instance.countExam,
      'countNeedMark': instance.countNeedMark,
      'testAverageScore': instance.testAverageScore,
    };

ClassListOfSchoolDtoFilterResult _$ClassListOfSchoolDtoFilterResultFromJson(
        Map<String, dynamic> json) =>
    ClassListOfSchoolDtoFilterResult(
      totalRows: (json['totalRows'] as num?)?.toInt(),
      data: (json['data'] as List<dynamic>?)
              ?.map((e) =>
                  ClassListOfSchoolDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$ClassListOfSchoolDtoFilterResultToJson(
        ClassListOfSchoolDtoFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

ClassListOfSchoolFilter _$ClassListOfSchoolFilterFromJson(
        Map<String, dynamic> json) =>
    ClassListOfSchoolFilter(
      sortExpression: json['sortExpression'] as String?,
      pageSize: (json['pageSize'] as num?)?.toInt(),
      pageIndex: (json['pageIndex'] as num?)?.toInt(),
      skip: (json['skip'] as num?)?.toInt(),
      notSkip: (json['notSkip'] as num?)?.toInt(),
      propertyIncludes: (json['propertyIncludes'] as List<dynamic>?)
              ?.map((e) => e as String)
              .toList() ??
          [],
      schoolId: (json['schoolId'] as num?)?.toInt(),
      keyword: json['keyword'] as String?,
      grade: (json['grade'] as num?)?.toInt(),
    );

Map<String, dynamic> _$ClassListOfSchoolFilterToJson(
        ClassListOfSchoolFilter instance) =>
    <String, dynamic>{
      'sortExpression': instance.sortExpression,
      'pageSize': instance.pageSize,
      'pageIndex': instance.pageIndex,
      'skip': instance.skip,
      'notSkip': instance.notSkip,
      'propertyIncludes': instance.propertyIncludes,
      'schoolId': instance.schoolId,
      'keyword': instance.keyword,
      'grade': instance.grade,
    };

ClassProgramTypeEntity _$ClassProgramTypeEntityFromJson(
        Map<String, dynamic> json) =>
    ClassProgramTypeEntity(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      name: json['name'] as String?,
      schoolId: (json['schoolId'] as num?)?.toInt(),
      description: json['description'] as String?,
    );

Map<String, dynamic> _$ClassProgramTypeEntityToJson(
        ClassProgramTypeEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'name': instance.name,
      'schoolId': instance.schoolId,
      'description': instance.description,
    };

ClassProgramTypeEntityApiResponse _$ClassProgramTypeEntityApiResponseFromJson(
        Map<String, dynamic> json) =>
    ClassProgramTypeEntityApiResponse(
      data: json['data'] == null
          ? null
          : ClassProgramTypeEntity.fromJson(
              json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$ClassProgramTypeEntityApiResponseToJson(
        ClassProgramTypeEntityApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

ClassProgramTypeEntityListApiResponse
    _$ClassProgramTypeEntityListApiResponseFromJson(
            Map<String, dynamic> json) =>
        ClassProgramTypeEntityListApiResponse(
          data: (json['data'] as List<dynamic>?)
                  ?.map((e) => ClassProgramTypeEntity.fromJson(
                      e as Map<String, dynamic>))
                  .toList() ??
              [],
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic> _$ClassProgramTypeEntityListApiResponseToJson(
        ClassProgramTypeEntityListApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.map((e) => e.toJson()).toList(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

ClassPupilDto _$ClassPupilDtoFromJson(Map<String, dynamic> json) =>
    ClassPupilDto(
      id: (json['id'] as num?)?.toInt(),
      name: json['name'] as String?,
      countExamNeedDo: (json['countExamNeedDo'] as num?)?.toInt(),
      countUser: (json['countUser'] as num?)?.toInt(),
    );

Map<String, dynamic> _$ClassPupilDtoToJson(ClassPupilDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'name': instance.name,
      'countExamNeedDo': instance.countExamNeedDo,
      'countUser': instance.countUser,
    };

ClassPupilStatisticalDto _$ClassPupilStatisticalDtoFromJson(
        Map<String, dynamic> json) =>
    ClassPupilStatisticalDto(
      userId: (json['userId'] as num?)?.toInt(),
      avatar: json['avatar'] as String?,
      fullName: json['fullName'] as String?,
      fullNameNonAccent: json['fullNameNonAccent'] as String?,
      joinDate: json['joinDate'] == null
          ? null
          : DateTime.parse(json['joinDate'] as String),
      percentHomeWorkDone: (json['percentHomeWorkDone'] as num?)?.toDouble(),
      countExam: (json['countExam'] as num?)?.toInt(),
      averageScoreExam: (json['averageScoreExam'] as num?)?.toDouble(),
      averageScoreTest: (json['averageScoreTest'] as num?)?.toDouble(),
    );

Map<String, dynamic> _$ClassPupilStatisticalDtoToJson(
        ClassPupilStatisticalDto instance) =>
    <String, dynamic>{
      'userId': instance.userId,
      'avatar': instance.avatar,
      'fullName': instance.fullName,
      'fullNameNonAccent': instance.fullNameNonAccent,
      'joinDate': instance.joinDate?.toIso8601String(),
      'percentHomeWorkDone': instance.percentHomeWorkDone,
      'countExam': instance.countExam,
      'averageScoreExam': instance.averageScoreExam,
      'averageScoreTest': instance.averageScoreTest,
    };

ClassPupilStatisticalDtoFilterResult
    _$ClassPupilStatisticalDtoFilterResultFromJson(Map<String, dynamic> json) =>
        ClassPupilStatisticalDtoFilterResult(
          totalRows: (json['totalRows'] as num?)?.toInt(),
          data: (json['data'] as List<dynamic>?)
                  ?.map((e) => ClassPupilStatisticalDto.fromJson(
                      e as Map<String, dynamic>))
                  .toList() ??
              [],
        );

Map<String, dynamic> _$ClassPupilStatisticalDtoFilterResultToJson(
        ClassPupilStatisticalDtoFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

ClassPupilStatisticalFilter _$ClassPupilStatisticalFilterFromJson(
        Map<String, dynamic> json) =>
    ClassPupilStatisticalFilter(
      sortExpression: json['sortExpression'] as String?,
      pageSize: (json['pageSize'] as num?)?.toInt(),
      pageIndex: (json['pageIndex'] as num?)?.toInt(),
      skip: (json['skip'] as num?)?.toInt(),
      notSkip: (json['notSkip'] as num?)?.toInt(),
      propertyIncludes: (json['propertyIncludes'] as List<dynamic>?)
              ?.map((e) => e as String)
              .toList() ??
          [],
      classId: (json['classId'] as num?)?.toInt(),
      keyword: json['keyword'] as String?,
      subjectId: (json['subjectId'] as num?)?.toInt(),
    );

Map<String, dynamic> _$ClassPupilStatisticalFilterToJson(
        ClassPupilStatisticalFilter instance) =>
    <String, dynamic>{
      'sortExpression': instance.sortExpression,
      'pageSize': instance.pageSize,
      'pageIndex': instance.pageIndex,
      'skip': instance.skip,
      'notSkip': instance.notSkip,
      'propertyIncludes': instance.propertyIncludes,
      'classId': instance.classId,
      'keyword': instance.keyword,
      'subjectId': instance.subjectId,
    };

ClassRemoveUserCommand _$ClassRemoveUserCommandFromJson(
        Map<String, dynamic> json) =>
    ClassRemoveUserCommand(
      userId: (json['userId'] as num?)?.toInt(),
      classId: (json['classId'] as num?)?.toInt(),
    );

Map<String, dynamic> _$ClassRemoveUserCommandToJson(
        ClassRemoveUserCommand instance) =>
    <String, dynamic>{
      'userId': instance.userId,
      'classId': instance.classId,
    };

ClassSessionEntity _$ClassSessionEntityFromJson(Map<String, dynamic> json) =>
    ClassSessionEntity(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      classId: (json['classId'] as num?)?.toInt(),
      productLessonId: (json['productLessonId'] as num?)?.toInt(),
      sessionNumber: (json['sessionNumber'] as num?)?.toInt(),
      sessionName: json['sessionName'] as String?,
      description: json['description'] as String?,
      startTime: json['startTime'] == null
          ? null
          : DateTime.parse(json['startTime'] as String),
      endTime: json['endTime'] == null
          ? null
          : DateTime.parse(json['endTime'] as String),
      zoomMeetingId: json['zoomMeetingId'] as String?,
      zoomJoinLink: json['zoomJoinLink'] as String?,
      zoomStartLink: json['zoomStartLink'] as String?,
      zoomPassword: json['zoomPassword'] as String?,
      recordingUrl: json['recordingUrl'] as String?,
      zoomAccountIndex: (json['zoomAccountIndex'] as num?)?.toInt(),
      actualDurationMinutes: (json['actualDurationMinutes'] as num?)?.toInt(),
      status: sessionStatusEnumFromJson((json['status'] as num?)?.toInt()),
      notes: json['notes'] as String?,
      $class: json['class'] == null
          ? null
          : ClassEntity.fromJson(json['class'] as Map<String, dynamic>),
      productLesson: json['productLesson'] == null
          ? null
          : ProductLessonEntity.fromJson(
              json['productLesson'] as Map<String, dynamic>),
      attendances: (json['attendances'] as List<dynamic>?)
              ?.map((e) =>
                  SessionAttendanceEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$ClassSessionEntityToJson(ClassSessionEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'classId': instance.classId,
      'productLessonId': instance.productLessonId,
      'sessionNumber': instance.sessionNumber,
      'sessionName': instance.sessionName,
      'description': instance.description,
      'startTime': instance.startTime?.toIso8601String(),
      'endTime': instance.endTime?.toIso8601String(),
      'zoomMeetingId': instance.zoomMeetingId,
      'zoomJoinLink': instance.zoomJoinLink,
      'zoomStartLink': instance.zoomStartLink,
      'zoomPassword': instance.zoomPassword,
      'recordingUrl': instance.recordingUrl,
      'zoomAccountIndex': instance.zoomAccountIndex,
      'actualDurationMinutes': instance.actualDurationMinutes,
      'status': sessionStatusEnumToJson(instance.status),
      'notes': instance.notes,
      'class': instance.$class?.toJson(),
      'productLesson': instance.productLesson?.toJson(),
      'attendances': instance.attendances?.map((e) => e.toJson()).toList(),
    };

ClassShortDto _$ClassShortDtoFromJson(Map<String, dynamic> json) =>
    ClassShortDto(
      id: (json['id'] as num?)?.toInt(),
      name: json['name'] as String?,
      grade: json['grade'] as String?,
      schoolId: (json['schoolId'] as num?)?.toInt(),
      classUsers: (json['classUsers'] as List<dynamic>?)
              ?.map(
                  (e) => ClassUserShortDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$ClassShortDtoToJson(ClassShortDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'name': instance.name,
      'grade': instance.grade,
      'schoolId': instance.schoolId,
      'classUsers': instance.classUsers?.map((e) => e.toJson()).toList(),
    };

ClassStatisticalDto _$ClassStatisticalDtoFromJson(Map<String, dynamic> json) =>
    ClassStatisticalDto(
      waitingGrading: (json['waitingGrading'] as num?)?.toInt(),
      countTeacher: (json['countTeacher'] as num?)?.toInt(),
      countPupil: (json['countPupil'] as num?)?.toInt(),
      countExam: (json['countExam'] as num?)?.toInt(),
    );

Map<String, dynamic> _$ClassStatisticalDtoToJson(
        ClassStatisticalDto instance) =>
    <String, dynamic>{
      'waitingGrading': instance.waitingGrading,
      'countTeacher': instance.countTeacher,
      'countPupil': instance.countPupil,
      'countExam': instance.countExam,
    };

ClassUserEntity _$ClassUserEntityFromJson(Map<String, dynamic> json) =>
    ClassUserEntity(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      userId: (json['userId'] as num?)?.toInt(),
      classId: (json['classId'] as num?)?.toInt(),
      role: classUserRoleEnumFromJson((json['role'] as num?)?.toInt()),
      status: classUserStatusEnumFromJson((json['status'] as num?)?.toInt()),
      note: json['note'] as String?,
      subjectIds: (json['subjectIds'] as List<dynamic>?)
              ?.map((e) => (e as num).toInt())
              .toList() ??
          [],
      isManager: json['isManager'] as bool?,
    );

Map<String, dynamic> _$ClassUserEntityToJson(ClassUserEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'userId': instance.userId,
      'classId': instance.classId,
      'role': classUserRoleEnumToJson(instance.role),
      'status': classUserStatusEnumToJson(instance.status),
      'note': instance.note,
      'subjectIds': instance.subjectIds,
      'isManager': instance.isManager,
    };

ClassUserShortDto _$ClassUserShortDtoFromJson(Map<String, dynamic> json) =>
    ClassUserShortDto(
      id: (json['id'] as num?)?.toInt(),
      fullName: json['fullName'] as String?,
      avatar: json['avatar'] as String?,
    );

Map<String, dynamic> _$ClassUserShortDtoToJson(ClassUserShortDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'fullName': instance.fullName,
      'avatar': instance.avatar,
    };

ConsultationRegistrationEntity _$ConsultationRegistrationEntityFromJson(
        Map<String, dynamic> json) =>
    ConsultationRegistrationEntity(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      name: json['name'] as String?,
      phone: json['phone'] as String?,
      email: json['email'] as String?,
      message: json['message'] as String?,
      planType: json['planType'] as String?,
      productId: (json['productId'] as num?)?.toInt(),
      status: consultationStatusEnumFromJson((json['status'] as num?)?.toInt()),
      adminNote: json['adminNote'] as String?,
      contactedDate: json['contactedDate'] == null
          ? null
          : DateTime.parse(json['contactedDate'] as String),
      contactedBy: (json['contactedBy'] as num?)?.toInt(),
    );

Map<String, dynamic> _$ConsultationRegistrationEntityToJson(
        ConsultationRegistrationEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'name': instance.name,
      'phone': instance.phone,
      'email': instance.email,
      'message': instance.message,
      'planType': instance.planType,
      'productId': instance.productId,
      'status': consultationStatusEnumToJson(instance.status),
      'adminNote': instance.adminNote,
      'contactedDate': instance.contactedDate?.toIso8601String(),
      'contactedBy': instance.contactedBy,
    };

ConsultationRegistrationEntityApiResponse
    _$ConsultationRegistrationEntityApiResponseFromJson(
            Map<String, dynamic> json) =>
        ConsultationRegistrationEntityApiResponse(
          data: json['data'] == null
              ? null
              : ConsultationRegistrationEntity.fromJson(
                  json['data'] as Map<String, dynamic>),
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic> _$ConsultationRegistrationEntityApiResponseToJson(
        ConsultationRegistrationEntityApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

ConsultationRegistrationGetListQuery
    _$ConsultationRegistrationGetListQueryFromJson(Map<String, dynamic> json) =>
        ConsultationRegistrationGetListQuery(
          sortExpression: json['sortExpression'] as String?,
          pageSize: (json['pageSize'] as num?)?.toInt(),
          pageIndex: (json['pageIndex'] as num?)?.toInt(),
          skip: (json['skip'] as num?)?.toInt(),
          notSkip: (json['notSkip'] as num?)?.toInt(),
          propertyIncludes: (json['propertyIncludes'] as List<dynamic>?)
                  ?.map((e) => e as String)
                  .toList() ??
              [],
          keyword: json['keyword'] as String?,
          status:
              consultationStatusEnumFromJson((json['status'] as num?)?.toInt()),
          planType: json['planType'] as String?,
          fromDate: json['fromDate'] == null
              ? null
              : DateTime.parse(json['fromDate'] as String),
          toDate: json['toDate'] == null
              ? null
              : DateTime.parse(json['toDate'] as String),
        );

Map<String, dynamic> _$ConsultationRegistrationGetListQueryToJson(
        ConsultationRegistrationGetListQuery instance) =>
    <String, dynamic>{
      'sortExpression': instance.sortExpression,
      'pageSize': instance.pageSize,
      'pageIndex': instance.pageIndex,
      'skip': instance.skip,
      'notSkip': instance.notSkip,
      'propertyIncludes': instance.propertyIncludes,
      'keyword': instance.keyword,
      'status': consultationStatusEnumToJson(instance.status),
      'planType': instance.planType,
      'fromDate': instance.fromDate?.toIso8601String(),
      'toDate': instance.toDate?.toIso8601String(),
    };

ConsultationRegistrationListDto _$ConsultationRegistrationListDtoFromJson(
        Map<String, dynamic> json) =>
    ConsultationRegistrationListDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      name: json['name'] as String?,
      phone: json['phone'] as String?,
      email: json['email'] as String?,
      message: json['message'] as String?,
      planType: json['planType'] as String?,
      productId: (json['productId'] as num?)?.toInt(),
      status: consultationStatusEnumFromJson((json['status'] as num?)?.toInt()),
      adminNote: json['adminNote'] as String?,
      contactedDate: json['contactedDate'] == null
          ? null
          : DateTime.parse(json['contactedDate'] as String),
      contactedBy: (json['contactedBy'] as num?)?.toInt(),
      productName: json['productName'] as String?,
      contactedByName: json['contactedByName'] as String?,
    );

Map<String, dynamic> _$ConsultationRegistrationListDtoToJson(
        ConsultationRegistrationListDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'name': instance.name,
      'phone': instance.phone,
      'email': instance.email,
      'message': instance.message,
      'planType': instance.planType,
      'productId': instance.productId,
      'status': consultationStatusEnumToJson(instance.status),
      'adminNote': instance.adminNote,
      'contactedDate': instance.contactedDate?.toIso8601String(),
      'contactedBy': instance.contactedBy,
      'productName': instance.productName,
      'contactedByName': instance.contactedByName,
    };

ConsultationRegistrationListDtoFilterResult
    _$ConsultationRegistrationListDtoFilterResultFromJson(
            Map<String, dynamic> json) =>
        ConsultationRegistrationListDtoFilterResult(
          totalRows: (json['totalRows'] as num?)?.toInt(),
          data: (json['data'] as List<dynamic>?)
                  ?.map((e) => ConsultationRegistrationListDto.fromJson(
                      e as Map<String, dynamic>))
                  .toList() ??
              [],
        );

Map<String, dynamic> _$ConsultationRegistrationListDtoFilterResultToJson(
        ConsultationRegistrationListDtoFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

ConsultationRegistrationListDtoFilterResultApiResponse
    _$ConsultationRegistrationListDtoFilterResultApiResponseFromJson(
            Map<String, dynamic> json) =>
        ConsultationRegistrationListDtoFilterResultApiResponse(
          data: json['data'] == null
              ? null
              : ConsultationRegistrationListDtoFilterResult.fromJson(
                  json['data'] as Map<String, dynamic>),
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic>
    _$ConsultationRegistrationListDtoFilterResultApiResponseToJson(
            ConsultationRegistrationListDtoFilterResultApiResponse instance) =>
        <String, dynamic>{
          'data': instance.data?.toJson(),
          'message': instance.message,
          'success': instance.success,
          'code': errorCodeEnumToJson(instance.code),
        };

ConsultationRegistrationSaveDto _$ConsultationRegistrationSaveDtoFromJson(
        Map<String, dynamic> json) =>
    ConsultationRegistrationSaveDto(
      name: json['name'] as String?,
      phone: json['phone'] as String?,
      email: json['email'] as String?,
      message: json['message'] as String?,
      planType: json['planType'] as String?,
      productId: (json['productId'] as num?)?.toInt(),
    );

Map<String, dynamic> _$ConsultationRegistrationSaveDtoToJson(
        ConsultationRegistrationSaveDto instance) =>
    <String, dynamic>{
      'name': instance.name,
      'phone': instance.phone,
      'email': instance.email,
      'message': instance.message,
      'planType': instance.planType,
      'productId': instance.productId,
    };

ConsultationRegistrationUpdateStatusRequest
    _$ConsultationRegistrationUpdateStatusRequestFromJson(
            Map<String, dynamic> json) =>
        ConsultationRegistrationUpdateStatusRequest(
          status:
              consultationStatusEnumFromJson((json['status'] as num?)?.toInt()),
          adminNote: json['adminNote'] as String?,
        );

Map<String, dynamic> _$ConsultationRegistrationUpdateStatusRequestToJson(
        ConsultationRegistrationUpdateStatusRequest instance) =>
    <String, dynamic>{
      'status': consultationStatusEnumToJson(instance.status),
      'adminNote': instance.adminNote,
    };

ContactEntity _$ContactEntityFromJson(Map<String, dynamic> json) =>
    ContactEntity(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      fullName: json['fullName'] as String?,
      phone: json['phone'] as String?,
      message: json['message'] as String?,
      status: contactStatusEnumFromJson((json['status'] as num?)?.toInt()),
      adminNote: json['adminNote'] as String?,
      contactedDate: json['contactedDate'] == null
          ? null
          : DateTime.parse(json['contactedDate'] as String),
      contactedBy: (json['contactedBy'] as num?)?.toInt(),
    );

Map<String, dynamic> _$ContactEntityToJson(ContactEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'fullName': instance.fullName,
      'phone': instance.phone,
      'message': instance.message,
      'status': contactStatusEnumToJson(instance.status),
      'adminNote': instance.adminNote,
      'contactedDate': instance.contactedDate?.toIso8601String(),
      'contactedBy': instance.contactedBy,
    };

ContactEntityApiResponse _$ContactEntityApiResponseFromJson(
        Map<String, dynamic> json) =>
    ContactEntityApiResponse(
      data: json['data'] == null
          ? null
          : ContactEntity.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$ContactEntityApiResponseToJson(
        ContactEntityApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

ContactGetListQuery _$ContactGetListQueryFromJson(Map<String, dynamic> json) =>
    ContactGetListQuery(
      sortExpression: json['sortExpression'] as String?,
      pageSize: (json['pageSize'] as num?)?.toInt(),
      pageIndex: (json['pageIndex'] as num?)?.toInt(),
      skip: (json['skip'] as num?)?.toInt(),
      notSkip: (json['notSkip'] as num?)?.toInt(),
      propertyIncludes: (json['propertyIncludes'] as List<dynamic>?)
              ?.map((e) => e as String)
              .toList() ??
          [],
      keyword: json['keyword'] as String?,
      status: contactStatusEnumFromJson((json['status'] as num?)?.toInt()),
      fromDate: json['fromDate'] == null
          ? null
          : DateTime.parse(json['fromDate'] as String),
      toDate: json['toDate'] == null
          ? null
          : DateTime.parse(json['toDate'] as String),
    );

Map<String, dynamic> _$ContactGetListQueryToJson(
        ContactGetListQuery instance) =>
    <String, dynamic>{
      'sortExpression': instance.sortExpression,
      'pageSize': instance.pageSize,
      'pageIndex': instance.pageIndex,
      'skip': instance.skip,
      'notSkip': instance.notSkip,
      'propertyIncludes': instance.propertyIncludes,
      'keyword': instance.keyword,
      'status': contactStatusEnumToJson(instance.status),
      'fromDate': instance.fromDate?.toIso8601String(),
      'toDate': instance.toDate?.toIso8601String(),
    };

ContactListDto _$ContactListDtoFromJson(Map<String, dynamic> json) =>
    ContactListDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      fullName: json['fullName'] as String?,
      phone: json['phone'] as String?,
      message: json['message'] as String?,
      status: contactStatusEnumFromJson((json['status'] as num?)?.toInt()),
      adminNote: json['adminNote'] as String?,
      contactedDate: json['contactedDate'] == null
          ? null
          : DateTime.parse(json['contactedDate'] as String),
      contactedBy: (json['contactedBy'] as num?)?.toInt(),
      contactedByName: json['contactedByName'] as String?,
    );

Map<String, dynamic> _$ContactListDtoToJson(ContactListDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'fullName': instance.fullName,
      'phone': instance.phone,
      'message': instance.message,
      'status': contactStatusEnumToJson(instance.status),
      'adminNote': instance.adminNote,
      'contactedDate': instance.contactedDate?.toIso8601String(),
      'contactedBy': instance.contactedBy,
      'contactedByName': instance.contactedByName,
    };

ContactListDtoFilterResult _$ContactListDtoFilterResultFromJson(
        Map<String, dynamic> json) =>
    ContactListDtoFilterResult(
      totalRows: (json['totalRows'] as num?)?.toInt(),
      data: (json['data'] as List<dynamic>?)
              ?.map((e) => ContactListDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$ContactListDtoFilterResultToJson(
        ContactListDtoFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

ContactListDtoFilterResultApiResponse
    _$ContactListDtoFilterResultApiResponseFromJson(
            Map<String, dynamic> json) =>
        ContactListDtoFilterResultApiResponse(
          data: json['data'] == null
              ? null
              : ContactListDtoFilterResult.fromJson(
                  json['data'] as Map<String, dynamic>),
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic> _$ContactListDtoFilterResultApiResponseToJson(
        ContactListDtoFilterResultApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

ContactSaveDto _$ContactSaveDtoFromJson(Map<String, dynamic> json) =>
    ContactSaveDto(
      fullName: json['fullName'] as String?,
      phone: json['phone'] as String?,
      message: json['message'] as String?,
    );

Map<String, dynamic> _$ContactSaveDtoToJson(ContactSaveDto instance) =>
    <String, dynamic>{
      'fullName': instance.fullName,
      'phone': instance.phone,
      'message': instance.message,
    };

ContactUpdateStatusRequest _$ContactUpdateStatusRequestFromJson(
        Map<String, dynamic> json) =>
    ContactUpdateStatusRequest(
      status: contactStatusEnumFromJson((json['status'] as num?)?.toInt()),
      adminNote: json['adminNote'] as String?,
    );

Map<String, dynamic> _$ContactUpdateStatusRequestToJson(
        ContactUpdateStatusRequest instance) =>
    <String, dynamic>{
      'status': contactStatusEnumToJson(instance.status),
      'adminNote': instance.adminNote,
    };

CreateChatGroupDto _$CreateChatGroupDtoFromJson(Map<String, dynamic> json) =>
    CreateChatGroupDto(
      userIds: (json['userIds'] as List<dynamic>?)
              ?.map((e) => (e as num).toInt())
              .toList() ??
          [],
      name: json['name'] as String?,
      type: (json['type'] as num?)?.toInt(),
      documentId: (json['documentId'] as num?)?.toInt(),
    );

Map<String, dynamic> _$CreateChatGroupDtoToJson(CreateChatGroupDto instance) =>
    <String, dynamic>{
      'userIds': instance.userIds,
      'name': instance.name,
      'type': instance.type,
      'documentId': instance.documentId,
    };

CurrentObjectDto _$CurrentObjectDtoFromJson(Map<String, dynamic> json) =>
    CurrentObjectDto(
      id: (json['id'] as num?)?.toInt(),
      type: userTypeEnumFromJson((json['type'] as num?)?.toInt()),
      name: json['name'] as String?,
    );

Map<String, dynamic> _$CurrentObjectDtoToJson(CurrentObjectDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'type': userTypeEnumToJson(instance.type),
      'name': instance.name,
    };

CurrentObjectDtoApiResponse _$CurrentObjectDtoApiResponseFromJson(
        Map<String, dynamic> json) =>
    CurrentObjectDtoApiResponse(
      data: json['data'] == null
          ? null
          : CurrentObjectDto.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$CurrentObjectDtoApiResponseToJson(
        CurrentObjectDtoApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

DNTCaptchaApiResponse _$DNTCaptchaApiResponseFromJson(
        Map<String, dynamic> json) =>
    DNTCaptchaApiResponse(
      dntCaptchaImgUrl: json['dntCaptchaImgUrl'] as String?,
      dntCaptchaId: json['dntCaptchaId'] as String?,
      dntCaptchaTextValue: json['dntCaptchaTextValue'] as String?,
      dntCaptchaTokenValue: json['dntCaptchaTokenValue'] as String?,
    );

Map<String, dynamic> _$DNTCaptchaApiResponseToJson(
        DNTCaptchaApiResponse instance) =>
    <String, dynamic>{
      'dntCaptchaImgUrl': instance.dntCaptchaImgUrl,
      'dntCaptchaId': instance.dntCaptchaId,
      'dntCaptchaTextValue': instance.dntCaptchaTextValue,
      'dntCaptchaTokenValue': instance.dntCaptchaTokenValue,
    };

DashBoardClassStatisticalDto _$DashBoardClassStatisticalDtoFromJson(
        Map<String, dynamic> json) =>
    DashBoardClassStatisticalDto(
      id: (json['id'] as num?)?.toInt(),
      name: json['name'] as String?,
      totalStudent: (json['totalStudent'] as num?)?.toInt(),
      totalExamNeedMark: (json['totalExamNeedMark'] as num?)?.toInt(),
    );

Map<String, dynamic> _$DashBoardClassStatisticalDtoToJson(
        DashBoardClassStatisticalDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'name': instance.name,
      'totalStudent': instance.totalStudent,
      'totalExamNeedMark': instance.totalExamNeedMark,
    };

DashBoardClassStatisticalDtoListApiResponse
    _$DashBoardClassStatisticalDtoListApiResponseFromJson(
            Map<String, dynamic> json) =>
        DashBoardClassStatisticalDtoListApiResponse(
          data: (json['data'] as List<dynamic>?)
                  ?.map((e) => DashBoardClassStatisticalDto.fromJson(
                      e as Map<String, dynamic>))
                  .toList() ??
              [],
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic> _$DashBoardClassStatisticalDtoListApiResponseToJson(
        DashBoardClassStatisticalDtoListApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.map((e) => e.toJson()).toList(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

DashBoardExamListDto _$DashBoardExamListDtoFromJson(
        Map<String, dynamic> json) =>
    DashBoardExamListDto(
      id: (json['id'] as num?)?.toInt(),
      title: json['title'] as String?,
      status: examStatusEnumFromJson((json['status'] as num?)?.toInt()),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
    );

Map<String, dynamic> _$DashBoardExamListDtoToJson(
        DashBoardExamListDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'title': instance.title,
      'status': examStatusEnumToJson(instance.status),
      'createdDate': instance.createdDate?.toIso8601String(),
    };

DashBoardExamListDtoListApiResponse
    _$DashBoardExamListDtoListApiResponseFromJson(Map<String, dynamic> json) =>
        DashBoardExamListDtoListApiResponse(
          data: (json['data'] as List<dynamic>?)
                  ?.map((e) =>
                      DashBoardExamListDto.fromJson(e as Map<String, dynamic>))
                  .toList() ??
              [],
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic> _$DashBoardExamListDtoListApiResponseToJson(
        DashBoardExamListDtoListApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.map((e) => e.toJson()).toList(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

DashBoardPupilListDto _$DashBoardPupilListDtoFromJson(
        Map<String, dynamic> json) =>
    DashBoardPupilListDto(
      userId: (json['userId'] as num?)?.toInt(),
      avatar: json['avatar'] as String?,
      fullName: json['fullName'] as String?,
      countExam: (json['countExam'] as num?)?.toInt(),
      countExamDone: (json['countExamDone'] as num?)?.toInt(),
      classId: (json['classId'] as num?)?.toInt(),
      className: json['className'] as String?,
      percentDone: (json['percentDone'] as num?)?.toDouble(),
    );

Map<String, dynamic> _$DashBoardPupilListDtoToJson(
        DashBoardPupilListDto instance) =>
    <String, dynamic>{
      'userId': instance.userId,
      'avatar': instance.avatar,
      'fullName': instance.fullName,
      'countExam': instance.countExam,
      'countExamDone': instance.countExamDone,
      'classId': instance.classId,
      'className': instance.className,
      'percentDone': instance.percentDone,
    };

DashBoardPupilListDtoListApiResponse
    _$DashBoardPupilListDtoListApiResponseFromJson(Map<String, dynamic> json) =>
        DashBoardPupilListDtoListApiResponse(
          data: (json['data'] as List<dynamic>?)
                  ?.map((e) =>
                      DashBoardPupilListDto.fromJson(e as Map<String, dynamic>))
                  .toList() ??
              [],
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic> _$DashBoardPupilListDtoListApiResponseToJson(
        DashBoardPupilListDtoListApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.map((e) => e.toJson()).toList(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

DashBoardQuestionListDto _$DashBoardQuestionListDtoFromJson(
        Map<String, dynamic> json) =>
    DashBoardQuestionListDto(
      id: (json['id'] as num?)?.toInt(),
      type: json['type'] as String?,
      classLevel: (json['classLevel'] as num?)?.toInt(),
      subjectId: (json['subjectId'] as num?)?.toInt(),
      level: questionLevelEnumFromJson((json['level'] as num?)?.toInt()),
    );

Map<String, dynamic> _$DashBoardQuestionListDtoToJson(
        DashBoardQuestionListDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'type': instance.type,
      'classLevel': instance.classLevel,
      'subjectId': instance.subjectId,
      'level': questionLevelEnumToJson(instance.level),
    };

DashBoardQuestionListDtoListApiResponse
    _$DashBoardQuestionListDtoListApiResponseFromJson(
            Map<String, dynamic> json) =>
        DashBoardQuestionListDtoListApiResponse(
          data: (json['data'] as List<dynamic>?)
                  ?.map((e) => DashBoardQuestionListDto.fromJson(
                      e as Map<String, dynamic>))
                  .toList() ??
              [],
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic> _$DashBoardQuestionListDtoListApiResponseToJson(
        DashBoardQuestionListDtoListApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.map((e) => e.toJson()).toList(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

DeparmentGetManagerPositionDto _$DeparmentGetManagerPositionDtoFromJson(
        Map<String, dynamic> json) =>
    DeparmentGetManagerPositionDto(
      name: json['name'] as String?,
      provinceId: (json['provinceId'] as num?)?.toInt(),
    );

Map<String, dynamic> _$DeparmentGetManagerPositionDtoToJson(
        DeparmentGetManagerPositionDto instance) =>
    <String, dynamic>{
      'name': instance.name,
      'provinceId': instance.provinceId,
    };

DepartmentCountDto _$DepartmentCountDtoFromJson(Map<String, dynamic> json) =>
    DepartmentCountDto(
      schoolCount: (json['schoolCount'] as num?)?.toInt(),
      teacherCount: (json['teacherCount'] as num?)?.toInt(),
      studentCount: (json['studentCount'] as num?)?.toInt(),
      classCount: (json['classCount'] as num?)?.toInt(),
    );

Map<String, dynamic> _$DepartmentCountDtoToJson(DepartmentCountDto instance) =>
    <String, dynamic>{
      'schoolCount': instance.schoolCount,
      'teacherCount': instance.teacherCount,
      'studentCount': instance.studentCount,
      'classCount': instance.classCount,
    };

DepartmentCountDtoApiResponse _$DepartmentCountDtoApiResponseFromJson(
        Map<String, dynamic> json) =>
    DepartmentCountDtoApiResponse(
      data: json['data'] == null
          ? null
          : DepartmentCountDto.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$DepartmentCountDtoApiResponseToJson(
        DepartmentCountDtoApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

DepartmentCountQuery _$DepartmentCountQueryFromJson(
        Map<String, dynamic> json) =>
    DepartmentCountQuery(
      fromDate: json['fromDate'] == null
          ? null
          : DateTime.parse(json['fromDate'] as String),
      toDate: json['toDate'] == null
          ? null
          : DateTime.parse(json['toDate'] as String),
    );

Map<String, dynamic> _$DepartmentCountQueryToJson(
        DepartmentCountQuery instance) =>
    <String, dynamic>{
      'fromDate': instance.fromDate?.toIso8601String(),
      'toDate': instance.toDate?.toIso8601String(),
    };

DepartmentDto _$DepartmentDtoFromJson(Map<String, dynamic> json) =>
    DepartmentDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      code: json['code'] as String?,
      name: json['name'] as String?,
      fullName: json['fullName'] as String?,
      otherName: json['otherName'] as String?,
      url: json['url'] as String?,
      unitType: json['unitType'] as String?,
      parentId: (json['parentId'] as num?)?.toInt(),
      priority: (json['priority'] as num?)?.toInt(),
      type: localityTypeEnumFromJson((json['type'] as num?)?.toInt()),
      status: localityStatusEnumFromJson((json['status'] as num?)?.toInt()),
      officeCount: (json['officeCount'] as num?)?.toInt(),
      schoolCount: (json['schoolCount'] as num?)?.toInt(),
      schoolActiveCount: (json['schoolActiveCount'] as num?)?.toInt(),
    );

Map<String, dynamic> _$DepartmentDtoToJson(DepartmentDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'code': instance.code,
      'name': instance.name,
      'fullName': instance.fullName,
      'otherName': instance.otherName,
      'url': instance.url,
      'unitType': instance.unitType,
      'parentId': instance.parentId,
      'priority': instance.priority,
      'type': localityTypeEnumToJson(instance.type),
      'status': localityStatusEnumToJson(instance.status),
      'officeCount': instance.officeCount,
      'schoolCount': instance.schoolCount,
      'schoolActiveCount': instance.schoolActiveCount,
    };

DepartmentDtoFilterResult _$DepartmentDtoFilterResultFromJson(
        Map<String, dynamic> json) =>
    DepartmentDtoFilterResult(
      totalRows: (json['totalRows'] as num?)?.toInt(),
      data: (json['data'] as List<dynamic>?)
              ?.map((e) => DepartmentDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$DepartmentDtoFilterResultToJson(
        DepartmentDtoFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

DepartmentDtoFilterResultApiResponse
    _$DepartmentDtoFilterResultApiResponseFromJson(Map<String, dynamic> json) =>
        DepartmentDtoFilterResultApiResponse(
          data: json['data'] == null
              ? null
              : DepartmentDtoFilterResult.fromJson(
                  json['data'] as Map<String, dynamic>),
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic> _$DepartmentDtoFilterResultApiResponseToJson(
        DepartmentDtoFilterResultApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

DepartmentGetListQuery _$DepartmentGetListQueryFromJson(
        Map<String, dynamic> json) =>
    DepartmentGetListQuery(
      sortExpression: json['sortExpression'] as String?,
      pageSize: (json['pageSize'] as num?)?.toInt(),
      pageIndex: (json['pageIndex'] as num?)?.toInt(),
      skip: (json['skip'] as num?)?.toInt(),
      notSkip: (json['notSkip'] as num?)?.toInt(),
      propertyIncludes: (json['propertyIncludes'] as List<dynamic>?)
              ?.map((e) => e as String)
              .toList() ??
          [],
      keyword: json['keyword'] as String?,
    );

Map<String, dynamic> _$DepartmentGetListQueryToJson(
        DepartmentGetListQuery instance) =>
    <String, dynamic>{
      'sortExpression': instance.sortExpression,
      'pageSize': instance.pageSize,
      'pageIndex': instance.pageIndex,
      'skip': instance.skip,
      'notSkip': instance.notSkip,
      'propertyIncludes': instance.propertyIncludes,
      'keyword': instance.keyword,
    };

DepartmentSchoolFilterDto _$DepartmentSchoolFilterDtoFromJson(
        Map<String, dynamic> json) =>
    DepartmentSchoolFilterDto(
      sortExpression: json['sortExpression'] as String?,
      pageSize: (json['pageSize'] as num?)?.toInt(),
      pageIndex: (json['pageIndex'] as num?)?.toInt(),
      skip: (json['skip'] as num?)?.toInt(),
      notSkip: (json['notSkip'] as num?)?.toInt(),
      propertyIncludes: (json['propertyIncludes'] as List<dynamic>?)
              ?.map((e) => e as String)
              .toList() ??
          [],
      fromDate: json['fromDate'] == null
          ? null
          : DateTime.parse(json['fromDate'] as String),
      toDate: json['toDate'] == null
          ? null
          : DateTime.parse(json['toDate'] as String),
      keyword: json['keyword'] as String?,
      type: (json['type'] as num?)?.toInt(),
      provinceId: (json['provinceId'] as num?)?.toInt(),
      districtId: (json['districtId'] as num?)?.toInt(),
      status: schoolStatusEnumFromJson((json['status'] as num?)?.toInt()),
    );

Map<String, dynamic> _$DepartmentSchoolFilterDtoToJson(
        DepartmentSchoolFilterDto instance) =>
    <String, dynamic>{
      'sortExpression': instance.sortExpression,
      'pageSize': instance.pageSize,
      'pageIndex': instance.pageIndex,
      'skip': instance.skip,
      'notSkip': instance.notSkip,
      'propertyIncludes': instance.propertyIncludes,
      'fromDate': instance.fromDate?.toIso8601String(),
      'toDate': instance.toDate?.toIso8601String(),
      'keyword': instance.keyword,
      'type': instance.type,
      'provinceId': instance.provinceId,
      'districtId': instance.districtId,
      'status': schoolStatusEnumToJson(instance.status),
    };

DepartmentSchoolListDto _$DepartmentSchoolListDtoFromJson(
        Map<String, dynamic> json) =>
    DepartmentSchoolListDto(
      id: (json['id'] as num?)?.toInt(),
      name: json['name'] as String?,
      type: json['type'] as String?,
      provinceId: (json['provinceId'] as num?)?.toInt(),
      averageAssignmentsPerTeacher:
          (json['averageAssignmentsPerTeacher'] as num?)?.toDouble(),
      averageAssignmentsPerStudent:
          (json['averageAssignmentsPerStudent'] as num?)?.toDouble(),
      provinceName: json['provinceName'] as String?,
      districtId: (json['districtId'] as num?)?.toInt(),
      districtName: json['districtName'] as String?,
      status: schoolStatusEnumFromJson((json['status'] as num?)?.toInt()),
    );

Map<String, dynamic> _$DepartmentSchoolListDtoToJson(
        DepartmentSchoolListDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'name': instance.name,
      'type': instance.type,
      'provinceId': instance.provinceId,
      'averageAssignmentsPerTeacher': instance.averageAssignmentsPerTeacher,
      'averageAssignmentsPerStudent': instance.averageAssignmentsPerStudent,
      'provinceName': instance.provinceName,
      'districtId': instance.districtId,
      'districtName': instance.districtName,
      'status': schoolStatusEnumToJson(instance.status),
    };

DepartmentSchoolListDtoFilterResult
    _$DepartmentSchoolListDtoFilterResultFromJson(Map<String, dynamic> json) =>
        DepartmentSchoolListDtoFilterResult(
          totalRows: (json['totalRows'] as num?)?.toInt(),
          data: (json['data'] as List<dynamic>?)
                  ?.map((e) => DepartmentSchoolListDto.fromJson(
                      e as Map<String, dynamic>))
                  .toList() ??
              [],
        );

Map<String, dynamic> _$DepartmentSchoolListDtoFilterResultToJson(
        DepartmentSchoolListDtoFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

DepartmentSchoolListDtoFilterResultApiResponse
    _$DepartmentSchoolListDtoFilterResultApiResponseFromJson(
            Map<String, dynamic> json) =>
        DepartmentSchoolListDtoFilterResultApiResponse(
          data: json['data'] == null
              ? null
              : DepartmentSchoolListDtoFilterResult.fromJson(
                  json['data'] as Map<String, dynamic>),
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic> _$DepartmentSchoolListDtoFilterResultApiResponseToJson(
        DepartmentSchoolListDtoFilterResultApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

Disable2FADto _$Disable2FADtoFromJson(Map<String, dynamic> json) =>
    Disable2FADto(
      code: json['code'] as String?,
    );

Map<String, dynamic> _$Disable2FADtoToJson(Disable2FADto instance) =>
    <String, dynamic>{
      'code': instance.code,
    };

DocumentFileInfo _$DocumentFileInfoFromJson(Map<String, dynamic> json) =>
    DocumentFileInfo(
      fileName: json['fileName'] as String?,
      displayName: json['displayName'] as String?,
      size: (json['size'] as num?)?.toInt(),
      lineCount: (json['lineCount'] as num?)?.toInt(),
      lastModified: json['lastModified'] == null
          ? null
          : DateTime.parse(json['lastModified'] as String),
      exists: json['exists'] as bool?,
    );

Map<String, dynamic> _$DocumentFileInfoToJson(DocumentFileInfo instance) =>
    <String, dynamic>{
      'fileName': instance.fileName,
      'displayName': instance.displayName,
      'size': instance.size,
      'lineCount': instance.lineCount,
      'lastModified': instance.lastModified?.toIso8601String(),
      'exists': instance.exists,
    };

DocumentInfo _$DocumentInfoFromJson(Map<String, dynamic> json) => DocumentInfo(
      files: (json['files'] as List<dynamic>?)
              ?.map((e) => DocumentFileInfo.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      totalFiles: (json['totalFiles'] as num?)?.toInt(),
      existingFiles: (json['existingFiles'] as num?)?.toInt(),
      totalSize: (json['totalSize'] as num?)?.toInt(),
      lastUpdated: json['lastUpdated'] == null
          ? null
          : DateTime.parse(json['lastUpdated'] as String),
    );

Map<String, dynamic> _$DocumentInfoToJson(DocumentInfo instance) =>
    <String, dynamic>{
      'files': instance.files?.map((e) => e.toJson()).toList(),
      'totalFiles': instance.totalFiles,
      'existingFiles': instance.existingFiles,
      'totalSize': instance.totalSize,
      'lastUpdated': instance.lastUpdated?.toIso8601String(),
    };

DocumentInfoApiResponse _$DocumentInfoApiResponseFromJson(
        Map<String, dynamic> json) =>
    DocumentInfoApiResponse(
      data: json['data'] == null
          ? null
          : DocumentInfo.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$DocumentInfoApiResponseToJson(
        DocumentInfoApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

DocumentPreviewResponse _$DocumentPreviewResponseFromJson(
        Map<String, dynamic> json) =>
    DocumentPreviewResponse(
      fileName: json['fileName'] as String?,
      displayName: json['displayName'] as String?,
      previewContent: json['previewContent'] as String?,
      totalLines: (json['totalLines'] as num?)?.toInt(),
      previewLines: (json['previewLines'] as num?)?.toInt(),
      hasMore: json['hasMore'] as bool?,
      fileSize: (json['fileSize'] as num?)?.toInt(),
    );

Map<String, dynamic> _$DocumentPreviewResponseToJson(
        DocumentPreviewResponse instance) =>
    <String, dynamic>{
      'fileName': instance.fileName,
      'displayName': instance.displayName,
      'previewContent': instance.previewContent,
      'totalLines': instance.totalLines,
      'previewLines': instance.previewLines,
      'hasMore': instance.hasMore,
      'fileSize': instance.fileSize,
    };

DocumentPreviewResponseApiResponse _$DocumentPreviewResponseApiResponseFromJson(
        Map<String, dynamic> json) =>
    DocumentPreviewResponseApiResponse(
      data: json['data'] == null
          ? null
          : DocumentPreviewResponse.fromJson(
              json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$DocumentPreviewResponseApiResponseToJson(
        DocumentPreviewResponseApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

Enable2FADto _$Enable2FADtoFromJson(Map<String, dynamic> json) => Enable2FADto(
      code: json['code'] as String?,
    );

Map<String, dynamic> _$Enable2FADtoToJson(Enable2FADto instance) =>
    <String, dynamic>{
      'code': instance.code,
    };

Enum _$EnumFromJson(Map<String, dynamic> json) => Enum();

Map<String, dynamic> _$EnumToJson(Enum instance) => <String, dynamic>{};

EnumItemEntity _$EnumItemEntityFromJson(Map<String, dynamic> json) =>
    EnumItemEntity(
      id: (json['id'] as num?)?.toInt(),
      name: json['name'] as String?,
      code: json['code'] as String?,
    );

Map<String, dynamic> _$EnumItemEntityToJson(EnumItemEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'name': instance.name,
      'code': instance.code,
    };

EnumListEntity _$EnumListEntityFromJson(Map<String, dynamic> json) =>
    EnumListEntity(
      value: (json['value'] as num?)?.toInt(),
      code: json['code'] as String?,
      name: json['name'] as String?,
      isZone: json['isZone'] as bool?,
      permissions: (json['permissions'] as List<dynamic>?)
              ?.map((e) => EnumListEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$EnumListEntityToJson(EnumListEntity instance) =>
    <String, dynamic>{
      'value': instance.value,
      'code': instance.code,
      'name': instance.name,
      'isZone': instance.isZone,
      'permissions': instance.permissions?.map((e) => e.toJson()).toList(),
    };

EnumListEntityListApiResponse _$EnumListEntityListApiResponseFromJson(
        Map<String, dynamic> json) =>
    EnumListEntityListApiResponse(
      data: (json['data'] as List<dynamic>?)
              ?.map((e) => EnumListEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$EnumListEntityListApiResponseToJson(
        EnumListEntityListApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.map((e) => e.toJson()).toList(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

EssaySuggestionMarkDto _$EssaySuggestionMarkDtoFromJson(
        Map<String, dynamic> json) =>
    EssaySuggestionMarkDto(
      categoryId: (json['categoryId'] as num?)?.toInt(),
      grade: (json['grade'] as num?)?.toInt(),
      result: json['result'] as String?,
      content: json['content'] as String?,
      mark: (json['mark'] as num?)?.toDouble(),
      images: (json['images'] as List<dynamic>?)
              ?.map((e) => e as String)
              .toList() ??
          [],
    );

Map<String, dynamic> _$EssaySuggestionMarkDtoToJson(
        EssaySuggestionMarkDto instance) =>
    <String, dynamic>{
      'categoryId': instance.categoryId,
      'grade': instance.grade,
      'result': instance.result,
      'content': instance.content,
      'mark': instance.mark,
      'images': instance.images,
    };

ExamDataBeforeDeleteDto _$ExamDataBeforeDeleteDtoFromJson(
        Map<String, dynamic> json) =>
    ExamDataBeforeDeleteDto(
      countPupil: (json['countPupil'] as num?)?.toInt(),
      countPupilDone: (json['countPupilDone'] as num?)?.toInt(),
    );

Map<String, dynamic> _$ExamDataBeforeDeleteDtoToJson(
        ExamDataBeforeDeleteDto instance) =>
    <String, dynamic>{
      'countPupil': instance.countPupil,
      'countPupilDone': instance.countPupilDone,
    };

ExamDataBeforeDeleteDtoApiResponse _$ExamDataBeforeDeleteDtoApiResponseFromJson(
        Map<String, dynamic> json) =>
    ExamDataBeforeDeleteDtoApiResponse(
      data: json['data'] == null
          ? null
          : ExamDataBeforeDeleteDto.fromJson(
              json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$ExamDataBeforeDeleteDtoApiResponseToJson(
        ExamDataBeforeDeleteDtoApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

ExamDataDto _$ExamDataDtoFromJson(Map<String, dynamic> json) => ExamDataDto(
      parts: (json['parts'] as List<dynamic>?)
              ?.map((e) => ExamPartDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$ExamDataDtoToJson(ExamDataDto instance) =>
    <String, dynamic>{
      'parts': instance.parts?.map((e) => e.toJson()).toList(),
    };

ExamDataSaveDto _$ExamDataSaveDtoFromJson(Map<String, dynamic> json) =>
    ExamDataSaveDto(
      parts: (json['parts'] as List<dynamic>?)
              ?.map((e) => ExamPartSaveDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$ExamDataSaveDtoToJson(ExamDataSaveDto instance) =>
    <String, dynamic>{
      'parts': instance.parts?.map((e) => e.toJson()).toList(),
    };

ExamDto _$ExamDtoFromJson(Map<String, dynamic> json) => ExamDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      title: json['title'] as String?,
      avatar: json['avatar'] as String?,
      duration: (json['duration'] as num?)?.toInt(),
      type: examTypeEnumFromJson((json['type'] as num?)?.toInt()),
      status: examStatusEnumFromJson((json['status'] as num?)?.toInt()),
      totalMark: (json['totalMark'] as num?)?.toDouble(),
      totalQuestion: (json['totalQuestion'] as num?)?.toInt(),
      schoolId: (json['schoolId'] as num?)?.toInt(),
      classLevel: (json['classLevel'] as num?)?.toInt(),
      subjectId: (json['subjectId'] as num?)?.toInt(),
      format: examFormatEnumFromJson((json['format'] as num?)?.toInt()),
      fileUrl: json['fileUrl'] as String?,
      data: json['data'] == null
          ? null
          : ExamDataDto.fromJson(json['data'] as Map<String, dynamic>),
      categoryId: (json['categoryId'] as num?)?.toInt(),
      isSystem: json['isSystem'] as bool?,
      isAutoScoring: json['isAutoScoring'] as bool?,
      fileChoiceType: examFileChoiceTypeEnumFromJson(
          (json['fileChoiceType'] as num?)?.toInt()),
      questions: (json['questions'] as List<dynamic>?)
              ?.map(
                  (e) => ExamQuestionEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      assignExams: (json['assignExams'] as List<dynamic>?)
              ?.map((e) => AssignExamEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      tagIds: (json['tagIds'] as List<dynamic>?)
              ?.map((e) => (e as num).toInt())
              .toList() ??
          [],
      tags: (json['tags'] as List<dynamic>?)
              ?.map((e) => TagDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      canEdit: json['canEdit'] as bool?,
    );

Map<String, dynamic> _$ExamDtoToJson(ExamDto instance) => <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'title': instance.title,
      'avatar': instance.avatar,
      'duration': instance.duration,
      'type': examTypeEnumToJson(instance.type),
      'status': examStatusEnumToJson(instance.status),
      'totalMark': instance.totalMark,
      'totalQuestion': instance.totalQuestion,
      'schoolId': instance.schoolId,
      'classLevel': instance.classLevel,
      'subjectId': instance.subjectId,
      'format': examFormatEnumToJson(instance.format),
      'fileUrl': instance.fileUrl,
      'data': instance.data?.toJson(),
      'categoryId': instance.categoryId,
      'isSystem': instance.isSystem,
      'isAutoScoring': instance.isAutoScoring,
      'fileChoiceType': examFileChoiceTypeEnumToJson(instance.fileChoiceType),
      'questions': instance.questions?.map((e) => e.toJson()).toList(),
      'assignExams': instance.assignExams?.map((e) => e.toJson()).toList(),
      'tagIds': instance.tagIds,
      'tags': instance.tags?.map((e) => e.toJson()).toList(),
      'canEdit': instance.canEdit,
    };

ExamDtoApiResponse _$ExamDtoApiResponseFromJson(Map<String, dynamic> json) =>
    ExamDtoApiResponse(
      data: json['data'] == null
          ? null
          : ExamDto.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$ExamDtoApiResponseToJson(ExamDtoApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

ExamFileSaveDto _$ExamFileSaveDtoFromJson(Map<String, dynamic> json) =>
    ExamFileSaveDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      title: json['title'] as String?,
      avatar: json['avatar'] as String?,
      duration: (json['duration'] as num?)?.toInt(),
      type: examTypeEnumFromJson((json['type'] as num?)?.toInt()),
      status: examStatusEnumFromJson((json['status'] as num?)?.toInt()),
      totalMark: (json['totalMark'] as num?)?.toDouble(),
      totalQuestion: (json['totalQuestion'] as num?)?.toInt(),
      schoolId: (json['schoolId'] as num?)?.toInt(),
      classLevel: (json['classLevel'] as num?)?.toInt(),
      subjectId: (json['subjectId'] as num?)?.toInt(),
      format: examFormatEnumFromJson((json['format'] as num?)?.toInt()),
      fileUrl: json['fileUrl'] as String?,
      data: json['data'] as String?,
      categoryId: (json['categoryId'] as num?)?.toInt(),
      isSystem: json['isSystem'] as bool?,
      isAutoScoring: json['isAutoScoring'] as bool?,
      fileChoiceType: examFileChoiceTypeEnumFromJson(
          (json['fileChoiceType'] as num?)?.toInt()),
      questions: (json['questions'] as List<dynamic>?)
              ?.map((e) => QuestionDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      assignExams: (json['assignExams'] as List<dynamic>?)
              ?.map((e) => AssignExamEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$ExamFileSaveDtoToJson(ExamFileSaveDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'title': instance.title,
      'avatar': instance.avatar,
      'duration': instance.duration,
      'type': examTypeEnumToJson(instance.type),
      'status': examStatusEnumToJson(instance.status),
      'totalMark': instance.totalMark,
      'totalQuestion': instance.totalQuestion,
      'schoolId': instance.schoolId,
      'classLevel': instance.classLevel,
      'subjectId': instance.subjectId,
      'format': examFormatEnumToJson(instance.format),
      'fileUrl': instance.fileUrl,
      'data': instance.data,
      'categoryId': instance.categoryId,
      'isSystem': instance.isSystem,
      'isAutoScoring': instance.isAutoScoring,
      'fileChoiceType': examFileChoiceTypeEnumToJson(instance.fileChoiceType),
      'questions': instance.questions?.map((e) => e.toJson()).toList(),
      'assignExams': instance.assignExams?.map((e) => e.toJson()).toList(),
    };

ExamGetListQuery _$ExamGetListQueryFromJson(Map<String, dynamic> json) =>
    ExamGetListQuery(
      sortExpression: json['sortExpression'] as String?,
      pageSize: (json['pageSize'] as num?)?.toInt(),
      pageIndex: (json['pageIndex'] as num?)?.toInt(),
      skip: (json['skip'] as num?)?.toInt(),
      notSkip: (json['notSkip'] as num?)?.toInt(),
      propertyIncludes: (json['propertyIncludes'] as List<dynamic>?)
              ?.map((e) => e as String)
              .toList() ??
          [],
      keyword: json['keyword'] as String?,
      schoolId: (json['schoolId'] as num?)?.toInt(),
      userId: (json['userId'] as num?)?.toInt(),
      classLevel: (json['classLevel'] as num?)?.toInt(),
      type: examTypeEnumFromJson((json['type'] as num?)?.toInt()),
      status: examStatusEnumFromJson((json['status'] as num?)?.toInt()),
      format: examFormatEnumFromJson((json['format'] as num?)?.toInt()),
      subjectId: (json['subjectId'] as num?)?.toInt(),
      filterType: (json['filterType'] as num?)?.toInt(),
      ids: (json['ids'] as List<dynamic>?)
              ?.map((e) => (e as num).toInt())
              .toList() ??
          [],
    );

Map<String, dynamic> _$ExamGetListQueryToJson(ExamGetListQuery instance) =>
    <String, dynamic>{
      'sortExpression': instance.sortExpression,
      'pageSize': instance.pageSize,
      'pageIndex': instance.pageIndex,
      'skip': instance.skip,
      'notSkip': instance.notSkip,
      'propertyIncludes': instance.propertyIncludes,
      'keyword': instance.keyword,
      'schoolId': instance.schoolId,
      'userId': instance.userId,
      'classLevel': instance.classLevel,
      'type': examTypeEnumToJson(instance.type),
      'status': examStatusEnumToJson(instance.status),
      'format': examFormatEnumToJson(instance.format),
      'subjectId': instance.subjectId,
      'filterType': instance.filterType,
      'ids': instance.ids,
    };

ExamLearnDto _$ExamLearnDtoFromJson(Map<String, dynamic> json) => ExamLearnDto(
      id: (json['id'] as num?)?.toInt(),
      title: json['title'] as String?,
      avatar: json['avatar'] as String?,
      duration: (json['duration'] as num?)?.toInt(),
      type: examTypeEnumFromJson((json['type'] as num?)?.toInt()),
      status: examStatusEnumFromJson((json['status'] as num?)?.toInt()),
      totalMark: (json['totalMark'] as num?)?.toDouble(),
      totalQuestion: (json['totalQuestion'] as num?)?.toInt(),
      schoolId: (json['schoolId'] as num?)?.toInt(),
      classLevel: (json['classLevel'] as num?)?.toInt(),
      subjectId: (json['subjectId'] as num?)?.toInt(),
      format: examFormatEnumFromJson((json['format'] as num?)?.toInt()),
      fileUrl: json['fileUrl'] as String?,
      categoryId: (json['categoryId'] as num?)?.toInt(),
      fileChoiceType: examFileChoiceTypeEnumFromJson(
          (json['fileChoiceType'] as num?)?.toInt()),
      data: json['data'] == null
          ? null
          : ExamDataDto.fromJson(json['data'] as Map<String, dynamic>),
    );

Map<String, dynamic> _$ExamLearnDtoToJson(ExamLearnDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'title': instance.title,
      'avatar': instance.avatar,
      'duration': instance.duration,
      'type': examTypeEnumToJson(instance.type),
      'status': examStatusEnumToJson(instance.status),
      'totalMark': instance.totalMark,
      'totalQuestion': instance.totalQuestion,
      'schoolId': instance.schoolId,
      'classLevel': instance.classLevel,
      'subjectId': instance.subjectId,
      'format': examFormatEnumToJson(instance.format),
      'fileUrl': instance.fileUrl,
      'categoryId': instance.categoryId,
      'fileChoiceType': examFileChoiceTypeEnumToJson(instance.fileChoiceType),
      'data': instance.data?.toJson(),
    };

ExamListDto _$ExamListDtoFromJson(Map<String, dynamic> json) => ExamListDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      title: json['title'] as String?,
      duration: (json['duration'] as num?)?.toInt(),
      avatar: json['avatar'] as String?,
      type: examTypeEnumFromJson((json['type'] as num?)?.toInt()),
      status: examStatusEnumFromJson((json['status'] as num?)?.toInt()),
      totalMark: (json['totalMark'] as num?)?.toDouble(),
      totalQuestion: (json['totalQuestion'] as num?)?.toInt(),
      schoolId: (json['schoolId'] as num?)?.toInt(),
      classLevel: (json['classLevel'] as num?)?.toInt(),
      subjectId: (json['subjectId'] as num?)?.toInt(),
      format: examFormatEnumFromJson((json['format'] as num?)?.toInt()),
      fileUrl: json['fileUrl'] as String?,
      categoryId: (json['categoryId'] as num?)?.toInt(),
      isLike: json['isLike'] as bool?,
      isSystem: json['isSystem'] as bool?,
      canEdit: json['canEdit'] as bool?,
      isAutoScoring: json['isAutoScoring'] as bool?,
      tags: (json['tags'] as List<dynamic>?)
              ?.map((e) => TagDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      assignExamCount: (json['assignExamCount'] as num?)?.toInt(),
    );

Map<String, dynamic> _$ExamListDtoToJson(ExamListDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'title': instance.title,
      'duration': instance.duration,
      'avatar': instance.avatar,
      'type': examTypeEnumToJson(instance.type),
      'status': examStatusEnumToJson(instance.status),
      'totalMark': instance.totalMark,
      'totalQuestion': instance.totalQuestion,
      'schoolId': instance.schoolId,
      'classLevel': instance.classLevel,
      'subjectId': instance.subjectId,
      'format': examFormatEnumToJson(instance.format),
      'fileUrl': instance.fileUrl,
      'categoryId': instance.categoryId,
      'isLike': instance.isLike,
      'isSystem': instance.isSystem,
      'canEdit': instance.canEdit,
      'isAutoScoring': instance.isAutoScoring,
      'tags': instance.tags?.map((e) => e.toJson()).toList(),
      'assignExamCount': instance.assignExamCount,
    };

ExamListDtoFilterResult _$ExamListDtoFilterResultFromJson(
        Map<String, dynamic> json) =>
    ExamListDtoFilterResult(
      totalRows: (json['totalRows'] as num?)?.toInt(),
      data: (json['data'] as List<dynamic>?)
              ?.map((e) => ExamListDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$ExamListDtoFilterResultToJson(
        ExamListDtoFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

ExamListDtoFilterResultApiResponse _$ExamListDtoFilterResultApiResponseFromJson(
        Map<String, dynamic> json) =>
    ExamListDtoFilterResultApiResponse(
      data: json['data'] == null
          ? null
          : ExamListDtoFilterResult.fromJson(
              json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$ExamListDtoFilterResultApiResponseToJson(
        ExamListDtoFilterResultApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

ExamPartDto _$ExamPartDtoFromJson(Map<String, dynamic> json) => ExamPartDto(
      id: json['id'] as String?,
      title: json['title'] as String?,
      description: json['description'] as String?,
      partTime: (json['partTime'] as num?)?.toInt(),
      totalMark: (json['totalMark'] as num?)?.toDouble(),
      numberOfQuestion: (json['numberOfQuestion'] as num?)?.toInt(),
      questions: (json['questions'] as List<dynamic>?)
              ?.map((e) => QuestionDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$ExamPartDtoToJson(ExamPartDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'title': instance.title,
      'description': instance.description,
      'partTime': instance.partTime,
      'totalMark': instance.totalMark,
      'numberOfQuestion': instance.numberOfQuestion,
      'questions': instance.questions?.map((e) => e.toJson()).toList(),
    };

ExamPartQuestionSaveDto _$ExamPartQuestionSaveDtoFromJson(
        Map<String, dynamic> json) =>
    ExamPartQuestionSaveDto(
      id: (json['id'] as num?)?.toInt(),
      mark: (json['mark'] as num?)?.toDouble(),
      parentId: (json['parentId'] as num?)?.toInt(),
    );

Map<String, dynamic> _$ExamPartQuestionSaveDtoToJson(
        ExamPartQuestionSaveDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'mark': instance.mark,
      'parentId': instance.parentId,
    };

ExamPartSaveDto _$ExamPartSaveDtoFromJson(Map<String, dynamic> json) =>
    ExamPartSaveDto(
      id: json['id'] as String?,
      title: json['title'] as String?,
      partTime: (json['partTime'] as num?)?.toInt(),
      totalMark: (json['totalMark'] as num?)?.toDouble(),
      description: json['description'] as String?,
      numberOfQuestion: (json['numberOfQuestion'] as num?)?.toInt(),
      questions: (json['questions'] as List<dynamic>?)
              ?.map((e) =>
                  ExamPartQuestionSaveDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$ExamPartSaveDtoToJson(ExamPartSaveDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'title': instance.title,
      'partTime': instance.partTime,
      'totalMark': instance.totalMark,
      'description': instance.description,
      'numberOfQuestion': instance.numberOfQuestion,
      'questions': instance.questions?.map((e) => e.toJson()).toList(),
    };

ExamQuestionEntity _$ExamQuestionEntityFromJson(Map<String, dynamic> json) =>
    ExamQuestionEntity(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      examId: (json['examId'] as num?)?.toInt(),
      questionId: (json['questionId'] as num?)?.toInt(),
      mark: (json['mark'] as num?)?.toDouble(),
      parentId: (json['parentId'] as num?)?.toInt(),
    );

Map<String, dynamic> _$ExamQuestionEntityToJson(ExamQuestionEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'examId': instance.examId,
      'questionId': instance.questionId,
      'mark': instance.mark,
      'parentId': instance.parentId,
    };

ExamResultDto _$ExamResultDtoFromJson(Map<String, dynamic> json) =>
    ExamResultDto(
      userId: (json['userId'] as num?)?.toInt(),
      avatar: json['avatar'] as String?,
      fullName: json['fullName'] as String?,
      totalExam: (json['totalExam'] as num?)?.toInt(),
      totalExamDone: (json['totalExamDone'] as num?)?.toInt(),
      countTest: (json['countTest'] as num?)?.toInt(),
      countTestDone: (json['countTestDone'] as num?)?.toInt(),
      averageScoreTest: (json['averageScoreTest'] as num?)?.toDouble(),
    );

Map<String, dynamic> _$ExamResultDtoToJson(ExamResultDto instance) =>
    <String, dynamic>{
      'userId': instance.userId,
      'avatar': instance.avatar,
      'fullName': instance.fullName,
      'totalExam': instance.totalExam,
      'totalExamDone': instance.totalExamDone,
      'countTest': instance.countTest,
      'countTestDone': instance.countTestDone,
      'averageScoreTest': instance.averageScoreTest,
    };

ExamResultDtoFilterResult _$ExamResultDtoFilterResultFromJson(
        Map<String, dynamic> json) =>
    ExamResultDtoFilterResult(
      totalRows: (json['totalRows'] as num?)?.toInt(),
      data: (json['data'] as List<dynamic>?)
              ?.map((e) => ExamResultDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$ExamResultDtoFilterResultToJson(
        ExamResultDtoFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

ExamResultFilterDto _$ExamResultFilterDtoFromJson(Map<String, dynamic> json) =>
    ExamResultFilterDto(
      sortExpression: json['sortExpression'] as String?,
      pageSize: (json['pageSize'] as num?)?.toInt(),
      pageIndex: (json['pageIndex'] as num?)?.toInt(),
      skip: (json['skip'] as num?)?.toInt(),
      notSkip: (json['notSkip'] as num?)?.toInt(),
      propertyIncludes: (json['propertyIncludes'] as List<dynamic>?)
              ?.map((e) => e as String)
              .toList() ??
          [],
      keyword: json['keyword'] as String?,
      classId: (json['classId'] as num?)?.toInt(),
    );

Map<String, dynamic> _$ExamResultFilterDtoToJson(
        ExamResultFilterDto instance) =>
    <String, dynamic>{
      'sortExpression': instance.sortExpression,
      'pageSize': instance.pageSize,
      'pageIndex': instance.pageIndex,
      'skip': instance.skip,
      'notSkip': instance.notSkip,
      'propertyIncludes': instance.propertyIncludes,
      'keyword': instance.keyword,
      'classId': instance.classId,
    };

ExamSaveDto _$ExamSaveDtoFromJson(Map<String, dynamic> json) => ExamSaveDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      title: json['title'] as String?,
      avatar: json['avatar'] as String?,
      duration: (json['duration'] as num?)?.toInt(),
      type: examTypeEnumFromJson((json['type'] as num?)?.toInt()),
      status: examStatusEnumFromJson((json['status'] as num?)?.toInt()),
      totalMark: (json['totalMark'] as num?)?.toDouble(),
      totalQuestion: (json['totalQuestion'] as num?)?.toInt(),
      schoolId: (json['schoolId'] as num?)?.toInt(),
      classLevel: (json['classLevel'] as num?)?.toInt(),
      subjectId: (json['subjectId'] as num?)?.toInt(),
      format: examFormatEnumFromJson((json['format'] as num?)?.toInt()),
      fileUrl: json['fileUrl'] as String?,
      data: json['data'] == null
          ? null
          : ExamDataSaveDto.fromJson(json['data'] as Map<String, dynamic>),
      categoryId: (json['categoryId'] as num?)?.toInt(),
      isSystem: json['isSystem'] as bool?,
      isAutoScoring: json['isAutoScoring'] as bool?,
      fileChoiceType: examFileChoiceTypeEnumFromJson(
          (json['fileChoiceType'] as num?)?.toInt()),
      questions: (json['questions'] as List<dynamic>?)
              ?.map(
                  (e) => ExamQuestionEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      assignExams: (json['assignExams'] as List<dynamic>?)
              ?.map((e) => AssignExamEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      tagIds: (json['tagIds'] as List<dynamic>?)
              ?.map((e) => (e as num).toInt())
              .toList() ??
          [],
    );

Map<String, dynamic> _$ExamSaveDtoToJson(ExamSaveDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'title': instance.title,
      'avatar': instance.avatar,
      'duration': instance.duration,
      'type': examTypeEnumToJson(instance.type),
      'status': examStatusEnumToJson(instance.status),
      'totalMark': instance.totalMark,
      'totalQuestion': instance.totalQuestion,
      'schoolId': instance.schoolId,
      'classLevel': instance.classLevel,
      'subjectId': instance.subjectId,
      'format': examFormatEnumToJson(instance.format),
      'fileUrl': instance.fileUrl,
      'data': instance.data?.toJson(),
      'categoryId': instance.categoryId,
      'isSystem': instance.isSystem,
      'isAutoScoring': instance.isAutoScoring,
      'fileChoiceType': examFileChoiceTypeEnumToJson(instance.fileChoiceType),
      'questions': instance.questions?.map((e) => e.toJson()).toList(),
      'assignExams': instance.assignExams?.map((e) => e.toJson()).toList(),
      'tagIds': instance.tagIds,
    };

ExamSaveDtoApiResponse _$ExamSaveDtoApiResponseFromJson(
        Map<String, dynamic> json) =>
    ExamSaveDtoApiResponse(
      data: json['data'] == null
          ? null
          : ExamSaveDto.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$ExamSaveDtoApiResponseToJson(
        ExamSaveDtoApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

FacebookLoginDto _$FacebookLoginDtoFromJson(Map<String, dynamic> json) =>
    FacebookLoginDto(
      code: json['code'] as String?,
      accessToken: json['accessToken'] as String?,
    );

Map<String, dynamic> _$FacebookLoginDtoToJson(FacebookLoginDto instance) =>
    <String, dynamic>{
      'code': instance.code,
      'accessToken': instance.accessToken,
    };

FileEntity _$FileEntityFromJson(Map<String, dynamic> json) => FileEntity(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      name: json['name'] as String?,
      path: json['path'] as String?,
      contentType: json['contentType'] as String?,
      width: (json['width'] as num?)?.toInt(),
      height: (json['height'] as num?)?.toInt(),
      size: (json['size'] as num?)?.toInt(),
      extension: json['extension'] as String?,
      folderId: (json['folderId'] as num?)?.toInt(),
      status: (json['status'] as num?)?.toInt(),
      avatar: json['avatar'] as String?,
      thumbnails: json['thumbnails'] as String?,
      streamUrl: json['streamUrl'] as String?,
      duration: (json['duration'] as num?)?.toDouble(),
      fileType: json['fileType'] as String?,
      objectType: (json['objectType'] as num?)?.toInt(),
      parentId: (json['parentId'] as num?)?.toInt(),
      metaDatas: (json['metaDatas'] as List<dynamic>?)
              ?.map(
                  (e) => FileMetaDataEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$FileEntityToJson(FileEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'name': instance.name,
      'path': instance.path,
      'contentType': instance.contentType,
      'width': instance.width,
      'height': instance.height,
      'size': instance.size,
      'extension': instance.extension,
      'folderId': instance.folderId,
      'status': instance.status,
      'avatar': instance.avatar,
      'thumbnails': instance.thumbnails,
      'streamUrl': instance.streamUrl,
      'duration': instance.duration,
      'fileType': instance.fileType,
      'objectType': instance.objectType,
      'parentId': instance.parentId,
      'metaDatas': instance.metaDatas?.map((e) => e.toJson()).toList(),
    };

FileEntityFilterResult _$FileEntityFilterResultFromJson(
        Map<String, dynamic> json) =>
    FileEntityFilterResult(
      totalRows: (json['totalRows'] as num?)?.toInt(),
      data: (json['data'] as List<dynamic>?)
              ?.map((e) => FileEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$FileEntityFilterResultToJson(
        FileEntityFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

FileEntityFilterResultApiResponse _$FileEntityFilterResultApiResponseFromJson(
        Map<String, dynamic> json) =>
    FileEntityFilterResultApiResponse(
      data: json['data'] == null
          ? null
          : FileEntityFilterResult.fromJson(
              json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$FileEntityFilterResultApiResponseToJson(
        FileEntityFilterResultApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

FileGetListQuery _$FileGetListQueryFromJson(Map<String, dynamic> json) =>
    FileGetListQuery(
      userId: (json['userId'] as num?)?.toInt(),
      keyword: json['keyword'] as String?,
      folderId: (json['folderId'] as num?)?.toInt(),
      extensions: json['extensions'] as String?,
      isGetAll: json['isGetAll'] as bool?,
      status: (json['status'] as num?)?.toInt(),
      sortBy: json['sortBy'] as String?,
      sortDirection: json['sortDirection'] as String?,
      pageIndex: (json['pageIndex'] as num?)?.toInt(),
      pageSize: (json['pageSize'] as num?)?.toInt(),
    );

Map<String, dynamic> _$FileGetListQueryToJson(FileGetListQuery instance) =>
    <String, dynamic>{
      'userId': instance.userId,
      'keyword': instance.keyword,
      'folderId': instance.folderId,
      'extensions': instance.extensions,
      'isGetAll': instance.isGetAll,
      'status': instance.status,
      'sortBy': instance.sortBy,
      'sortDirection': instance.sortDirection,
      'pageIndex': instance.pageIndex,
      'pageSize': instance.pageSize,
    };

FileMetaDataEntity _$FileMetaDataEntityFromJson(Map<String, dynamic> json) =>
    FileMetaDataEntity(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      fileId: (json['fileId'] as num?)?.toInt(),
      metaDirectory: json['metaDirectory'] as String?,
      metaKey: json['metaKey'] as String?,
      metaValue: json['metaValue'] as String?,
    );

Map<String, dynamic> _$FileMetaDataEntityToJson(FileMetaDataEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'fileId': instance.fileId,
      'metaDirectory': instance.metaDirectory,
      'metaKey': instance.metaKey,
      'metaValue': instance.metaValue,
    };

FileMetaDataEntityListApiResponse _$FileMetaDataEntityListApiResponseFromJson(
        Map<String, dynamic> json) =>
    FileMetaDataEntityListApiResponse(
      data: (json['data'] as List<dynamic>?)
              ?.map(
                  (e) => FileMetaDataEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$FileMetaDataEntityListApiResponseToJson(
        FileMetaDataEntityListApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.map((e) => e.toJson()).toList(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

FileUpdateAvatarCommand _$FileUpdateAvatarCommandFromJson(
        Map<String, dynamic> json) =>
    FileUpdateAvatarCommand(
      id: (json['id'] as num?)?.toInt(),
      avatar: json['avatar'] as String?,
    );

Map<String, dynamic> _$FileUpdateAvatarCommandToJson(
        FileUpdateAvatarCommand instance) =>
    <String, dynamic>{
      'id': instance.id,
      'avatar': instance.avatar,
    };

FileUpdateCommand _$FileUpdateCommandFromJson(Map<String, dynamic> json) =>
    FileUpdateCommand(
      file: json['file'] == null
          ? null
          : FileEntity.fromJson(json['file'] as Map<String, dynamic>),
    );

Map<String, dynamic> _$FileUpdateCommandToJson(FileUpdateCommand instance) =>
    <String, dynamic>{
      'file': instance.file?.toJson(),
    };

FileUpdateNameCommand _$FileUpdateNameCommandFromJson(
        Map<String, dynamic> json) =>
    FileUpdateNameCommand(
      id: (json['id'] as num?)?.toInt(),
      name: json['name'] as String?,
    );

Map<String, dynamic> _$FileUpdateNameCommandToJson(
        FileUpdateNameCommand instance) =>
    <String, dynamic>{
      'id': instance.id,
      'name': instance.name,
    };

FileUpdateStatusCommand _$FileUpdateStatusCommandFromJson(
        Map<String, dynamic> json) =>
    FileUpdateStatusCommand(
      id: (json['id'] as num?)?.toInt(),
      status: fileStatusEnumFromJson((json['status'] as num?)?.toInt()),
    );

Map<String, dynamic> _$FileUpdateStatusCommandToJson(
        FileUpdateStatusCommand instance) =>
    <String, dynamic>{
      'id': instance.id,
      'status': fileStatusEnumToJson(instance.status),
    };

FileUploadByUrlResponseDto _$FileUploadByUrlResponseDtoFromJson(
        Map<String, dynamic> json) =>
    FileUploadByUrlResponseDto(
      path: json['path'] as String?,
    );

Map<String, dynamic> _$FileUploadByUrlResponseDtoToJson(
        FileUploadByUrlResponseDto instance) =>
    <String, dynamic>{
      'path': instance.path,
    };

FileUploadByUrlResponseDtoApiResponse
    _$FileUploadByUrlResponseDtoApiResponseFromJson(
            Map<String, dynamic> json) =>
        FileUploadByUrlResponseDtoApiResponse(
          data: json['data'] == null
              ? null
              : FileUploadByUrlResponseDto.fromJson(
                  json['data'] as Map<String, dynamic>),
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic> _$FileUploadByUrlResponseDtoApiResponseToJson(
        FileUploadByUrlResponseDtoApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

FolderDeleteCommand _$FolderDeleteCommandFromJson(Map<String, dynamic> json) =>
    FolderDeleteCommand(
      id: (json['id'] as num?)?.toInt(),
      moveFileToFolderId: (json['moveFileToFolderId'] as num?)?.toInt(),
    );

Map<String, dynamic> _$FolderDeleteCommandToJson(
        FolderDeleteCommand instance) =>
    <String, dynamic>{
      'id': instance.id,
      'moveFileToFolderId': instance.moveFileToFolderId,
    };

FolderEntity _$FolderEntityFromJson(Map<String, dynamic> json) => FolderEntity(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      name: json['name'] as String?,
      parentId: (json['parentId'] as num?)?.toInt(),
    );

Map<String, dynamic> _$FolderEntityToJson(FolderEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'name': instance.name,
      'parentId': instance.parentId,
    };

FolderEntityApiResponse _$FolderEntityApiResponseFromJson(
        Map<String, dynamic> json) =>
    FolderEntityApiResponse(
      data: json['data'] == null
          ? null
          : FolderEntity.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$FolderEntityApiResponseToJson(
        FolderEntityApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

FolderGetAllQuery _$FolderGetAllQueryFromJson(Map<String, dynamic> json) =>
    FolderGetAllQuery();

Map<String, dynamic> _$FolderGetAllQueryToJson(FolderGetAllQuery instance) =>
    <String, dynamic>{};

FolderGetListQuery _$FolderGetListQueryFromJson(Map<String, dynamic> json) =>
    FolderGetListQuery(
      keyword: json['keyword'] as String?,
      isGetAll: json['isGetAll'] as bool?,
    );

Map<String, dynamic> _$FolderGetListQueryToJson(FolderGetListQuery instance) =>
    <String, dynamic>{
      'keyword': instance.keyword,
      'isGetAll': instance.isGetAll,
    };

FolderNodeDataDto _$FolderNodeDataDtoFromJson(Map<String, dynamic> json) =>
    FolderNodeDataDto(
      id: (json['id'] as num?)?.toInt(),
      parentId: (json['parentId'] as num?)?.toInt(),
      fileCount: (json['fileCount'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
    );

Map<String, dynamic> _$FolderNodeDataDtoToJson(FolderNodeDataDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'parentId': instance.parentId,
      'fileCount': instance.fileCount,
      'createdBy': instance.createdBy,
    };

FolderNodeDto _$FolderNodeDtoFromJson(Map<String, dynamic> json) =>
    FolderNodeDto(
      id: json['id'] as String?,
      text: json['text'] as String?,
      data: json['data'] == null
          ? null
          : FolderNodeDataDto.fromJson(json['data'] as Map<String, dynamic>),
      children: (json['children'] as List<dynamic>?)
              ?.map((e) => FolderNodeDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      state: json['state'] == null
          ? null
          : FolderNodeStateDto.fromJson(json['state'] as Map<String, dynamic>),
    );

Map<String, dynamic> _$FolderNodeDtoToJson(FolderNodeDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'text': instance.text,
      'data': instance.data?.toJson(),
      'children': instance.children?.map((e) => e.toJson()).toList(),
      'state': instance.state?.toJson(),
    };

FolderNodeDtoListApiResponse _$FolderNodeDtoListApiResponseFromJson(
        Map<String, dynamic> json) =>
    FolderNodeDtoListApiResponse(
      data: (json['data'] as List<dynamic>?)
              ?.map((e) => FolderNodeDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$FolderNodeDtoListApiResponseToJson(
        FolderNodeDtoListApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.map((e) => e.toJson()).toList(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

FolderNodeStateDto _$FolderNodeStateDtoFromJson(Map<String, dynamic> json) =>
    FolderNodeStateDto(
      selected: json['selected'] as bool?,
      opened: json['opened'] as bool?,
      disabled: json['disabled'] as bool?,
    );

Map<String, dynamic> _$FolderNodeStateDtoToJson(FolderNodeStateDto instance) =>
    <String, dynamic>{
      'selected': instance.selected,
      'opened': instance.opened,
      'disabled': instance.disabled,
    };

FolderUpdateCommand _$FolderUpdateCommandFromJson(Map<String, dynamic> json) =>
    FolderUpdateCommand(
      folder: json['folder'] == null
          ? null
          : FolderUpdateDto.fromJson(json['folder'] as Map<String, dynamic>),
    );

Map<String, dynamic> _$FolderUpdateCommandToJson(
        FolderUpdateCommand instance) =>
    <String, dynamic>{
      'folder': instance.folder?.toJson(),
    };

FolderUpdateDto _$FolderUpdateDtoFromJson(Map<String, dynamic> json) =>
    FolderUpdateDto(
      id: (json['id'] as num?)?.toInt(),
      name: json['name'] as String?,
      parentId: (json['parentId'] as num?)?.toInt(),
    );

Map<String, dynamic> _$FolderUpdateDtoToJson(FolderUpdateDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'name': instance.name,
      'parentId': instance.parentId,
    };

ForgotPasswordCheckOTPResource _$ForgotPasswordCheckOTPResourceFromJson(
        Map<String, dynamic> json) =>
    ForgotPasswordCheckOTPResource(
      username: json['username'] as String?,
      otp: json['otp'] as String?,
    );

Map<String, dynamic> _$ForgotPasswordCheckOTPResourceToJson(
        ForgotPasswordCheckOTPResource instance) =>
    <String, dynamic>{
      'username': instance.username,
      'otp': instance.otp,
    };

GalleryEntity _$GalleryEntityFromJson(Map<String, dynamic> json) =>
    GalleryEntity(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      name: json['name'] as String?,
      description: json['description'] as String?,
      media: json['media'] as String?,
      categoryId: (json['categoryId'] as num?)?.toInt(),
      status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()),
      metaTitle: json['metaTitle'] as String?,
      metaDescription: json['metaDescription'] as String?,
      metaKeywords: json['metaKeywords'] as String?,
      slug: json['slug'] as String?,
    );

Map<String, dynamic> _$GalleryEntityToJson(GalleryEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'name': instance.name,
      'description': instance.description,
      'media': instance.media,
      'categoryId': instance.categoryId,
      'status': commonStatusEnumToJson(instance.status),
      'metaTitle': instance.metaTitle,
      'metaDescription': instance.metaDescription,
      'metaKeywords': instance.metaKeywords,
      'slug': instance.slug,
    };

GalleryEntityApiResponse _$GalleryEntityApiResponseFromJson(
        Map<String, dynamic> json) =>
    GalleryEntityApiResponse(
      data: json['data'] == null
          ? null
          : GalleryEntity.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$GalleryEntityApiResponseToJson(
        GalleryEntityApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

GalleryGetListQuery _$GalleryGetListQueryFromJson(Map<String, dynamic> json) =>
    GalleryGetListQuery(
      sortExpression: json['sortExpression'] as String?,
      pageSize: (json['pageSize'] as num?)?.toInt(),
      pageIndex: (json['pageIndex'] as num?)?.toInt(),
      skip: (json['skip'] as num?)?.toInt(),
      notSkip: (json['notSkip'] as num?)?.toInt(),
      propertyIncludes: (json['propertyIncludes'] as List<dynamic>?)
              ?.map((e) => e as String)
              .toList() ??
          [],
      keyword: json['keyword'] as String?,
      categoryId: (json['categoryId'] as num?)?.toInt(),
      categoryUrl: json['categoryUrl'] as String?,
      status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()),
    );

Map<String, dynamic> _$GalleryGetListQueryToJson(
        GalleryGetListQuery instance) =>
    <String, dynamic>{
      'sortExpression': instance.sortExpression,
      'pageSize': instance.pageSize,
      'pageIndex': instance.pageIndex,
      'skip': instance.skip,
      'notSkip': instance.notSkip,
      'propertyIncludes': instance.propertyIncludes,
      'keyword': instance.keyword,
      'categoryId': instance.categoryId,
      'categoryUrl': instance.categoryUrl,
      'status': commonStatusEnumToJson(instance.status),
    };

GalleryListDto _$GalleryListDtoFromJson(Map<String, dynamic> json) =>
    GalleryListDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      name: json['name'] as String?,
      description: json['description'] as String?,
      media: json['media'] as String?,
      categoryId: (json['categoryId'] as num?)?.toInt(),
      status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()),
      metaTitle: json['metaTitle'] as String?,
      metaDescription: json['metaDescription'] as String?,
      metaKeywords: json['metaKeywords'] as String?,
      slug: json['slug'] as String?,
      tagIds: (json['tagIds'] as List<dynamic>?)
              ?.map((e) => (e as num).toInt())
              .toList() ??
          [],
    );

Map<String, dynamic> _$GalleryListDtoToJson(GalleryListDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'name': instance.name,
      'description': instance.description,
      'media': instance.media,
      'categoryId': instance.categoryId,
      'status': commonStatusEnumToJson(instance.status),
      'metaTitle': instance.metaTitle,
      'metaDescription': instance.metaDescription,
      'metaKeywords': instance.metaKeywords,
      'slug': instance.slug,
      'tagIds': instance.tagIds,
    };

GalleryListDtoFilterResult _$GalleryListDtoFilterResultFromJson(
        Map<String, dynamic> json) =>
    GalleryListDtoFilterResult(
      totalRows: (json['totalRows'] as num?)?.toInt(),
      data: (json['data'] as List<dynamic>?)
              ?.map((e) => GalleryListDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$GalleryListDtoFilterResultToJson(
        GalleryListDtoFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

GalleryListDtoFilterResultApiResponse
    _$GalleryListDtoFilterResultApiResponseFromJson(
            Map<String, dynamic> json) =>
        GalleryListDtoFilterResultApiResponse(
          data: json['data'] == null
              ? null
              : GalleryListDtoFilterResult.fromJson(
                  json['data'] as Map<String, dynamic>),
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic> _$GalleryListDtoFilterResultApiResponseToJson(
        GalleryListDtoFilterResultApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

GallerySaveDto _$GallerySaveDtoFromJson(Map<String, dynamic> json) =>
    GallerySaveDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      name: json['name'] as String?,
      description: json['description'] as String?,
      media: json['media'] as String?,
      categoryId: (json['categoryId'] as num?)?.toInt(),
      status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()),
      metaTitle: json['metaTitle'] as String?,
      metaDescription: json['metaDescription'] as String?,
      metaKeywords: json['metaKeywords'] as String?,
      slug: json['slug'] as String?,
      tagIds: (json['tagIds'] as List<dynamic>?)
              ?.map((e) => (e as num).toInt())
              .toList() ??
          [],
    );

Map<String, dynamic> _$GallerySaveDtoToJson(GallerySaveDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'name': instance.name,
      'description': instance.description,
      'media': instance.media,
      'categoryId': instance.categoryId,
      'status': commonStatusEnumToJson(instance.status),
      'metaTitle': instance.metaTitle,
      'metaDescription': instance.metaDescription,
      'metaKeywords': instance.metaKeywords,
      'slug': instance.slug,
      'tagIds': instance.tagIds,
    };

GallerySaveDtoApiResponse _$GallerySaveDtoApiResponseFromJson(
        Map<String, dynamic> json) =>
    GallerySaveDtoApiResponse(
      data: json['data'] == null
          ? null
          : GallerySaveDto.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$GallerySaveDtoApiResponseToJson(
        GallerySaveDtoApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

GetListLogQuery _$GetListLogQueryFromJson(Map<String, dynamic> json) =>
    GetListLogQuery(
      keyword: json['keyword'] as String?,
      objectType: json['objectType'] as String?,
      pageIndex: (json['pageIndex'] as num?)?.toInt(),
      pageSize: (json['pageSize'] as num?)?.toInt(),
    );

Map<String, dynamic> _$GetListLogQueryToJson(GetListLogQuery instance) =>
    <String, dynamic>{
      'keyword': instance.keyword,
      'objectType': instance.objectType,
      'pageIndex': instance.pageIndex,
      'pageSize': instance.pageSize,
    };

GetListUserForCreateChatGroupQuery _$GetListUserForCreateChatGroupQueryFromJson(
        Map<String, dynamic> json) =>
    GetListUserForCreateChatGroupQuery(
      sortExpression: json['sortExpression'] as String?,
      pageSize: (json['pageSize'] as num?)?.toInt(),
      pageIndex: (json['pageIndex'] as num?)?.toInt(),
      skip: (json['skip'] as num?)?.toInt(),
      notSkip: (json['notSkip'] as num?)?.toInt(),
      propertyIncludes: (json['propertyIncludes'] as List<dynamic>?)
              ?.map((e) => e as String)
              .toList() ??
          [],
      status: (json['status'] as num?)?.toInt(),
      chatGroupType: (json['chatGroupType'] as num?)?.toInt(),
      keyword: json['keyword'] as String?,
      roleIds: (json['roleIds'] as List<dynamic>?)
              ?.map((e) => (e as num).toInt())
              .toList() ??
          [],
      type: userTypeEnumFromJson((json['type'] as num?)?.toInt()),
      objectId: (json['objectId'] as num?)?.toInt(),
    );

Map<String, dynamic> _$GetListUserForCreateChatGroupQueryToJson(
        GetListUserForCreateChatGroupQuery instance) =>
    <String, dynamic>{
      'sortExpression': instance.sortExpression,
      'pageSize': instance.pageSize,
      'pageIndex': instance.pageIndex,
      'skip': instance.skip,
      'notSkip': instance.notSkip,
      'propertyIncludes': instance.propertyIncludes,
      'status': instance.status,
      'chatGroupType': instance.chatGroupType,
      'keyword': instance.keyword,
      'roleIds': instance.roleIds,
      'type': userTypeEnumToJson(instance.type),
      'objectId': instance.objectId,
    };

GoogleLoginDto _$GoogleLoginDtoFromJson(Map<String, dynamic> json) =>
    GoogleLoginDto(
      code: json['code'] as String?,
      accessToken: json['accessToken'] as String?,
    );

Map<String, dynamic> _$GoogleLoginDtoToJson(GoogleLoginDto instance) =>
    <String, dynamic>{
      'code': instance.code,
      'accessToken': instance.accessToken,
    };

Int64ApiResponse _$Int64ApiResponseFromJson(Map<String, dynamic> json) =>
    Int64ApiResponse(
      data: (json['data'] as num?)?.toInt(),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$Int64ApiResponseToJson(Int64ApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data,
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

ListActivityLogDto _$ListActivityLogDtoFromJson(Map<String, dynamic> json) =>
    ListActivityLogDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      title: json['title'] as String?,
      data: json['data'] as String?,
      objectType: json['objectType'] as String?,
      ip: json['ip'] as String?,
      createdName: json['createdName'] as String?,
      createdAvatar: json['createdAvatar'] as String?,
    );

Map<String, dynamic> _$ListActivityLogDtoToJson(ListActivityLogDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'title': instance.title,
      'data': instance.data,
      'objectType': instance.objectType,
      'ip': instance.ip,
      'createdName': instance.createdName,
      'createdAvatar': instance.createdAvatar,
    };

ListActivityLogDtoFilterResult _$ListActivityLogDtoFilterResultFromJson(
        Map<String, dynamic> json) =>
    ListActivityLogDtoFilterResult(
      totalRows: (json['totalRows'] as num?)?.toInt(),
      data: (json['data'] as List<dynamic>?)
              ?.map(
                  (e) => ListActivityLogDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$ListActivityLogDtoFilterResultToJson(
        ListActivityLogDtoFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

ListActivityLogDtoFilterResultApiResponse
    _$ListActivityLogDtoFilterResultApiResponseFromJson(
            Map<String, dynamic> json) =>
        ListActivityLogDtoFilterResultApiResponse(
          data: json['data'] == null
              ? null
              : ListActivityLogDtoFilterResult.fromJson(
                  json['data'] as Map<String, dynamic>),
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic> _$ListActivityLogDtoFilterResultApiResponseToJson(
        ListActivityLogDtoFilterResultApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

ListChatGroupDto _$ListChatGroupDtoFromJson(Map<String, dynamic> json) =>
    ListChatGroupDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      name: json['name'] as String?,
      avatar: json['avatar'] as String?,
      status: (json['status'] as num?)?.toInt(),
      type: (json['type'] as num?)?.toInt(),
      documentId: (json['documentId'] as num?)?.toInt(),
      lastMessage: json['lastMessage'] as String?,
      lastMessageDate: json['lastMessageDate'] == null
          ? null
          : DateTime.parse(json['lastMessageDate'] as String),
      isOnline: json['isOnline'] as bool?,
      lastMessageType: (json['lastMessageType'] as num?)?.toInt(),
      friendId: (json['friendId'] as num?)?.toInt(),
      lastMessageId: (json['lastMessageId'] as num?)?.toInt(),
      lastMessageIsRead: json['lastMessageIsRead'] as bool?,
    );

Map<String, dynamic> _$ListChatGroupDtoToJson(ListChatGroupDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'name': instance.name,
      'avatar': instance.avatar,
      'status': instance.status,
      'type': instance.type,
      'documentId': instance.documentId,
      'lastMessage': instance.lastMessage,
      'lastMessageDate': instance.lastMessageDate?.toIso8601String(),
      'isOnline': instance.isOnline,
      'lastMessageType': instance.lastMessageType,
      'friendId': instance.friendId,
      'lastMessageId': instance.lastMessageId,
      'lastMessageIsRead': instance.lastMessageIsRead,
    };

ListChatGroupDtoFilterResult _$ListChatGroupDtoFilterResultFromJson(
        Map<String, dynamic> json) =>
    ListChatGroupDtoFilterResult(
      totalRows: (json['totalRows'] as num?)?.toInt(),
      data: (json['data'] as List<dynamic>?)
              ?.map((e) => ListChatGroupDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$ListChatGroupDtoFilterResultToJson(
        ListChatGroupDtoFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

ListChatGroupDtoFilterResultApiResponse
    _$ListChatGroupDtoFilterResultApiResponseFromJson(
            Map<String, dynamic> json) =>
        ListChatGroupDtoFilterResultApiResponse(
          data: json['data'] == null
              ? null
              : ListChatGroupDtoFilterResult.fromJson(
                  json['data'] as Map<String, dynamic>),
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic> _$ListChatGroupDtoFilterResultApiResponseToJson(
        ListChatGroupDtoFilterResultApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

ListChatMessageByGroupDto _$ListChatMessageByGroupDtoFromJson(
        Map<String, dynamic> json) =>
    ListChatMessageByGroupDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      senderId: (json['senderId'] as num?)?.toInt(),
      chatGroupId: (json['chatGroupId'] as num?)?.toInt(),
      content: json['content'] as String?,
      type: (json['type'] as num?)?.toInt(),
      senderName: json['senderName'] as String?,
      senderAvatar: json['senderAvatar'] as String?,
      chatGroupName: json['chatGroupName'] as String?,
      chatGroupAvatar: json['chatGroupAvatar'] as String?,
      listFilePath: (json['listFilePath'] as List<dynamic>?)
              ?.map((e) => e as String)
              .toList() ??
          [],
      isOnline: json['isOnline'] as bool?,
      chatGroupType: (json['chatGroupType'] as num?)?.toInt(),
      isRead: json['isRead'] as bool?,
    );

Map<String, dynamic> _$ListChatMessageByGroupDtoToJson(
        ListChatMessageByGroupDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'senderId': instance.senderId,
      'chatGroupId': instance.chatGroupId,
      'content': instance.content,
      'type': instance.type,
      'senderName': instance.senderName,
      'senderAvatar': instance.senderAvatar,
      'chatGroupName': instance.chatGroupName,
      'chatGroupAvatar': instance.chatGroupAvatar,
      'listFilePath': instance.listFilePath,
      'isOnline': instance.isOnline,
      'chatGroupType': instance.chatGroupType,
      'isRead': instance.isRead,
    };

ListChatMessageByGroupDtoFilterResult
    _$ListChatMessageByGroupDtoFilterResultFromJson(
            Map<String, dynamic> json) =>
        ListChatMessageByGroupDtoFilterResult(
          totalRows: (json['totalRows'] as num?)?.toInt(),
          data: (json['data'] as List<dynamic>?)
                  ?.map((e) => ListChatMessageByGroupDto.fromJson(
                      e as Map<String, dynamic>))
                  .toList() ??
              [],
        );

Map<String, dynamic> _$ListChatMessageByGroupDtoFilterResultToJson(
        ListChatMessageByGroupDtoFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

ListChatMessageByGroupDtoFilterResultApiResponse
    _$ListChatMessageByGroupDtoFilterResultApiResponseFromJson(
            Map<String, dynamic> json) =>
        ListChatMessageByGroupDtoFilterResultApiResponse(
          data: json['data'] == null
              ? null
              : ListChatMessageByGroupDtoFilterResult.fromJson(
                  json['data'] as Map<String, dynamic>),
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic> _$ListChatMessageByGroupDtoFilterResultApiResponseToJson(
        ListChatMessageByGroupDtoFilterResultApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

LocalityEntity _$LocalityEntityFromJson(Map<String, dynamic> json) =>
    LocalityEntity(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      code: json['code'] as String?,
      name: json['name'] as String?,
      fullName: json['fullName'] as String?,
      otherName: json['otherName'] as String?,
      url: json['url'] as String?,
      unitType: json['unitType'] as String?,
      parentId: (json['parentId'] as num?)?.toInt(),
      priority: (json['priority'] as num?)?.toInt(),
      type: localityTypeEnumFromJson((json['type'] as num?)?.toInt()),
      status: localityStatusEnumFromJson((json['status'] as num?)?.toInt()),
    );

Map<String, dynamic> _$LocalityEntityToJson(LocalityEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'code': instance.code,
      'name': instance.name,
      'fullName': instance.fullName,
      'otherName': instance.otherName,
      'url': instance.url,
      'unitType': instance.unitType,
      'parentId': instance.parentId,
      'priority': instance.priority,
      'type': localityTypeEnumToJson(instance.type),
      'status': localityStatusEnumToJson(instance.status),
    };

LocalityEntityFilterResult _$LocalityEntityFilterResultFromJson(
        Map<String, dynamic> json) =>
    LocalityEntityFilterResult(
      totalRows: (json['totalRows'] as num?)?.toInt(),
      data: (json['data'] as List<dynamic>?)
              ?.map((e) => LocalityEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$LocalityEntityFilterResultToJson(
        LocalityEntityFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

LocalityEntityFilterResultApiResponse
    _$LocalityEntityFilterResultApiResponseFromJson(
            Map<String, dynamic> json) =>
        LocalityEntityFilterResultApiResponse(
          data: json['data'] == null
              ? null
              : LocalityEntityFilterResult.fromJson(
                  json['data'] as Map<String, dynamic>),
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic> _$LocalityEntityFilterResultApiResponseToJson(
        LocalityEntityFilterResultApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

LocalityEntityListApiResponse _$LocalityEntityListApiResponseFromJson(
        Map<String, dynamic> json) =>
    LocalityEntityListApiResponse(
      data: (json['data'] as List<dynamic>?)
              ?.map((e) => LocalityEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$LocalityEntityListApiResponseToJson(
        LocalityEntityListApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.map((e) => e.toJson()).toList(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

LocalityGetListQuery _$LocalityGetListQueryFromJson(
        Map<String, dynamic> json) =>
    LocalityGetListQuery(
      sortExpression: json['sortExpression'] as String?,
      pageSize: (json['pageSize'] as num?)?.toInt(),
      pageIndex: (json['pageIndex'] as num?)?.toInt(),
      skip: (json['skip'] as num?)?.toInt(),
      notSkip: (json['notSkip'] as num?)?.toInt(),
      propertyIncludes: (json['propertyIncludes'] as List<dynamic>?)
              ?.map((e) => e as String)
              .toList() ??
          [],
      keyword: json['keyword'] as String?,
      type: localityTypeEnumFromJson((json['type'] as num?)?.toInt()),
      parentId: (json['parentId'] as num?)?.toInt(),
    );

Map<String, dynamic> _$LocalityGetListQueryToJson(
        LocalityGetListQuery instance) =>
    <String, dynamic>{
      'sortExpression': instance.sortExpression,
      'pageSize': instance.pageSize,
      'pageIndex': instance.pageIndex,
      'skip': instance.skip,
      'notSkip': instance.notSkip,
      'propertyIncludes': instance.propertyIncludes,
      'keyword': instance.keyword,
      'type': localityTypeEnumToJson(instance.type),
      'parentId': instance.parentId,
    };

LoginDto _$LoginDtoFromJson(Map<String, dynamic> json) => LoginDto(
      userName: json['userName'] as String?,
      password: json['password'] as String?,
      rememberMe: json['rememberMe'] as bool?,
      captchaText: json['captchaText'] as String?,
      captchaToken: json['captchaToken'] as String?,
      captchaInputText: json['captchaInputText'] as String?,
    );

Map<String, dynamic> _$LoginDtoToJson(LoginDto instance) => <String, dynamic>{
      'userName': instance.userName,
      'password': instance.password,
      'rememberMe': instance.rememberMe,
      'captchaText': instance.captchaText,
      'captchaToken': instance.captchaToken,
      'captchaInputText': instance.captchaInputText,
    };

LoginResponseDto _$LoginResponseDtoFromJson(Map<String, dynamic> json) =>
    LoginResponseDto(
      require2Fa: json['require2Fa'] as bool?,
      token: json['token'] as String?,
      refreshToken: json['refreshToken'] as String?,
      userInfo: json['userInfo'] == null
          ? null
          : UserInfoDto.fromJson(json['userInfo'] as Map<String, dynamic>),
    );

Map<String, dynamic> _$LoginResponseDtoToJson(LoginResponseDto instance) =>
    <String, dynamic>{
      'require2Fa': instance.require2Fa,
      'token': instance.token,
      'refreshToken': instance.refreshToken,
      'userInfo': instance.userInfo?.toJson(),
    };

LoginResponseDtoApiResponse _$LoginResponseDtoApiResponseFromJson(
        Map<String, dynamic> json) =>
    LoginResponseDtoApiResponse(
      data: json['data'] == null
          ? null
          : LoginResponseDto.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$LoginResponseDtoApiResponseToJson(
        LoginResponseDtoApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

LoginWith2FADto _$LoginWith2FADtoFromJson(Map<String, dynamic> json) =>
    LoginWith2FADto(
      userName: json['userName'] as String?,
      code: json['code'] as String?,
    );

Map<String, dynamic> _$LoginWith2FADtoToJson(LoginWith2FADto instance) =>
    <String, dynamic>{
      'userName': instance.userName,
      'code': instance.code,
    };

NewsDetailDto _$NewsDetailDtoFromJson(Map<String, dynamic> json) =>
    NewsDetailDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      title: json['title'] as String?,
      summary: json['summary'] as String?,
      content: json['content'] as String?,
      image: json['image'] as String?,
      author: json['author'] as String?,
      publishedDate: json['publishedDate'] == null
          ? null
          : DateTime.parse(json['publishedDate'] as String),
      viewCount: (json['viewCount'] as num?)?.toInt(),
      status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()),
      metaTitle: json['metaTitle'] as String?,
      metaDescription: json['metaDescription'] as String?,
      metaKeywords: json['metaKeywords'] as String?,
      slug: json['slug'] as String?,
      categoryId: (json['categoryId'] as num?)?.toInt(),
      isFeatured: json['isFeatured'] as bool?,
      relatedNewsIds: (json['relatedNewsIds'] as List<dynamic>?)
              ?.map((e) => (e as num).toInt())
              .toList() ??
          [],
      tagIds: (json['tagIds'] as List<dynamic>?)
              ?.map((e) => (e as num).toInt())
              .toList() ??
          [],
      tags: (json['tags'] as List<dynamic>?)
              ?.map((e) => TagDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      relatedNews: (json['relatedNews'] as List<dynamic>?)
              ?.map((e) => NewsListDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      category: json['category'],
    );

Map<String, dynamic> _$NewsDetailDtoToJson(NewsDetailDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'title': instance.title,
      'summary': instance.summary,
      'content': instance.content,
      'image': instance.image,
      'author': instance.author,
      'publishedDate': instance.publishedDate?.toIso8601String(),
      'viewCount': instance.viewCount,
      'status': commonStatusEnumToJson(instance.status),
      'metaTitle': instance.metaTitle,
      'metaDescription': instance.metaDescription,
      'metaKeywords': instance.metaKeywords,
      'slug': instance.slug,
      'categoryId': instance.categoryId,
      'isFeatured': instance.isFeatured,
      'relatedNewsIds': instance.relatedNewsIds,
      'tagIds': instance.tagIds,
      'tags': instance.tags?.map((e) => e.toJson()).toList(),
      'relatedNews': instance.relatedNews?.map((e) => e.toJson()).toList(),
      'category': instance.category,
    };

NewsDetailDtoApiResponse _$NewsDetailDtoApiResponseFromJson(
        Map<String, dynamic> json) =>
    NewsDetailDtoApiResponse(
      data: json['data'] == null
          ? null
          : NewsDetailDto.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$NewsDetailDtoApiResponseToJson(
        NewsDetailDtoApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

NewsEntity _$NewsEntityFromJson(Map<String, dynamic> json) => NewsEntity(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      title: json['title'] as String?,
      summary: json['summary'] as String?,
      content: json['content'] as String?,
      image: json['image'] as String?,
      author: json['author'] as String?,
      publishedDate: json['publishedDate'] == null
          ? null
          : DateTime.parse(json['publishedDate'] as String),
      viewCount: (json['viewCount'] as num?)?.toInt(),
      status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()),
      metaTitle: json['metaTitle'] as String?,
      metaDescription: json['metaDescription'] as String?,
      metaKeywords: json['metaKeywords'] as String?,
      slug: json['slug'] as String?,
      categoryId: (json['categoryId'] as num?)?.toInt(),
      isFeatured: json['isFeatured'] as bool?,
      relatedNewsIds: json['relatedNewsIds'] as String?,
    );

Map<String, dynamic> _$NewsEntityToJson(NewsEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'title': instance.title,
      'summary': instance.summary,
      'content': instance.content,
      'image': instance.image,
      'author': instance.author,
      'publishedDate': instance.publishedDate?.toIso8601String(),
      'viewCount': instance.viewCount,
      'status': commonStatusEnumToJson(instance.status),
      'metaTitle': instance.metaTitle,
      'metaDescription': instance.metaDescription,
      'metaKeywords': instance.metaKeywords,
      'slug': instance.slug,
      'categoryId': instance.categoryId,
      'isFeatured': instance.isFeatured,
      'relatedNewsIds': instance.relatedNewsIds,
    };

NewsEntityApiResponse _$NewsEntityApiResponseFromJson(
        Map<String, dynamic> json) =>
    NewsEntityApiResponse(
      data: json['data'] == null
          ? null
          : NewsEntity.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$NewsEntityApiResponseToJson(
        NewsEntityApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

NewsGetListQuery _$NewsGetListQueryFromJson(Map<String, dynamic> json) =>
    NewsGetListQuery(
      sortExpression: json['sortExpression'] as String?,
      pageSize: (json['pageSize'] as num?)?.toInt(),
      pageIndex: (json['pageIndex'] as num?)?.toInt(),
      skip: (json['skip'] as num?)?.toInt(),
      notSkip: (json['notSkip'] as num?)?.toInt(),
      propertyIncludes: (json['propertyIncludes'] as List<dynamic>?)
              ?.map((e) => e as String)
              .toList() ??
          [],
      keyword: json['keyword'] as String?,
      categoryId: (json['categoryId'] as num?)?.toInt(),
      categoryUrl: json['categoryUrl'] as String?,
      tagId: (json['tagId'] as num?)?.toInt(),
      status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()),
      isFeatured: json['isFeatured'] as bool?,
      excludeIds: (json['excludeIds'] as List<dynamic>?)
              ?.map((e) => (e as num).toInt())
              .toList() ??
          [],
      includeIds: (json['includeIds'] as List<dynamic>?)
              ?.map((e) => (e as num).toInt())
              .toList() ??
          [],
    );

Map<String, dynamic> _$NewsGetListQueryToJson(NewsGetListQuery instance) =>
    <String, dynamic>{
      'sortExpression': instance.sortExpression,
      'pageSize': instance.pageSize,
      'pageIndex': instance.pageIndex,
      'skip': instance.skip,
      'notSkip': instance.notSkip,
      'propertyIncludes': instance.propertyIncludes,
      'keyword': instance.keyword,
      'categoryId': instance.categoryId,
      'categoryUrl': instance.categoryUrl,
      'tagId': instance.tagId,
      'status': commonStatusEnumToJson(instance.status),
      'isFeatured': instance.isFeatured,
      'excludeIds': instance.excludeIds,
      'includeIds': instance.includeIds,
    };

NewsListDto _$NewsListDtoFromJson(Map<String, dynamic> json) => NewsListDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      title: json['title'] as String?,
      summary: json['summary'] as String?,
      content: json['content'] as String?,
      image: json['image'] as String?,
      author: json['author'] as String?,
      publishedDate: json['publishedDate'] == null
          ? null
          : DateTime.parse(json['publishedDate'] as String),
      viewCount: (json['viewCount'] as num?)?.toInt(),
      status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()),
      metaTitle: json['metaTitle'] as String?,
      metaDescription: json['metaDescription'] as String?,
      metaKeywords: json['metaKeywords'] as String?,
      slug: json['slug'] as String?,
      categoryId: (json['categoryId'] as num?)?.toInt(),
      isFeatured: json['isFeatured'] as bool?,
      relatedNewsIds: (json['relatedNewsIds'] as List<dynamic>?)
              ?.map((e) => (e as num).toInt())
              .toList() ??
          [],
      tagIds: (json['tagIds'] as List<dynamic>?)
              ?.map((e) => (e as num).toInt())
              .toList() ??
          [],
    );

Map<String, dynamic> _$NewsListDtoToJson(NewsListDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'title': instance.title,
      'summary': instance.summary,
      'content': instance.content,
      'image': instance.image,
      'author': instance.author,
      'publishedDate': instance.publishedDate?.toIso8601String(),
      'viewCount': instance.viewCount,
      'status': commonStatusEnumToJson(instance.status),
      'metaTitle': instance.metaTitle,
      'metaDescription': instance.metaDescription,
      'metaKeywords': instance.metaKeywords,
      'slug': instance.slug,
      'categoryId': instance.categoryId,
      'isFeatured': instance.isFeatured,
      'relatedNewsIds': instance.relatedNewsIds,
      'tagIds': instance.tagIds,
    };

NewsListDtoFilterResult _$NewsListDtoFilterResultFromJson(
        Map<String, dynamic> json) =>
    NewsListDtoFilterResult(
      totalRows: (json['totalRows'] as num?)?.toInt(),
      data: (json['data'] as List<dynamic>?)
              ?.map((e) => NewsListDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$NewsListDtoFilterResultToJson(
        NewsListDtoFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

NewsListDtoFilterResultApiResponse _$NewsListDtoFilterResultApiResponseFromJson(
        Map<String, dynamic> json) =>
    NewsListDtoFilterResultApiResponse(
      data: json['data'] == null
          ? null
          : NewsListDtoFilterResult.fromJson(
              json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$NewsListDtoFilterResultApiResponseToJson(
        NewsListDtoFilterResultApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

NewsSaveDto _$NewsSaveDtoFromJson(Map<String, dynamic> json) => NewsSaveDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      title: json['title'] as String?,
      summary: json['summary'] as String?,
      content: json['content'] as String?,
      image: json['image'] as String?,
      author: json['author'] as String?,
      publishedDate: json['publishedDate'] == null
          ? null
          : DateTime.parse(json['publishedDate'] as String),
      viewCount: (json['viewCount'] as num?)?.toInt(),
      status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()),
      metaTitle: json['metaTitle'] as String?,
      metaDescription: json['metaDescription'] as String?,
      metaKeywords: json['metaKeywords'] as String?,
      slug: json['slug'] as String?,
      categoryId: (json['categoryId'] as num?)?.toInt(),
      isFeatured: json['isFeatured'] as bool?,
      relatedNewsIds: (json['relatedNewsIds'] as List<dynamic>?)
              ?.map((e) => (e as num).toInt())
              .toList() ??
          [],
      tagIds: (json['tagIds'] as List<dynamic>?)
              ?.map((e) => (e as num).toInt())
              .toList() ??
          [],
    );

Map<String, dynamic> _$NewsSaveDtoToJson(NewsSaveDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'title': instance.title,
      'summary': instance.summary,
      'content': instance.content,
      'image': instance.image,
      'author': instance.author,
      'publishedDate': instance.publishedDate?.toIso8601String(),
      'viewCount': instance.viewCount,
      'status': commonStatusEnumToJson(instance.status),
      'metaTitle': instance.metaTitle,
      'metaDescription': instance.metaDescription,
      'metaKeywords': instance.metaKeywords,
      'slug': instance.slug,
      'categoryId': instance.categoryId,
      'isFeatured': instance.isFeatured,
      'relatedNewsIds': instance.relatedNewsIds,
      'tagIds': instance.tagIds,
    };

NotificationDto _$NotificationDtoFromJson(Map<String, dynamic> json) =>
    NotificationDto(
      id: (json['id'] as num?)?.toInt(),
      title: json['title'] as String?,
      content: json['content'] as String?,
      type: json['type'] as String?,
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      isRead: json['isRead'] as bool?,
      url: json['url'] as String?,
    );

Map<String, dynamic> _$NotificationDtoToJson(NotificationDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'title': instance.title,
      'content': instance.content,
      'type': instance.type,
      'createdDate': instance.createdDate?.toIso8601String(),
      'isRead': instance.isRead,
      'url': instance.url,
    };

NotificationDtoFilterResult _$NotificationDtoFilterResultFromJson(
        Map<String, dynamic> json) =>
    NotificationDtoFilterResult(
      totalRows: (json['totalRows'] as num?)?.toInt(),
      data: (json['data'] as List<dynamic>?)
              ?.map((e) => NotificationDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$NotificationDtoFilterResultToJson(
        NotificationDtoFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

ObjectApiResponse _$ObjectApiResponseFromJson(Map<String, dynamic> json) =>
    ObjectApiResponse(
      data: json['data'],
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$ObjectApiResponseToJson(ObjectApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data,
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

ObjectLikeSaveCommand _$ObjectLikeSaveCommandFromJson(
        Map<String, dynamic> json) =>
    ObjectLikeSaveCommand(
      objectId: (json['objectId'] as num?)?.toInt(),
      objectType: objectTypeEnumFromJson((json['objectType'] as num?)?.toInt()),
    );

Map<String, dynamic> _$ObjectLikeSaveCommandToJson(
        ObjectLikeSaveCommand instance) =>
    <String, dynamic>{
      'objectId': instance.objectId,
      'objectType': objectTypeEnumToJson(instance.objectType),
    };

OfficeDto _$OfficeDtoFromJson(Map<String, dynamic> json) => OfficeDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      code: json['code'] as String?,
      name: json['name'] as String?,
      fullName: json['fullName'] as String?,
      otherName: json['otherName'] as String?,
      url: json['url'] as String?,
      unitType: json['unitType'] as String?,
      parentId: (json['parentId'] as num?)?.toInt(),
      priority: (json['priority'] as num?)?.toInt(),
      type: localityTypeEnumFromJson((json['type'] as num?)?.toInt()),
      status: localityStatusEnumFromJson((json['status'] as num?)?.toInt()),
      parentName: json['parentName'] as String?,
      schoolCount: (json['schoolCount'] as num?)?.toInt(),
      schoolActiveCount: (json['schoolActiveCount'] as num?)?.toInt(),
    );

Map<String, dynamic> _$OfficeDtoToJson(OfficeDto instance) => <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'code': instance.code,
      'name': instance.name,
      'fullName': instance.fullName,
      'otherName': instance.otherName,
      'url': instance.url,
      'unitType': instance.unitType,
      'parentId': instance.parentId,
      'priority': instance.priority,
      'type': localityTypeEnumToJson(instance.type),
      'status': localityStatusEnumToJson(instance.status),
      'parentName': instance.parentName,
      'schoolCount': instance.schoolCount,
      'schoolActiveCount': instance.schoolActiveCount,
    };

OfficeDtoFilterResult _$OfficeDtoFilterResultFromJson(
        Map<String, dynamic> json) =>
    OfficeDtoFilterResult(
      totalRows: (json['totalRows'] as num?)?.toInt(),
      data: (json['data'] as List<dynamic>?)
              ?.map((e) => OfficeDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$OfficeDtoFilterResultToJson(
        OfficeDtoFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

OfficeDtoFilterResultApiResponse _$OfficeDtoFilterResultApiResponseFromJson(
        Map<String, dynamic> json) =>
    OfficeDtoFilterResultApiResponse(
      data: json['data'] == null
          ? null
          : OfficeDtoFilterResult.fromJson(
              json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$OfficeDtoFilterResultApiResponseToJson(
        OfficeDtoFilterResultApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

OfficeGetListQuery _$OfficeGetListQueryFromJson(Map<String, dynamic> json) =>
    OfficeGetListQuery(
      sortExpression: json['sortExpression'] as String?,
      pageSize: (json['pageSize'] as num?)?.toInt(),
      pageIndex: (json['pageIndex'] as num?)?.toInt(),
      skip: (json['skip'] as num?)?.toInt(),
      notSkip: (json['notSkip'] as num?)?.toInt(),
      propertyIncludes: (json['propertyIncludes'] as List<dynamic>?)
              ?.map((e) => e as String)
              .toList() ??
          [],
      keyword: json['keyword'] as String?,
      parentId: (json['parentId'] as num?)?.toInt(),
    );

Map<String, dynamic> _$OfficeGetListQueryToJson(OfficeGetListQuery instance) =>
    <String, dynamic>{
      'sortExpression': instance.sortExpression,
      'pageSize': instance.pageSize,
      'pageIndex': instance.pageIndex,
      'skip': instance.skip,
      'notSkip': instance.notSkip,
      'propertyIncludes': instance.propertyIncludes,
      'keyword': instance.keyword,
      'parentId': instance.parentId,
    };

OrderCreateDto _$OrderCreateDtoFromJson(Map<String, dynamic> json) =>
    OrderCreateDto(
      fullName: json['fullName'] as String?,
      phone: json['phone'] as String?,
      address: json['address'] as String?,
      notes: json['notes'] as String?,
    );

Map<String, dynamic> _$OrderCreateDtoToJson(OrderCreateDto instance) =>
    <String, dynamic>{
      'fullName': instance.fullName,
      'phone': instance.phone,
      'address': instance.address,
      'notes': instance.notes,
    };

OrderCreateWithClassDto _$OrderCreateWithClassDtoFromJson(
        Map<String, dynamic> json) =>
    OrderCreateWithClassDto(
      productId: (json['productId'] as num?)?.toInt(),
      classId: (json['classId'] as num?)?.toInt(),
      fullName: json['fullName'] as String?,
      phone: json['phone'] as String?,
      address: json['address'] as String?,
      notes: json['notes'] as String?,
    );

Map<String, dynamic> _$OrderCreateWithClassDtoToJson(
        OrderCreateWithClassDto instance) =>
    <String, dynamic>{
      'productId': instance.productId,
      'classId': instance.classId,
      'fullName': instance.fullName,
      'phone': instance.phone,
      'address': instance.address,
      'notes': instance.notes,
    };

OrderDto _$OrderDtoFromJson(Map<String, dynamic> json) => OrderDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      userId: (json['userId'] as num?)?.toInt(),
      fullName: json['fullName'] as String?,
      phone: json['phone'] as String?,
      address: json['address'] as String?,
      notes: json['notes'] as String?,
      totalAmount: (json['totalAmount'] as num?)?.toDouble(),
      status: orderStatusEnumFromJson((json['status'] as num?)?.toInt()),
      items: (json['items'] as List<dynamic>?)
              ?.map((e) => OrderItemDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$OrderDtoToJson(OrderDto instance) => <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'userId': instance.userId,
      'fullName': instance.fullName,
      'phone': instance.phone,
      'address': instance.address,
      'notes': instance.notes,
      'totalAmount': instance.totalAmount,
      'status': orderStatusEnumToJson(instance.status),
      'items': instance.items?.map((e) => e.toJson()).toList(),
    };

OrderDtoApiResponse _$OrderDtoApiResponseFromJson(Map<String, dynamic> json) =>
    OrderDtoApiResponse(
      data: json['data'] == null
          ? null
          : OrderDto.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$OrderDtoApiResponseToJson(
        OrderDtoApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

OrderDtoFilterResult _$OrderDtoFilterResultFromJson(
        Map<String, dynamic> json) =>
    OrderDtoFilterResult(
      totalRows: (json['totalRows'] as num?)?.toInt(),
      data: (json['data'] as List<dynamic>?)
              ?.map((e) => OrderDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$OrderDtoFilterResultToJson(
        OrderDtoFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

OrderDtoFilterResultApiResponse _$OrderDtoFilterResultApiResponseFromJson(
        Map<String, dynamic> json) =>
    OrderDtoFilterResultApiResponse(
      data: json['data'] == null
          ? null
          : OrderDtoFilterResult.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$OrderDtoFilterResultApiResponseToJson(
        OrderDtoFilterResultApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

OrderEntity _$OrderEntityFromJson(Map<String, dynamic> json) => OrderEntity(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      userId: (json['userId'] as num?)?.toInt(),
      fullName: json['fullName'] as String?,
      phone: json['phone'] as String?,
      address: json['address'] as String?,
      notes: json['notes'] as String?,
      totalAmount: (json['totalAmount'] as num?)?.toDouble(),
      status: orderStatusEnumFromJson((json['status'] as num?)?.toInt()),
      items: (json['items'] as List<dynamic>?)
              ?.map((e) => OrderItemEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$OrderEntityToJson(OrderEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'userId': instance.userId,
      'fullName': instance.fullName,
      'phone': instance.phone,
      'address': instance.address,
      'notes': instance.notes,
      'totalAmount': instance.totalAmount,
      'status': orderStatusEnumToJson(instance.status),
      'items': instance.items?.map((e) => e.toJson()).toList(),
    };

OrderEntityApiResponse _$OrderEntityApiResponseFromJson(
        Map<String, dynamic> json) =>
    OrderEntityApiResponse(
      data: json['data'] == null
          ? null
          : OrderEntity.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$OrderEntityApiResponseToJson(
        OrderEntityApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

OrderGetListQuery _$OrderGetListQueryFromJson(Map<String, dynamic> json) =>
    OrderGetListQuery(
      sortExpression: json['sortExpression'] as String?,
      pageSize: (json['pageSize'] as num?)?.toInt(),
      pageIndex: (json['pageIndex'] as num?)?.toInt(),
      skip: (json['skip'] as num?)?.toInt(),
      notSkip: (json['notSkip'] as num?)?.toInt(),
      propertyIncludes: (json['propertyIncludes'] as List<dynamic>?)
              ?.map((e) => e as String)
              .toList() ??
          [],
      userId: (json['userId'] as num?)?.toInt(),
      status: orderStatusEnumFromJson((json['status'] as num?)?.toInt()),
    );

Map<String, dynamic> _$OrderGetListQueryToJson(OrderGetListQuery instance) =>
    <String, dynamic>{
      'sortExpression': instance.sortExpression,
      'pageSize': instance.pageSize,
      'pageIndex': instance.pageIndex,
      'skip': instance.skip,
      'notSkip': instance.notSkip,
      'propertyIncludes': instance.propertyIncludes,
      'userId': instance.userId,
      'status': orderStatusEnumToJson(instance.status),
    };

OrderItemDto _$OrderItemDtoFromJson(Map<String, dynamic> json) => OrderItemDto(
      id: (json['id'] as num?)?.toInt(),
      orderId: (json['orderId'] as num?)?.toInt(),
      productId: (json['productId'] as num?)?.toInt(),
      quantity: (json['quantity'] as num?)?.toInt(),
      unitPrice: (json['unitPrice'] as num?)?.toDouble(),
      salePrice: (json['salePrice'] as num?)?.toDouble(),
      totalPrice: (json['totalPrice'] as num?)?.toDouble(),
      product: json['product'] == null
          ? null
          : ProductListDto.fromJson(json['product'] as Map<String, dynamic>),
    );

Map<String, dynamic> _$OrderItemDtoToJson(OrderItemDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'orderId': instance.orderId,
      'productId': instance.productId,
      'quantity': instance.quantity,
      'unitPrice': instance.unitPrice,
      'salePrice': instance.salePrice,
      'totalPrice': instance.totalPrice,
      'product': instance.product?.toJson(),
    };

OrderItemEntity _$OrderItemEntityFromJson(Map<String, dynamic> json) =>
    OrderItemEntity(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      orderId: (json['orderId'] as num?)?.toInt(),
      productId: (json['productId'] as num?)?.toInt(),
      quantity: (json['quantity'] as num?)?.toInt(),
      unitPrice: (json['unitPrice'] as num?)?.toDouble(),
      salePrice: (json['salePrice'] as num?)?.toDouble(),
      totalPrice: (json['totalPrice'] as num?)?.toDouble(),
      order: json['order'] == null
          ? null
          : OrderEntity.fromJson(json['order'] as Map<String, dynamic>),
      product: json['product'] == null
          ? null
          : ProductEntity.fromJson(json['product'] as Map<String, dynamic>),
    );

Map<String, dynamic> _$OrderItemEntityToJson(OrderItemEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'orderId': instance.orderId,
      'productId': instance.productId,
      'quantity': instance.quantity,
      'unitPrice': instance.unitPrice,
      'salePrice': instance.salePrice,
      'totalPrice': instance.totalPrice,
      'order': instance.order?.toJson(),
      'product': instance.product?.toJson(),
    };

OrderUpdateDto _$OrderUpdateDtoFromJson(Map<String, dynamic> json) =>
    OrderUpdateDto(
      status: orderStatusEnumFromJson((json['status'] as num?)?.toInt()),
      notes: json['notes'] as String?,
      fullName: json['fullName'] as String?,
      phone: json['phone'] as String?,
      address: json['address'] as String?,
    );

Map<String, dynamic> _$OrderUpdateDtoToJson(OrderUpdateDto instance) =>
    <String, dynamic>{
      'status': orderStatusEnumToJson(instance.status),
      'notes': instance.notes,
      'fullName': instance.fullName,
      'phone': instance.phone,
      'address': instance.address,
    };

ProductAttributeSaveDto _$ProductAttributeSaveDtoFromJson(
        Map<String, dynamic> json) =>
    ProductAttributeSaveDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      productId: (json['productId'] as num?)?.toInt(),
      name: json['name'] as String?,
      icon: json['icon'] as String?,
      sortOrder: (json['sortOrder'] as num?)?.toInt(),
    );

Map<String, dynamic> _$ProductAttributeSaveDtoToJson(
        ProductAttributeSaveDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'productId': instance.productId,
      'name': instance.name,
      'icon': instance.icon,
      'sortOrder': instance.sortOrder,
    };

ProductChapterDetailDto _$ProductChapterDetailDtoFromJson(
        Map<String, dynamic> json) =>
    ProductChapterDetailDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      productId: (json['productId'] as num?)?.toInt(),
      name: json['name'] as String?,
      description: json['description'] as String?,
      sortOrder: (json['sortOrder'] as num?)?.toInt(),
      lessons: (json['lessons'] as List<dynamic>?)
              ?.map((e) =>
                  ProductLessonDetailDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$ProductChapterDetailDtoToJson(
        ProductChapterDetailDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'productId': instance.productId,
      'name': instance.name,
      'description': instance.description,
      'sortOrder': instance.sortOrder,
      'lessons': instance.lessons?.map((e) => e.toJson()).toList(),
    };

ProductChapterSaveDto _$ProductChapterSaveDtoFromJson(
        Map<String, dynamic> json) =>
    ProductChapterSaveDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      productId: (json['productId'] as num?)?.toInt(),
      name: json['name'] as String?,
      description: json['description'] as String?,
      sortOrder: (json['sortOrder'] as num?)?.toInt(),
      lessons: (json['lessons'] as List<dynamic>?)
              ?.map((e) =>
                  ProductLessonSaveDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$ProductChapterSaveDtoToJson(
        ProductChapterSaveDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'productId': instance.productId,
      'name': instance.name,
      'description': instance.description,
      'sortOrder': instance.sortOrder,
      'lessons': instance.lessons?.map((e) => e.toJson()).toList(),
    };

ProductClassDto _$ProductClassDtoFromJson(Map<String, dynamic> json) =>
    ProductClassDto(
      id: (json['id'] as num?)?.toInt(),
      name: json['name'] as String?,
      description: json['description'] as String?,
      maxStudents: (json['maxStudents'] as num?)?.toInt(),
      currentStudents: (json['currentStudents'] as num?)?.toInt(),
      startDate: json['startDate'] == null
          ? null
          : DateTime.parse(json['startDate'] as String),
      endDate: json['endDate'] == null
          ? null
          : DateTime.parse(json['endDate'] as String),
      status: classStatusEnumFromJson((json['status'] as num?)?.toInt()),
      teacherName: json['teacherName'] as String?,
      isFull: json['isFull'] as bool?,
    );

Map<String, dynamic> _$ProductClassDtoToJson(ProductClassDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'name': instance.name,
      'description': instance.description,
      'maxStudents': instance.maxStudents,
      'currentStudents': instance.currentStudents,
      'startDate': instance.startDate?.toIso8601String(),
      'endDate': instance.endDate?.toIso8601String(),
      'status': classStatusEnumToJson(instance.status),
      'teacherName': instance.teacherName,
      'isFull': instance.isFull,
    };

ProductClassDtoListApiResponse _$ProductClassDtoListApiResponseFromJson(
        Map<String, dynamic> json) =>
    ProductClassDtoListApiResponse(
      data: (json['data'] as List<dynamic>?)
              ?.map((e) => ProductClassDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$ProductClassDtoListApiResponseToJson(
        ProductClassDtoListApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.map((e) => e.toJson()).toList(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

ProductComboItemDto _$ProductComboItemDtoFromJson(Map<String, dynamic> json) =>
    ProductComboItemDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      name: json['name'] as String?,
      summary: json['summary'] as String?,
      description: json['description'] as String?,
      image: json['image'] as String?,
      categoryId: (json['categoryId'] as num?)?.toInt(),
      productType:
          productTypeEnumFromJson((json['productType'] as num?)?.toInt()),
      status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()),
      metaTitle: json['metaTitle'] as String?,
      metaDescription: json['metaDescription'] as String?,
      metaKeywords: json['metaKeywords'] as String?,
      slug: json['slug'] as String?,
      price: (json['price'] as num?)?.toDouble(),
      salePrice: (json['salePrice'] as num?)?.toDouble(),
      totalLessons: (json['totalLessons'] as num?)?.toInt(),
      totalDurationMinutes: (json['totalDurationMinutes'] as num?)?.toInt(),
    );

Map<String, dynamic> _$ProductComboItemDtoToJson(
        ProductComboItemDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'name': instance.name,
      'summary': instance.summary,
      'description': instance.description,
      'image': instance.image,
      'categoryId': instance.categoryId,
      'productType': productTypeEnumToJson(instance.productType),
      'status': commonStatusEnumToJson(instance.status),
      'metaTitle': instance.metaTitle,
      'metaDescription': instance.metaDescription,
      'metaKeywords': instance.metaKeywords,
      'slug': instance.slug,
      'price': instance.price,
      'salePrice': instance.salePrice,
      'totalLessons': instance.totalLessons,
      'totalDurationMinutes': instance.totalDurationMinutes,
    };

ProductDetailDto _$ProductDetailDtoFromJson(Map<String, dynamic> json) =>
    ProductDetailDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      name: json['name'] as String?,
      summary: json['summary'] as String?,
      description: json['description'] as String?,
      image: json['image'] as String?,
      categoryId: (json['categoryId'] as num?)?.toInt(),
      productType:
          productTypeEnumFromJson((json['productType'] as num?)?.toInt()),
      status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()),
      metaTitle: json['metaTitle'] as String?,
      metaDescription: json['metaDescription'] as String?,
      metaKeywords: json['metaKeywords'] as String?,
      slug: json['slug'] as String?,
      price: (json['price'] as num?)?.toDouble(),
      salePrice: (json['salePrice'] as num?)?.toDouble(),
      chapters: (json['chapters'] as List<dynamic>?)
              ?.map((e) =>
                  ProductChapterDetailDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      comboProducts: (json['comboProducts'] as List<dynamic>?)
              ?.map((e) =>
                  ProductComboItemDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      attributes: (json['attributes'] as List<dynamic>?)
              ?.map((e) =>
                  ProductAttributeSaveDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      combos: (json['combos'] as List<dynamic>?)
              ?.map((e) => ProductEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$ProductDetailDtoToJson(ProductDetailDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'name': instance.name,
      'summary': instance.summary,
      'description': instance.description,
      'image': instance.image,
      'categoryId': instance.categoryId,
      'productType': productTypeEnumToJson(instance.productType),
      'status': commonStatusEnumToJson(instance.status),
      'metaTitle': instance.metaTitle,
      'metaDescription': instance.metaDescription,
      'metaKeywords': instance.metaKeywords,
      'slug': instance.slug,
      'price': instance.price,
      'salePrice': instance.salePrice,
      'chapters': instance.chapters?.map((e) => e.toJson()).toList(),
      'comboProducts': instance.comboProducts?.map((e) => e.toJson()).toList(),
      'attributes': instance.attributes?.map((e) => e.toJson()).toList(),
      'combos': instance.combos?.map((e) => e.toJson()).toList(),
    };

ProductDetailDtoApiResponse _$ProductDetailDtoApiResponseFromJson(
        Map<String, dynamic> json) =>
    ProductDetailDtoApiResponse(
      data: json['data'] == null
          ? null
          : ProductDetailDto.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$ProductDetailDtoApiResponseToJson(
        ProductDetailDtoApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

ProductEntity _$ProductEntityFromJson(Map<String, dynamic> json) =>
    ProductEntity(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      name: json['name'] as String?,
      summary: json['summary'] as String?,
      description: json['description'] as String?,
      image: json['image'] as String?,
      categoryId: (json['categoryId'] as num?)?.toInt(),
      productType:
          productTypeEnumFromJson((json['productType'] as num?)?.toInt()),
      status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()),
      metaTitle: json['metaTitle'] as String?,
      metaDescription: json['metaDescription'] as String?,
      metaKeywords: json['metaKeywords'] as String?,
      slug: json['slug'] as String?,
      price: (json['price'] as num?)?.toDouble(),
      salePrice: (json['salePrice'] as num?)?.toDouble(),
    );

Map<String, dynamic> _$ProductEntityToJson(ProductEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'name': instance.name,
      'summary': instance.summary,
      'description': instance.description,
      'image': instance.image,
      'categoryId': instance.categoryId,
      'productType': productTypeEnumToJson(instance.productType),
      'status': commonStatusEnumToJson(instance.status),
      'metaTitle': instance.metaTitle,
      'metaDescription': instance.metaDescription,
      'metaKeywords': instance.metaKeywords,
      'slug': instance.slug,
      'price': instance.price,
      'salePrice': instance.salePrice,
    };

ProductEntityApiResponse _$ProductEntityApiResponseFromJson(
        Map<String, dynamic> json) =>
    ProductEntityApiResponse(
      data: json['data'] == null
          ? null
          : ProductEntity.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$ProductEntityApiResponseToJson(
        ProductEntityApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

ProductGetByIdsQuery _$ProductGetByIdsQueryFromJson(
        Map<String, dynamic> json) =>
    ProductGetByIdsQuery(
      ids: (json['ids'] as List<dynamic>?)
              ?.map((e) => (e as num).toInt())
              .toList() ??
          [],
    );

Map<String, dynamic> _$ProductGetByIdsQueryToJson(
        ProductGetByIdsQuery instance) =>
    <String, dynamic>{
      'ids': instance.ids,
    };

ProductGetListQuery _$ProductGetListQueryFromJson(Map<String, dynamic> json) =>
    ProductGetListQuery(
      sortExpression: json['sortExpression'] as String?,
      pageSize: (json['pageSize'] as num?)?.toInt(),
      pageIndex: (json['pageIndex'] as num?)?.toInt(),
      skip: (json['skip'] as num?)?.toInt(),
      notSkip: (json['notSkip'] as num?)?.toInt(),
      propertyIncludes: (json['propertyIncludes'] as List<dynamic>?)
              ?.map((e) => e as String)
              .toList() ??
          [],
      keyword: json['keyword'] as String?,
      categoryId: (json['categoryId'] as num?)?.toInt(),
      productType:
          productTypeEnumFromJson((json['productType'] as num?)?.toInt()),
      status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()),
    );

Map<String, dynamic> _$ProductGetListQueryToJson(
        ProductGetListQuery instance) =>
    <String, dynamic>{
      'sortExpression': instance.sortExpression,
      'pageSize': instance.pageSize,
      'pageIndex': instance.pageIndex,
      'skip': instance.skip,
      'notSkip': instance.notSkip,
      'propertyIncludes': instance.propertyIncludes,
      'keyword': instance.keyword,
      'categoryId': instance.categoryId,
      'productType': productTypeEnumToJson(instance.productType),
      'status': commonStatusEnumToJson(instance.status),
    };

ProductLessonDetailDto _$ProductLessonDetailDtoFromJson(
        Map<String, dynamic> json) =>
    ProductLessonDetailDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      chapterId: (json['chapterId'] as num?)?.toInt(),
      name: json['name'] as String?,
      description: json['description'] as String?,
      lessonType: lessonTypeEnumFromJson((json['lessonType'] as num?)?.toInt()),
      content: json['content'] as String?,
      sortOrder: (json['sortOrder'] as num?)?.toInt(),
      isFree: json['isFree'] as bool?,
    );

Map<String, dynamic> _$ProductLessonDetailDtoToJson(
        ProductLessonDetailDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'chapterId': instance.chapterId,
      'name': instance.name,
      'description': instance.description,
      'lessonType': lessonTypeEnumToJson(instance.lessonType),
      'content': instance.content,
      'sortOrder': instance.sortOrder,
      'isFree': instance.isFree,
    };

ProductLessonEntity _$ProductLessonEntityFromJson(Map<String, dynamic> json) =>
    ProductLessonEntity(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      chapterId: (json['chapterId'] as num?)?.toInt(),
      name: json['name'] as String?,
      description: json['description'] as String?,
      lessonType: lessonTypeEnumFromJson((json['lessonType'] as num?)?.toInt()),
      content: json['content'] as String?,
      sortOrder: (json['sortOrder'] as num?)?.toInt(),
      isFree: json['isFree'] as bool?,
    );

Map<String, dynamic> _$ProductLessonEntityToJson(
        ProductLessonEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'chapterId': instance.chapterId,
      'name': instance.name,
      'description': instance.description,
      'lessonType': lessonTypeEnumToJson(instance.lessonType),
      'content': instance.content,
      'sortOrder': instance.sortOrder,
      'isFree': instance.isFree,
    };

ProductLessonSaveDto _$ProductLessonSaveDtoFromJson(
        Map<String, dynamic> json) =>
    ProductLessonSaveDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      chapterId: (json['chapterId'] as num?)?.toInt(),
      name: json['name'] as String?,
      description: json['description'] as String?,
      lessonType: lessonTypeEnumFromJson((json['lessonType'] as num?)?.toInt()),
      content: json['content'] as String?,
      sortOrder: (json['sortOrder'] as num?)?.toInt(),
      isFree: json['isFree'] as bool?,
    );

Map<String, dynamic> _$ProductLessonSaveDtoToJson(
        ProductLessonSaveDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'chapterId': instance.chapterId,
      'name': instance.name,
      'description': instance.description,
      'lessonType': lessonTypeEnumToJson(instance.lessonType),
      'content': instance.content,
      'sortOrder': instance.sortOrder,
      'isFree': instance.isFree,
    };

ProductListDto _$ProductListDtoFromJson(Map<String, dynamic> json) =>
    ProductListDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      name: json['name'] as String?,
      summary: json['summary'] as String?,
      description: json['description'] as String?,
      image: json['image'] as String?,
      categoryId: (json['categoryId'] as num?)?.toInt(),
      productType:
          productTypeEnumFromJson((json['productType'] as num?)?.toInt()),
      status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()),
      metaTitle: json['metaTitle'] as String?,
      metaDescription: json['metaDescription'] as String?,
      metaKeywords: json['metaKeywords'] as String?,
      slug: json['slug'] as String?,
      price: (json['price'] as num?)?.toDouble(),
      salePrice: (json['salePrice'] as num?)?.toDouble(),
      averageRating: (json['averageRating'] as num?)?.toDouble(),
      reviewCount: (json['reviewCount'] as num?)?.toInt(),
    );

Map<String, dynamic> _$ProductListDtoToJson(ProductListDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'name': instance.name,
      'summary': instance.summary,
      'description': instance.description,
      'image': instance.image,
      'categoryId': instance.categoryId,
      'productType': productTypeEnumToJson(instance.productType),
      'status': commonStatusEnumToJson(instance.status),
      'metaTitle': instance.metaTitle,
      'metaDescription': instance.metaDescription,
      'metaKeywords': instance.metaKeywords,
      'slug': instance.slug,
      'price': instance.price,
      'salePrice': instance.salePrice,
      'averageRating': instance.averageRating,
      'reviewCount': instance.reviewCount,
    };

ProductListDtoFilterResult _$ProductListDtoFilterResultFromJson(
        Map<String, dynamic> json) =>
    ProductListDtoFilterResult(
      totalRows: (json['totalRows'] as num?)?.toInt(),
      data: (json['data'] as List<dynamic>?)
              ?.map((e) => ProductListDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$ProductListDtoFilterResultToJson(
        ProductListDtoFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

ProductListDtoFilterResultApiResponse
    _$ProductListDtoFilterResultApiResponseFromJson(
            Map<String, dynamic> json) =>
        ProductListDtoFilterResultApiResponse(
          data: json['data'] == null
              ? null
              : ProductListDtoFilterResult.fromJson(
                  json['data'] as Map<String, dynamic>),
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic> _$ProductListDtoFilterResultApiResponseToJson(
        ProductListDtoFilterResultApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

ProductListDtoListApiResponse _$ProductListDtoListApiResponseFromJson(
        Map<String, dynamic> json) =>
    ProductListDtoListApiResponse(
      data: (json['data'] as List<dynamic>?)
              ?.map((e) => ProductListDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$ProductListDtoListApiResponseToJson(
        ProductListDtoListApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.map((e) => e.toJson()).toList(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

ProductReviewApproveCommand _$ProductReviewApproveCommandFromJson(
        Map<String, dynamic> json) =>
    ProductReviewApproveCommand(
      id: (json['id'] as num?)?.toInt(),
      status:
          productReviewStatusEnumFromJson((json['status'] as num?)?.toInt()),
    );

Map<String, dynamic> _$ProductReviewApproveCommandToJson(
        ProductReviewApproveCommand instance) =>
    <String, dynamic>{
      'id': instance.id,
      'status': productReviewStatusEnumToJson(instance.status),
    };

ProductReviewCreateDto _$ProductReviewCreateDtoFromJson(
        Map<String, dynamic> json) =>
    ProductReviewCreateDto(
      productId: (json['productId'] as num?)?.toInt(),
      rating: (json['rating'] as num?)?.toInt(),
      comment: json['comment'] as String?,
      createdByName: json['createdByName'] as String?,
    );

Map<String, dynamic> _$ProductReviewCreateDtoToJson(
        ProductReviewCreateDto instance) =>
    <String, dynamic>{
      'productId': instance.productId,
      'rating': instance.rating,
      'comment': instance.comment,
      'createdByName': instance.createdByName,
    };

ProductReviewEntity _$ProductReviewEntityFromJson(Map<String, dynamic> json) =>
    ProductReviewEntity(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      productId: (json['productId'] as num?)?.toInt(),
      userId: (json['userId'] as num?)?.toInt(),
      fullName: json['fullName'] as String?,
      avatar: json['avatar'] as String?,
      rating: (json['rating'] as num?)?.toInt(),
      comment: json['comment'] as String?,
      status:
          productReviewStatusEnumFromJson((json['status'] as num?)?.toInt()),
    );

Map<String, dynamic> _$ProductReviewEntityToJson(
        ProductReviewEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'productId': instance.productId,
      'userId': instance.userId,
      'fullName': instance.fullName,
      'avatar': instance.avatar,
      'rating': instance.rating,
      'comment': instance.comment,
      'status': productReviewStatusEnumToJson(instance.status),
    };

ProductReviewEntityApiResponse _$ProductReviewEntityApiResponseFromJson(
        Map<String, dynamic> json) =>
    ProductReviewEntityApiResponse(
      data: json['data'] == null
          ? null
          : ProductReviewEntity.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$ProductReviewEntityApiResponseToJson(
        ProductReviewEntityApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

ProductReviewEntityListApiResponse _$ProductReviewEntityListApiResponseFromJson(
        Map<String, dynamic> json) =>
    ProductReviewEntityListApiResponse(
      data: (json['data'] as List<dynamic>?)
              ?.map((e) =>
                  ProductReviewEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$ProductReviewEntityListApiResponseToJson(
        ProductReviewEntityListApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.map((e) => e.toJson()).toList(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

ProductReviewGenerateAiRequest _$ProductReviewGenerateAiRequestFromJson(
        Map<String, dynamic> json) =>
    ProductReviewGenerateAiRequest(
      count: (json['count'] as num?)?.toInt(),
    );

Map<String, dynamic> _$ProductReviewGenerateAiRequestToJson(
        ProductReviewGenerateAiRequest instance) =>
    <String, dynamic>{
      'count': instance.count,
    };

ProductReviewGetListQuery _$ProductReviewGetListQueryFromJson(
        Map<String, dynamic> json) =>
    ProductReviewGetListQuery(
      sortExpression: json['sortExpression'] as String?,
      pageSize: (json['pageSize'] as num?)?.toInt(),
      pageIndex: (json['pageIndex'] as num?)?.toInt(),
      skip: (json['skip'] as num?)?.toInt(),
      notSkip: (json['notSkip'] as num?)?.toInt(),
      propertyIncludes: (json['propertyIncludes'] as List<dynamic>?)
              ?.map((e) => e as String)
              .toList() ??
          [],
      productId: (json['productId'] as num?)?.toInt(),
      status:
          productReviewStatusEnumFromJson((json['status'] as num?)?.toInt()),
    );

Map<String, dynamic> _$ProductReviewGetListQueryToJson(
        ProductReviewGetListQuery instance) =>
    <String, dynamic>{
      'sortExpression': instance.sortExpression,
      'pageSize': instance.pageSize,
      'pageIndex': instance.pageIndex,
      'skip': instance.skip,
      'notSkip': instance.notSkip,
      'propertyIncludes': instance.propertyIncludes,
      'productId': instance.productId,
      'status': productReviewStatusEnumToJson(instance.status),
    };

ProductReviewListDto _$ProductReviewListDtoFromJson(
        Map<String, dynamic> json) =>
    ProductReviewListDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      productId: (json['productId'] as num?)?.toInt(),
      userId: (json['userId'] as num?)?.toInt(),
      fullName: json['fullName'] as String?,
      avatar: json['avatar'] as String?,
      rating: (json['rating'] as num?)?.toInt(),
      comment: json['comment'] as String?,
      status:
          productReviewStatusEnumFromJson((json['status'] as num?)?.toInt()),
    );

Map<String, dynamic> _$ProductReviewListDtoToJson(
        ProductReviewListDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'productId': instance.productId,
      'userId': instance.userId,
      'fullName': instance.fullName,
      'avatar': instance.avatar,
      'rating': instance.rating,
      'comment': instance.comment,
      'status': productReviewStatusEnumToJson(instance.status),
    };

ProductReviewListDtoFilterResult _$ProductReviewListDtoFilterResultFromJson(
        Map<String, dynamic> json) =>
    ProductReviewListDtoFilterResult(
      totalRows: (json['totalRows'] as num?)?.toInt(),
      data: (json['data'] as List<dynamic>?)
              ?.map((e) =>
                  ProductReviewListDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$ProductReviewListDtoFilterResultToJson(
        ProductReviewListDtoFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

ProductReviewListDtoFilterResultApiResponse
    _$ProductReviewListDtoFilterResultApiResponseFromJson(
            Map<String, dynamic> json) =>
        ProductReviewListDtoFilterResultApiResponse(
          data: json['data'] == null
              ? null
              : ProductReviewListDtoFilterResult.fromJson(
                  json['data'] as Map<String, dynamic>),
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic> _$ProductReviewListDtoFilterResultApiResponseToJson(
        ProductReviewListDtoFilterResultApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

ProductSaveDto _$ProductSaveDtoFromJson(Map<String, dynamic> json) =>
    ProductSaveDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      name: json['name'] as String?,
      summary: json['summary'] as String?,
      description: json['description'] as String?,
      image: json['image'] as String?,
      categoryId: (json['categoryId'] as num?)?.toInt(),
      productType:
          productTypeEnumFromJson((json['productType'] as num?)?.toInt()),
      status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()),
      metaTitle: json['metaTitle'] as String?,
      metaDescription: json['metaDescription'] as String?,
      metaKeywords: json['metaKeywords'] as String?,
      slug: json['slug'] as String?,
      price: (json['price'] as num?)?.toDouble(),
      salePrice: (json['salePrice'] as num?)?.toDouble(),
      tagIds: (json['tagIds'] as List<dynamic>?)
              ?.map((e) => (e as num).toInt())
              .toList() ??
          [],
      chapters: (json['chapters'] as List<dynamic>?)
              ?.map((e) =>
                  ProductChapterSaveDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      attributes: (json['attributes'] as List<dynamic>?)
              ?.map((e) =>
                  ProductAttributeSaveDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      comboProductIds: (json['comboProductIds'] as List<dynamic>?)
              ?.map((e) => (e as num).toInt())
              .toList() ??
          [],
    );

Map<String, dynamic> _$ProductSaveDtoToJson(ProductSaveDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'name': instance.name,
      'summary': instance.summary,
      'description': instance.description,
      'image': instance.image,
      'categoryId': instance.categoryId,
      'productType': productTypeEnumToJson(instance.productType),
      'status': commonStatusEnumToJson(instance.status),
      'metaTitle': instance.metaTitle,
      'metaDescription': instance.metaDescription,
      'metaKeywords': instance.metaKeywords,
      'slug': instance.slug,
      'price': instance.price,
      'salePrice': instance.salePrice,
      'tagIds': instance.tagIds,
      'chapters': instance.chapters?.map((e) => e.toJson()).toList(),
      'attributes': instance.attributes?.map((e) => e.toJson()).toList(),
      'comboProductIds': instance.comboProductIds,
    };

ProductSaveDtoApiResponse _$ProductSaveDtoApiResponseFromJson(
        Map<String, dynamic> json) =>
    ProductSaveDtoApiResponse(
      data: json['data'] == null
          ? null
          : ProductSaveDto.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$ProductSaveDtoApiResponseToJson(
        ProductSaveDtoApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

PupilAddDto _$PupilAddDtoFromJson(Map<String, dynamic> json) => PupilAddDto(
      fullName: json['fullName'] as String?,
      email: json['email'] as String?,
      phoneNumber: json['phoneNumber'] as String?,
    );

Map<String, dynamic> _$PupilAddDtoToJson(PupilAddDto instance) =>
    <String, dynamic>{
      'fullName': instance.fullName,
      'email': instance.email,
      'phoneNumber': instance.phoneNumber,
    };

PupilAddMultiCommand _$PupilAddMultiCommandFromJson(
        Map<String, dynamic> json) =>
    PupilAddMultiCommand(
      pupils: (json['pupils'] as List<dynamic>?)
              ?.map((e) => PupilAddDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      password: json['password'] as String?,
      classId: (json['classId'] as num?)?.toInt(),
    );

Map<String, dynamic> _$PupilAddMultiCommandToJson(
        PupilAddMultiCommand instance) =>
    <String, dynamic>{
      'pupils': instance.pupils?.map((e) => e.toJson()).toList(),
      'password': instance.password,
      'classId': instance.classId,
    };

PupilChangePasswordCommand _$PupilChangePasswordCommandFromJson(
        Map<String, dynamic> json) =>
    PupilChangePasswordCommand(
      classId: (json['classId'] as num?)?.toInt(),
      userId: (json['userId'] as num?)?.toInt(),
      password: json['password'] as String?,
    );

Map<String, dynamic> _$PupilChangePasswordCommandToJson(
        PupilChangePasswordCommand instance) =>
    <String, dynamic>{
      'classId': instance.classId,
      'userId': instance.userId,
      'password': instance.password,
    };

PupilCheckGoToClassDto _$PupilCheckGoToClassDtoFromJson(
        Map<String, dynamic> json) =>
    PupilCheckGoToClassDto(
      classId: (json['classId'] as num?)?.toInt(),
      className: json['className'] as String?,
      academicYearId: (json['academicYearId'] as num?)?.toInt(),
      academicYearName: json['academicYearName'] as String?,
      grade: (json['grade'] as num?)?.toInt(),
    );

Map<String, dynamic> _$PupilCheckGoToClassDtoToJson(
        PupilCheckGoToClassDto instance) =>
    <String, dynamic>{
      'classId': instance.classId,
      'className': instance.className,
      'academicYearId': instance.academicYearId,
      'academicYearName': instance.academicYearName,
      'grade': instance.grade,
    };

PupilCheckGoToClassDtoApiResponse _$PupilCheckGoToClassDtoApiResponseFromJson(
        Map<String, dynamic> json) =>
    PupilCheckGoToClassDtoApiResponse(
      data: json['data'] == null
          ? null
          : PupilCheckGoToClassDto.fromJson(
              json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$PupilCheckGoToClassDtoApiResponseToJson(
        PupilCheckGoToClassDtoApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

PupilCopyFromClassCommand _$PupilCopyFromClassCommandFromJson(
        Map<String, dynamic> json) =>
    PupilCopyFromClassCommand(
      classId: (json['classId'] as num?)?.toInt(),
      newClassId: (json['newClassId'] as num?)?.toInt(),
    );

Map<String, dynamic> _$PupilCopyFromClassCommandToJson(
        PupilCopyFromClassCommand instance) =>
    <String, dynamic>{
      'classId': instance.classId,
      'newClassId': instance.newClassId,
    };

PupilFilterDto _$PupilFilterDtoFromJson(Map<String, dynamic> json) =>
    PupilFilterDto(
      sortExpression: json['sortExpression'] as String?,
      pageSize: (json['pageSize'] as num?)?.toInt(),
      pageIndex: (json['pageIndex'] as num?)?.toInt(),
      skip: (json['skip'] as num?)?.toInt(),
      notSkip: (json['notSkip'] as num?)?.toInt(),
      propertyIncludes: (json['propertyIncludes'] as List<dynamic>?)
              ?.map((e) => e as String)
              .toList() ??
          [],
      classId: (json['classId'] as num?)?.toInt(),
      keyword: json['keyword'] as String?,
      status: classUserStatusEnumFromJson((json['status'] as num?)?.toInt()),
    );

Map<String, dynamic> _$PupilFilterDtoToJson(PupilFilterDto instance) =>
    <String, dynamic>{
      'sortExpression': instance.sortExpression,
      'pageSize': instance.pageSize,
      'pageIndex': instance.pageIndex,
      'skip': instance.skip,
      'notSkip': instance.notSkip,
      'propertyIncludes': instance.propertyIncludes,
      'classId': instance.classId,
      'keyword': instance.keyword,
      'status': classUserStatusEnumToJson(instance.status),
    };

PupilGoToClassCommand _$PupilGoToClassCommandFromJson(
        Map<String, dynamic> json) =>
    PupilGoToClassCommand(
      classId: (json['classId'] as num?)?.toInt(),
      checkGoToClass: json['checkGoToClass'] == null
          ? null
          : PupilCheckGoToClassDto.fromJson(
              json['checkGoToClass'] as Map<String, dynamic>),
    );

Map<String, dynamic> _$PupilGoToClassCommandToJson(
        PupilGoToClassCommand instance) =>
    <String, dynamic>{
      'classId': instance.classId,
      'checkGoToClass': instance.checkGoToClass?.toJson(),
    };

PupilHistoryDoExamDto _$PupilHistoryDoExamDtoFromJson(
        Map<String, dynamic> json) =>
    PupilHistoryDoExamDto(
      assignExamId: (json['assignExamId'] as num?)?.toInt(),
      title: json['title'] as String?,
      type: assignExamTypeEnumFromJson((json['type'] as num?)?.toInt()),
      subject: json['subject'] as String?,
      submitDate: json['submitDate'] == null
          ? null
          : DateTime.parse(json['submitDate'] as String),
      score: (json['score'] as num?)?.toDouble(),
      status:
          assignExamUserStatusEnumFromJson((json['status'] as num?)?.toInt()),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      canMark: json['canMark'] as bool?,
      examId: (json['examId'] as num?)?.toInt(),
      examResultId: (json['examResultId'] as num?)?.toInt(),
    );

Map<String, dynamic> _$PupilHistoryDoExamDtoToJson(
        PupilHistoryDoExamDto instance) =>
    <String, dynamic>{
      'assignExamId': instance.assignExamId,
      'title': instance.title,
      'type': assignExamTypeEnumToJson(instance.type),
      'subject': instance.subject,
      'submitDate': instance.submitDate?.toIso8601String(),
      'score': instance.score,
      'status': assignExamUserStatusEnumToJson(instance.status),
      'createdBy': instance.createdBy,
      'canMark': instance.canMark,
      'examId': instance.examId,
      'examResultId': instance.examResultId,
    };

PupilHistoryDoExamDtoFilterResult _$PupilHistoryDoExamDtoFilterResultFromJson(
        Map<String, dynamic> json) =>
    PupilHistoryDoExamDtoFilterResult(
      totalRows: (json['totalRows'] as num?)?.toInt(),
      data: (json['data'] as List<dynamic>?)
              ?.map((e) =>
                  PupilHistoryDoExamDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$PupilHistoryDoExamDtoFilterResultToJson(
        PupilHistoryDoExamDtoFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

PupilHistoryDoExamDtoFilterResultApiResponse
    _$PupilHistoryDoExamDtoFilterResultApiResponseFromJson(
            Map<String, dynamic> json) =>
        PupilHistoryDoExamDtoFilterResultApiResponse(
          data: json['data'] == null
              ? null
              : PupilHistoryDoExamDtoFilterResult.fromJson(
                  json['data'] as Map<String, dynamic>),
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic> _$PupilHistoryDoExamDtoFilterResultApiResponseToJson(
        PupilHistoryDoExamDtoFilterResultApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

PupilHistoryDoExamFilterDto _$PupilHistoryDoExamFilterDtoFromJson(
        Map<String, dynamic> json) =>
    PupilHistoryDoExamFilterDto(
      sortExpression: json['sortExpression'] as String?,
      pageSize: (json['pageSize'] as num?)?.toInt(),
      pageIndex: (json['pageIndex'] as num?)?.toInt(),
      skip: (json['skip'] as num?)?.toInt(),
      notSkip: (json['notSkip'] as num?)?.toInt(),
      propertyIncludes: (json['propertyIncludes'] as List<dynamic>?)
              ?.map((e) => e as String)
              .toList() ??
          [],
      userId: (json['userId'] as num?)?.toInt(),
      classId: (json['classId'] as num?)?.toInt(),
      subjectId: (json['subjectId'] as num?)?.toInt(),
      keyword: json['keyword'] as String?,
      submitDate: json['submitDate'] == null
          ? null
          : DateTime.parse(json['submitDate'] as String),
      type: assignExamTypeEnumFromJson((json['type'] as num?)?.toInt()),
    );

Map<String, dynamic> _$PupilHistoryDoExamFilterDtoToJson(
        PupilHistoryDoExamFilterDto instance) =>
    <String, dynamic>{
      'sortExpression': instance.sortExpression,
      'pageSize': instance.pageSize,
      'pageIndex': instance.pageIndex,
      'skip': instance.skip,
      'notSkip': instance.notSkip,
      'propertyIncludes': instance.propertyIncludes,
      'userId': instance.userId,
      'classId': instance.classId,
      'subjectId': instance.subjectId,
      'keyword': instance.keyword,
      'submitDate': instance.submitDate?.toIso8601String(),
      'type': assignExamTypeEnumToJson(instance.type),
    };

PupilListDto _$PupilListDtoFromJson(Map<String, dynamic> json) => PupilListDto(
      id: (json['id'] as num?)?.toInt(),
      userName: json['userName'] as String?,
      avatar: json['avatar'] as String?,
      fullName: json['fullName'] as String?,
      email: json['email'] as String?,
      phoneNumber: json['phoneNumber'] as String?,
      studentCode: json['studentCode'] as String?,
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      birthDay: json['birthDay'] == null
          ? null
          : DateTime.parse(json['birthDay'] as String),
      gender: (json['gender'] as num?)?.toInt(),
      status: classUserStatusEnumFromJson((json['status'] as num?)?.toInt()),
      identifierCode: json['identifierCode'] as String?,
    );

Map<String, dynamic> _$PupilListDtoToJson(PupilListDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'userName': instance.userName,
      'avatar': instance.avatar,
      'fullName': instance.fullName,
      'email': instance.email,
      'phoneNumber': instance.phoneNumber,
      'studentCode': instance.studentCode,
      'createdDate': instance.createdDate?.toIso8601String(),
      'birthDay': instance.birthDay?.toIso8601String(),
      'gender': instance.gender,
      'status': classUserStatusEnumToJson(instance.status),
      'identifierCode': instance.identifierCode,
    };

PupilListDtoFilterResult _$PupilListDtoFilterResultFromJson(
        Map<String, dynamic> json) =>
    PupilListDtoFilterResult(
      totalRows: (json['totalRows'] as num?)?.toInt(),
      data: (json['data'] as List<dynamic>?)
              ?.map((e) => PupilListDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$PupilListDtoFilterResultToJson(
        PupilListDtoFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

PupilStaticByTypeExamDto _$PupilStaticByTypeExamDtoFromJson(
        Map<String, dynamic> json) =>
    PupilStaticByTypeExamDto(
      type: assignExamTypeEnumFromJson((json['type'] as num?)?.toInt()),
      total: (json['total'] as num?)?.toInt(),
      done: (json['done'] as num?)?.toInt(),
      averageScore: (json['averageScore'] as num?)?.toDouble(),
    );

Map<String, dynamic> _$PupilStaticByTypeExamDtoToJson(
        PupilStaticByTypeExamDto instance) =>
    <String, dynamic>{
      'type': assignExamTypeEnumToJson(instance.type),
      'total': instance.total,
      'done': instance.done,
      'averageScore': instance.averageScore,
    };

PupilStaticByTypeExamDtoListApiResponse
    _$PupilStaticByTypeExamDtoListApiResponseFromJson(
            Map<String, dynamic> json) =>
        PupilStaticByTypeExamDtoListApiResponse(
          data: (json['data'] as List<dynamic>?)
                  ?.map((e) => PupilStaticByTypeExamDto.fromJson(
                      e as Map<String, dynamic>))
                  .toList() ??
              [],
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic> _$PupilStaticByTypeExamDtoListApiResponseToJson(
        PupilStaticByTypeExamDtoListApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.map((e) => e.toJson()).toList(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

PupilStaticDto _$PupilStaticDtoFromJson(Map<String, dynamic> json) =>
    PupilStaticDto(
      averageScore: (json['averageScore'] as num?)?.toDouble(),
      percentage: (json['percentage'] as num?)?.toDouble(),
      total: (json['total'] as num?)?.toInt(),
    );

Map<String, dynamic> _$PupilStaticDtoToJson(PupilStaticDto instance) =>
    <String, dynamic>{
      'averageScore': instance.averageScore,
      'percentage': instance.percentage,
      'total': instance.total,
    };

PupilStaticDtoApiResponse _$PupilStaticDtoApiResponseFromJson(
        Map<String, dynamic> json) =>
    PupilStaticDtoApiResponse(
      data: json['data'] == null
          ? null
          : PupilStaticDto.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$PupilStaticDtoApiResponseToJson(
        PupilStaticDtoApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

PupilStatisticalDto _$PupilStatisticalDtoFromJson(Map<String, dynamic> json) =>
    PupilStatisticalDto(
      totalClass: (json['totalClass'] as num?)?.toInt(),
      totalExamNeedDo: (json['totalExamNeedDo'] as num?)?.toInt(),
      totalExam: (json['totalExam'] as num?)?.toInt(),
      totalExamDone: (json['totalExamDone'] as num?)?.toInt(),
    );

Map<String, dynamic> _$PupilStatisticalDtoToJson(
        PupilStatisticalDto instance) =>
    <String, dynamic>{
      'totalClass': instance.totalClass,
      'totalExamNeedDo': instance.totalExamNeedDo,
      'totalExam': instance.totalExam,
      'totalExamDone': instance.totalExamDone,
    };

PupilStatisticalDtoApiResponse _$PupilStatisticalDtoApiResponseFromJson(
        Map<String, dynamic> json) =>
    PupilStatisticalDtoApiResponse(
      data: json['data'] == null
          ? null
          : PupilStatisticalDto.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$PupilStatisticalDtoApiResponseToJson(
        PupilStatisticalDtoApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

QuestionDto _$QuestionDtoFromJson(Map<String, dynamic> json) => QuestionDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      schoolId: (json['schoolId'] as num?)?.toInt(),
      type: json['type'] as String?,
      content: json['content'] as String?,
      avatar: json['avatar'] as String?,
      image:
          (json['image'] as List<dynamic>?)?.map((e) => e as String).toList() ??
              [],
      answers: json['answers'],
      explain: json['explain'] as String?,
      transcript: json['transcript'] as String?,
      parentId: (json['parentId'] as num?)?.toInt(),
      sound:
          (json['sound'] as List<dynamic>?)?.map((e) => e as String).toList() ??
              [],
      video: json['video'] as String?,
      classLevel: (json['classLevel'] as num?)?.toInt(),
      level: questionLevelEnumFromJson((json['level'] as num?)?.toInt()),
      subjectId: (json['subjectId'] as num?)?.toInt(),
      status: questionStatusEnumFromJson((json['status'] as num?)?.toInt()),
      format: examFormatEnumFromJson((json['format'] as num?)?.toInt()),
      labelType: (json['labelType'] as num?)?.toInt(),
      isSystem: json['isSystem'] as bool?,
      tagIds: (json['tagIds'] as List<dynamic>?)
              ?.map((e) => (e as num).toInt())
              .toList() ??
          [],
      mark: (json['mark'] as num?)?.toDouble(),
      childs: (json['childs'] as List<dynamic>?)
              ?.map((e) => QuestionDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      file: json['file'] as String?,
    );

Map<String, dynamic> _$QuestionDtoToJson(QuestionDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'schoolId': instance.schoolId,
      'type': instance.type,
      'content': instance.content,
      'avatar': instance.avatar,
      'image': instance.image,
      'answers': instance.answers,
      'explain': instance.explain,
      'transcript': instance.transcript,
      'parentId': instance.parentId,
      'sound': instance.sound,
      'video': instance.video,
      'classLevel': instance.classLevel,
      'level': questionLevelEnumToJson(instance.level),
      'subjectId': instance.subjectId,
      'status': questionStatusEnumToJson(instance.status),
      'format': examFormatEnumToJson(instance.format),
      'labelType': instance.labelType,
      'isSystem': instance.isSystem,
      'tagIds': instance.tagIds,
      'mark': instance.mark,
      'childs': instance.childs?.map((e) => e.toJson()).toList(),
      'file': instance.file,
    };

QuestionDtoApiResponse _$QuestionDtoApiResponseFromJson(
        Map<String, dynamic> json) =>
    QuestionDtoApiResponse(
      data: json['data'] == null
          ? null
          : QuestionDto.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$QuestionDtoApiResponseToJson(
        QuestionDtoApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

QuestionDtoListApiResponse _$QuestionDtoListApiResponseFromJson(
        Map<String, dynamic> json) =>
    QuestionDtoListApiResponse(
      data: (json['data'] as List<dynamic>?)
              ?.map((e) => QuestionDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$QuestionDtoListApiResponseToJson(
        QuestionDtoListApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.map((e) => e.toJson()).toList(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

QuestionGetListQuery _$QuestionGetListQueryFromJson(
        Map<String, dynamic> json) =>
    QuestionGetListQuery(
      sortExpression: json['sortExpression'] as String?,
      pageSize: (json['pageSize'] as num?)?.toInt(),
      pageIndex: (json['pageIndex'] as num?)?.toInt(),
      skip: (json['skip'] as num?)?.toInt(),
      notSkip: (json['notSkip'] as num?)?.toInt(),
      propertyIncludes: (json['propertyIncludes'] as List<dynamic>?)
              ?.map((e) => e as String)
              .toList() ??
          [],
      keyword: json['keyword'] as String?,
      type: json['type'] as String?,
      userId: (json['userId'] as num?)?.toInt(),
      schoolId: (json['schoolId'] as num?)?.toInt(),
      subjectId: (json['subjectId'] as num?)?.toInt(),
      classLevel: (json['classLevel'] as num?)?.toInt(),
      level: questionLevelEnumFromJson((json['level'] as num?)?.toInt()),
      status: questionStatusEnumFromJson((json['status'] as num?)?.toInt()),
      filterType: (json['filterType'] as num?)?.toInt(),
      ids: (json['ids'] as List<dynamic>?)
              ?.map((e) => (e as num).toInt())
              .toList() ??
          [],
    );

Map<String, dynamic> _$QuestionGetListQueryToJson(
        QuestionGetListQuery instance) =>
    <String, dynamic>{
      'sortExpression': instance.sortExpression,
      'pageSize': instance.pageSize,
      'pageIndex': instance.pageIndex,
      'skip': instance.skip,
      'notSkip': instance.notSkip,
      'propertyIncludes': instance.propertyIncludes,
      'keyword': instance.keyword,
      'type': instance.type,
      'userId': instance.userId,
      'schoolId': instance.schoolId,
      'subjectId': instance.subjectId,
      'classLevel': instance.classLevel,
      'level': questionLevelEnumToJson(instance.level),
      'status': questionStatusEnumToJson(instance.status),
      'filterType': instance.filterType,
      'ids': instance.ids,
    };

QuestionListDto _$QuestionListDtoFromJson(Map<String, dynamic> json) =>
    QuestionListDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      schoolId: (json['schoolId'] as num?)?.toInt(),
      type: json['type'] as String?,
      content: json['content'] as String?,
      avatar: json['avatar'] as String?,
      image:
          (json['image'] as List<dynamic>?)?.map((e) => e as String).toList() ??
              [],
      answers: json['answers'] as String?,
      explain: json['explain'] as String?,
      transcript: json['transcript'] as String?,
      parentId: (json['parentId'] as num?)?.toInt(),
      sound:
          (json['sound'] as List<dynamic>?)?.map((e) => e as String).toList() ??
              [],
      video: json['video'] as String?,
      classLevel: (json['classLevel'] as num?)?.toInt(),
      level: questionLevelEnumFromJson((json['level'] as num?)?.toInt()),
      subjectId: (json['subjectId'] as num?)?.toInt(),
      status: questionStatusEnumFromJson((json['status'] as num?)?.toInt()),
      format: examFormatEnumFromJson((json['format'] as num?)?.toInt()),
      labelType: (json['labelType'] as num?)?.toInt(),
      isSystem: json['isSystem'] as bool?,
      isLike: json['isLike'] as bool?,
    );

Map<String, dynamic> _$QuestionListDtoToJson(QuestionListDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'schoolId': instance.schoolId,
      'type': instance.type,
      'content': instance.content,
      'avatar': instance.avatar,
      'image': instance.image,
      'answers': instance.answers,
      'explain': instance.explain,
      'transcript': instance.transcript,
      'parentId': instance.parentId,
      'sound': instance.sound,
      'video': instance.video,
      'classLevel': instance.classLevel,
      'level': questionLevelEnumToJson(instance.level),
      'subjectId': instance.subjectId,
      'status': questionStatusEnumToJson(instance.status),
      'format': examFormatEnumToJson(instance.format),
      'labelType': instance.labelType,
      'isSystem': instance.isSystem,
      'isLike': instance.isLike,
    };

QuestionListDtoFilterResult _$QuestionListDtoFilterResultFromJson(
        Map<String, dynamic> json) =>
    QuestionListDtoFilterResult(
      totalRows: (json['totalRows'] as num?)?.toInt(),
      data: (json['data'] as List<dynamic>?)
              ?.map((e) => QuestionListDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$QuestionListDtoFilterResultToJson(
        QuestionListDtoFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

QuestionListDtoFilterResultApiResponse
    _$QuestionListDtoFilterResultApiResponseFromJson(
            Map<String, dynamic> json) =>
        QuestionListDtoFilterResultApiResponse(
          data: json['data'] == null
              ? null
              : QuestionListDtoFilterResult.fromJson(
                  json['data'] as Map<String, dynamic>),
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic> _$QuestionListDtoFilterResultApiResponseToJson(
        QuestionListDtoFilterResultApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

RefreshTokenEntity _$RefreshTokenEntityFromJson(Map<String, dynamic> json) =>
    RefreshTokenEntity(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      token: json['token'] as String?,
      userId: (json['userId'] as num?)?.toInt(),
      user: json['user'] == null
          ? null
          : UserEntity.fromJson(json['user'] as Map<String, dynamic>),
      expires: json['expires'] == null
          ? null
          : DateTime.parse(json['expires'] as String),
      isExpired: json['isExpired'] as bool?,
      revoked: json['revoked'] == null
          ? null
          : DateTime.parse(json['revoked'] as String),
      isActive: json['isActive'] as bool?,
    );

Map<String, dynamic> _$RefreshTokenEntityToJson(RefreshTokenEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'token': instance.token,
      'userId': instance.userId,
      'user': instance.user?.toJson(),
      'expires': instance.expires?.toIso8601String(),
      'isExpired': instance.isExpired,
      'revoked': instance.revoked?.toIso8601String(),
      'isActive': instance.isActive,
    };

RefreshTokenRequestDto _$RefreshTokenRequestDtoFromJson(
        Map<String, dynamic> json) =>
    RefreshTokenRequestDto(
      refreshToken: json['refreshToken'] as String?,
    );

Map<String, dynamic> _$RefreshTokenRequestDtoToJson(
        RefreshTokenRequestDto instance) =>
    <String, dynamic>{
      'refreshToken': instance.refreshToken,
    };

RefreshTokenResponseDto _$RefreshTokenResponseDtoFromJson(
        Map<String, dynamic> json) =>
    RefreshTokenResponseDto(
      token: json['token'] as String?,
    );

Map<String, dynamic> _$RefreshTokenResponseDtoToJson(
        RefreshTokenResponseDto instance) =>
    <String, dynamic>{
      'token': instance.token,
    };

RefreshTokenResponseDtoApiResponse _$RefreshTokenResponseDtoApiResponseFromJson(
        Map<String, dynamic> json) =>
    RefreshTokenResponseDtoApiResponse(
      data: json['data'] == null
          ? null
          : RefreshTokenResponseDto.fromJson(
              json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$RefreshTokenResponseDtoApiResponseToJson(
        RefreshTokenResponseDtoApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

RegisterDto _$RegisterDtoFromJson(Map<String, dynamic> json) => RegisterDto(
      userName: json['userName'] as String?,
      email: json['email'] as String?,
      password: json['password'] as String?,
      fullName: json['fullName'] as String?,
      phoneNumber: json['phoneNumber'] as String?,
      roles: (json['roles'] as List<dynamic>?)
              ?.map((e) => (e as num).toInt())
              .toList() ??
          [],
      id: (json['id'] as num?)?.toInt(),
      avatar: json['avatar'] as String?,
      status: (json['status'] as num?)?.toInt(),
      type: userTypeEnumFromJson((json['type'] as num?)?.toInt()),
      objectId: (json['objectId'] as num?)?.toInt(),
      provinceId: (json['provinceId'] as num?)?.toInt(),
      identifierCode: json['identifierCode'] as String?,
      birthDay: json['birthDay'] == null
          ? null
          : DateTime.parse(json['birthDay'] as String),
      gender: (json['gender'] as num?)?.toInt(),
      address: json['address'] as String?,
    );

Map<String, dynamic> _$RegisterDtoToJson(RegisterDto instance) =>
    <String, dynamic>{
      'userName': instance.userName,
      'email': instance.email,
      'password': instance.password,
      'fullName': instance.fullName,
      'phoneNumber': instance.phoneNumber,
      'roles': instance.roles,
      'id': instance.id,
      'avatar': instance.avatar,
      'status': instance.status,
      'type': userTypeEnumToJson(instance.type),
      'objectId': instance.objectId,
      'provinceId': instance.provinceId,
      'identifierCode': instance.identifierCode,
      'birthDay': instance.birthDay?.toIso8601String(),
      'gender': instance.gender,
      'address': instance.address,
    };

RegisterDtoApiResponse _$RegisterDtoApiResponseFromJson(
        Map<String, dynamic> json) =>
    RegisterDtoApiResponse(
      data: json['data'] == null
          ? null
          : RegisterDto.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$RegisterDtoApiResponseToJson(
        RegisterDtoApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

ResetPasswordByUserNameResource _$ResetPasswordByUserNameResourceFromJson(
        Map<String, dynamic> json) =>
    ResetPasswordByUserNameResource(
      username: json['username'] as String?,
      password: json['password'] as String?,
      rePassword: json['rePassword'] as String?,
      token: json['token'] as String?,
    );

Map<String, dynamic> _$ResetPasswordByUserNameResourceToJson(
        ResetPasswordByUserNameResource instance) =>
    <String, dynamic>{
      'username': instance.username,
      'password': instance.password,
      'rePassword': instance.rePassword,
      'token': instance.token,
    };

ResponseX _$ResponseXFromJson(Map<String, dynamic> json) => ResponseX(
      sessionId: (json['sessionId'] as num?)?.toInt(),
      fileId: (json['fileId'] as num?)?.toInt(),
      docType: json['docType'] as String?,
      pages: json['pages'],
    );

Map<String, dynamic> _$ResponseXToJson(ResponseX instance) => <String, dynamic>{
      'sessionId': instance.sessionId,
      'fileId': instance.fileId,
      'docType': instance.docType,
      'pages': instance.pages,
    };

ResponseXApiResponse _$ResponseXApiResponseFromJson(
        Map<String, dynamic> json) =>
    ResponseXApiResponse(
      data: json['data'] == null
          ? null
          : ResponseX.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$ResponseXApiResponseToJson(
        ResponseXApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

RoleDto _$RoleDtoFromJson(Map<String, dynamic> json) => RoleDto(
      id: (json['id'] as num?)?.toInt(),
      name: json['name'] as String?,
      userCount: (json['userCount'] as num?)?.toInt(),
      listModule: (json['listModule'] as List<dynamic>?)
              ?.map((e) => RoleModuleDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$RoleDtoToJson(RoleDto instance) => <String, dynamic>{
      'id': instance.id,
      'name': instance.name,
      'userCount': instance.userCount,
      'listModule': instance.listModule?.map((e) => e.toJson()).toList(),
    };

RoleDtoApiResponse _$RoleDtoApiResponseFromJson(Map<String, dynamic> json) =>
    RoleDtoApiResponse(
      data: json['data'] == null
          ? null
          : RoleDto.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$RoleDtoApiResponseToJson(RoleDtoApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

RoleDtoListApiResponse _$RoleDtoListApiResponseFromJson(
        Map<String, dynamic> json) =>
    RoleDtoListApiResponse(
      data: (json['data'] as List<dynamic>?)
              ?.map((e) => RoleDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$RoleDtoListApiResponseToJson(
        RoleDtoListApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.map((e) => e.toJson()).toList(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

RoleModuleDto _$RoleModuleDtoFromJson(Map<String, dynamic> json) =>
    RoleModuleDto(
      module: moduleEnumFromJson((json['module'] as num?)?.toInt()),
      moduleName: json['moduleName'] as String?,
      isZone: json['isZone'] as bool?,
      isFull: json['isFull'] as bool?,
      tenantId: (json['tenantId'] as num?)?.toInt(),
      permissions: (json['permissions'] as List<dynamic>?)
              ?.map(
                  (e) => RolePermissionDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$RoleModuleDtoToJson(RoleModuleDto instance) =>
    <String, dynamic>{
      'module': moduleEnumToJson(instance.module),
      'moduleName': instance.moduleName,
      'isZone': instance.isZone,
      'isFull': instance.isFull,
      'tenantId': instance.tenantId,
      'permissions': instance.permissions?.map((e) => e.toJson()).toList(),
    };

RoleModuleDtoListApiResponse _$RoleModuleDtoListApiResponseFromJson(
        Map<String, dynamic> json) =>
    RoleModuleDtoListApiResponse(
      data: (json['data'] as List<dynamic>?)
              ?.map((e) => RoleModuleDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$RoleModuleDtoListApiResponseToJson(
        RoleModuleDtoListApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.map((e) => e.toJson()).toList(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

RolePermissionDto _$RolePermissionDtoFromJson(Map<String, dynamic> json) =>
    RolePermissionDto(
      fullZone: json['fullZone'] as bool?,
      zoneIds: (json['zoneIds'] as List<dynamic>?)
              ?.map((e) => (e as num).toInt())
              .toList() ??
          [],
      permission: (json['permission'] as num?)?.toInt(),
    );

Map<String, dynamic> _$RolePermissionDtoToJson(RolePermissionDto instance) =>
    <String, dynamic>{
      'fullZone': instance.fullZone,
      'zoneIds': instance.zoneIds,
      'permission': instance.permission,
    };

SafetySkillEntity _$SafetySkillEntityFromJson(Map<String, dynamic> json) =>
    SafetySkillEntity(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      name: json['name'] as String?,
      summary: json['summary'] as String?,
      detail: json['detail'] as String?,
      icon: json['icon'] as String?,
      image: json['image'] as String?,
      status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()),
    );

Map<String, dynamic> _$SafetySkillEntityToJson(SafetySkillEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'name': instance.name,
      'summary': instance.summary,
      'detail': instance.detail,
      'icon': instance.icon,
      'image': instance.image,
      'status': commonStatusEnumToJson(instance.status),
    };

SafetySkillEntityApiResponse _$SafetySkillEntityApiResponseFromJson(
        Map<String, dynamic> json) =>
    SafetySkillEntityApiResponse(
      data: json['data'] == null
          ? null
          : SafetySkillEntity.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$SafetySkillEntityApiResponseToJson(
        SafetySkillEntityApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

SafetySkillGetListQuery _$SafetySkillGetListQueryFromJson(
        Map<String, dynamic> json) =>
    SafetySkillGetListQuery(
      sortExpression: json['sortExpression'] as String?,
      pageSize: (json['pageSize'] as num?)?.toInt(),
      pageIndex: (json['pageIndex'] as num?)?.toInt(),
      skip: (json['skip'] as num?)?.toInt(),
      notSkip: (json['notSkip'] as num?)?.toInt(),
      propertyIncludes: (json['propertyIncludes'] as List<dynamic>?)
              ?.map((e) => e as String)
              .toList() ??
          [],
      keyword: json['keyword'] as String?,
    );

Map<String, dynamic> _$SafetySkillGetListQueryToJson(
        SafetySkillGetListQuery instance) =>
    <String, dynamic>{
      'sortExpression': instance.sortExpression,
      'pageSize': instance.pageSize,
      'pageIndex': instance.pageIndex,
      'skip': instance.skip,
      'notSkip': instance.notSkip,
      'propertyIncludes': instance.propertyIncludes,
      'keyword': instance.keyword,
    };

SafetySkillListDto _$SafetySkillListDtoFromJson(Map<String, dynamic> json) =>
    SafetySkillListDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      name: json['name'] as String?,
      summary: json['summary'] as String?,
      detail: json['detail'] as String?,
      icon: json['icon'] as String?,
      image: json['image'] as String?,
      status: commonStatusEnumFromJson((json['status'] as num?)?.toInt()),
    );

Map<String, dynamic> _$SafetySkillListDtoToJson(SafetySkillListDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'name': instance.name,
      'summary': instance.summary,
      'detail': instance.detail,
      'icon': instance.icon,
      'image': instance.image,
      'status': commonStatusEnumToJson(instance.status),
    };

SafetySkillListDtoFilterResult _$SafetySkillListDtoFilterResultFromJson(
        Map<String, dynamic> json) =>
    SafetySkillListDtoFilterResult(
      totalRows: (json['totalRows'] as num?)?.toInt(),
      data: (json['data'] as List<dynamic>?)
              ?.map(
                  (e) => SafetySkillListDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$SafetySkillListDtoFilterResultToJson(
        SafetySkillListDtoFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

SafetySkillListDtoFilterResultApiResponse
    _$SafetySkillListDtoFilterResultApiResponseFromJson(
            Map<String, dynamic> json) =>
        SafetySkillListDtoFilterResultApiResponse(
          data: json['data'] == null
              ? null
              : SafetySkillListDtoFilterResult.fromJson(
                  json['data'] as Map<String, dynamic>),
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic> _$SafetySkillListDtoFilterResultApiResponseToJson(
        SafetySkillListDtoFilterResultApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

SchoolClassDto _$SchoolClassDtoFromJson(Map<String, dynamic> json) =>
    SchoolClassDto(
      id: (json['id'] as num?)?.toInt(),
      name: json['name'] as String?,
      classes: (json['classes'] as List<dynamic>?)
              ?.map((e) => ClassShortDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$SchoolClassDtoToJson(SchoolClassDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'name': instance.name,
      'classes': instance.classes?.map((e) => e.toJson()).toList(),
    };

SchoolDto _$SchoolDtoFromJson(Map<String, dynamic> json) => SchoolDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      code: json['code'] as String?,
      name: json['name'] as String?,
      status: schoolStatusEnumFromJson((json['status'] as num?)?.toInt()),
      districtId: (json['districtId'] as num?)?.toInt(),
      provinceId: (json['provinceId'] as num?)?.toInt(),
      wardId: (json['wardId'] as num?)?.toInt(),
      address: json['address'] as String?,
      email: json['email'] as String?,
      phone: json['phone'] as String?,
      logo: json['logo'] as String?,
      url: json['url'] as String?,
      description: json['description'] as String?,
      type: json['type'] as String?,
      departmentId: (json['departmentId'] as num?)?.toInt(),
    );

Map<String, dynamic> _$SchoolDtoToJson(SchoolDto instance) => <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'code': instance.code,
      'name': instance.name,
      'status': schoolStatusEnumToJson(instance.status),
      'districtId': instance.districtId,
      'provinceId': instance.provinceId,
      'wardId': instance.wardId,
      'address': instance.address,
      'email': instance.email,
      'phone': instance.phone,
      'logo': instance.logo,
      'url': instance.url,
      'description': instance.description,
      'type': instance.type,
      'departmentId': instance.departmentId,
    };

SchoolDtoApiResponse _$SchoolDtoApiResponseFromJson(
        Map<String, dynamic> json) =>
    SchoolDtoApiResponse(
      data: json['data'] == null
          ? null
          : SchoolDto.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$SchoolDtoApiResponseToJson(
        SchoolDtoApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

SchoolEntity _$SchoolEntityFromJson(Map<String, dynamic> json) => SchoolEntity(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      code: json['code'] as String?,
      name: json['name'] as String?,
      status: schoolStatusEnumFromJson((json['status'] as num?)?.toInt()),
      districtId: (json['districtId'] as num?)?.toInt(),
      provinceId: (json['provinceId'] as num?)?.toInt(),
      wardId: (json['wardId'] as num?)?.toInt(),
      address: json['address'] as String?,
      email: json['email'] as String?,
      phone: json['phone'] as String?,
      logo: json['logo'] as String?,
      url: json['url'] as String?,
      description: json['description'] as String?,
      type: json['type'] as String?,
    );

Map<String, dynamic> _$SchoolEntityToJson(SchoolEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'code': instance.code,
      'name': instance.name,
      'status': schoolStatusEnumToJson(instance.status),
      'districtId': instance.districtId,
      'provinceId': instance.provinceId,
      'wardId': instance.wardId,
      'address': instance.address,
      'email': instance.email,
      'phone': instance.phone,
      'logo': instance.logo,
      'url': instance.url,
      'description': instance.description,
      'type': instance.type,
    };

SchoolEntityApiResponse _$SchoolEntityApiResponseFromJson(
        Map<String, dynamic> json) =>
    SchoolEntityApiResponse(
      data: json['data'] == null
          ? null
          : SchoolEntity.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$SchoolEntityApiResponseToJson(
        SchoolEntityApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

SchoolGetListQuery _$SchoolGetListQueryFromJson(Map<String, dynamic> json) =>
    SchoolGetListQuery(
      sortExpression: json['sortExpression'] as String?,
      pageSize: (json['pageSize'] as num?)?.toInt(),
      pageIndex: (json['pageIndex'] as num?)?.toInt(),
      skip: (json['skip'] as num?)?.toInt(),
      notSkip: (json['notSkip'] as num?)?.toInt(),
      propertyIncludes: (json['propertyIncludes'] as List<dynamic>?)
              ?.map((e) => e as String)
              .toList() ??
          [],
      keyword: json['keyword'] as String?,
      departmentId: (json['departmentId'] as num?)?.toInt(),
      officeId: (json['officeId'] as num?)?.toInt(),
      type: (json['type'] as num?)?.toInt(),
      status: schoolStatusEnumFromJson((json['status'] as num?)?.toInt()),
    );

Map<String, dynamic> _$SchoolGetListQueryToJson(SchoolGetListQuery instance) =>
    <String, dynamic>{
      'sortExpression': instance.sortExpression,
      'pageSize': instance.pageSize,
      'pageIndex': instance.pageIndex,
      'skip': instance.skip,
      'notSkip': instance.notSkip,
      'propertyIncludes': instance.propertyIncludes,
      'keyword': instance.keyword,
      'departmentId': instance.departmentId,
      'officeId': instance.officeId,
      'type': instance.type,
      'status': schoolStatusEnumToJson(instance.status),
    };

SchoolLevel _$SchoolLevelFromJson(Map<String, dynamic> json) => SchoolLevel(
      id: (json['id'] as num?)?.toInt(),
      name: json['name'] as String?,
      classLevels: (json['classLevels'] as List<dynamic>?)
              ?.map((e) => ClassLevel.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$SchoolLevelToJson(SchoolLevel instance) =>
    <String, dynamic>{
      'id': instance.id,
      'name': instance.name,
      'classLevels': instance.classLevels?.map((e) => e.toJson()).toList(),
    };

SchoolListDto _$SchoolListDtoFromJson(Map<String, dynamic> json) =>
    SchoolListDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      code: json['code'] as String?,
      name: json['name'] as String?,
      status: schoolStatusEnumFromJson((json['status'] as num?)?.toInt()),
      districtId: (json['districtId'] as num?)?.toInt(),
      provinceId: (json['provinceId'] as num?)?.toInt(),
      wardId: (json['wardId'] as num?)?.toInt(),
      address: json['address'] as String?,
      email: json['email'] as String?,
      phone: json['phone'] as String?,
      logo: json['logo'] as String?,
      url: json['url'] as String?,
      description: json['description'] as String?,
      type: json['type'] as String?,
      countActiveClass: (json['countActiveClass'] as num?)?.toInt(),
      departmentName: json['departmentName'] as String?,
      officeName: json['officeName'] as String?,
      studentCount: (json['studentCount'] as num?)?.toInt(),
      teacherCount: (json['teacherCount'] as num?)?.toInt(),
    );

Map<String, dynamic> _$SchoolListDtoToJson(SchoolListDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'code': instance.code,
      'name': instance.name,
      'status': schoolStatusEnumToJson(instance.status),
      'districtId': instance.districtId,
      'provinceId': instance.provinceId,
      'wardId': instance.wardId,
      'address': instance.address,
      'email': instance.email,
      'phone': instance.phone,
      'logo': instance.logo,
      'url': instance.url,
      'description': instance.description,
      'type': instance.type,
      'countActiveClass': instance.countActiveClass,
      'departmentName': instance.departmentName,
      'officeName': instance.officeName,
      'studentCount': instance.studentCount,
      'teacherCount': instance.teacherCount,
    };

SchoolListDtoFilterResult _$SchoolListDtoFilterResultFromJson(
        Map<String, dynamic> json) =>
    SchoolListDtoFilterResult(
      totalRows: (json['totalRows'] as num?)?.toInt(),
      data: (json['data'] as List<dynamic>?)
              ?.map((e) => SchoolListDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$SchoolListDtoFilterResultToJson(
        SchoolListDtoFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

SchoolListDtoFilterResultApiResponse
    _$SchoolListDtoFilterResultApiResponseFromJson(Map<String, dynamic> json) =>
        SchoolListDtoFilterResultApiResponse(
          data: json['data'] == null
              ? null
              : SchoolListDtoFilterResult.fromJson(
                  json['data'] as Map<String, dynamic>),
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic> _$SchoolListDtoFilterResultApiResponseToJson(
        SchoolListDtoFilterResultApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

SchoolListDtoListApiResponse _$SchoolListDtoListApiResponseFromJson(
        Map<String, dynamic> json) =>
    SchoolListDtoListApiResponse(
      data: (json['data'] as List<dynamic>?)
              ?.map((e) => SchoolListDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$SchoolListDtoListApiResponseToJson(
        SchoolListDtoListApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.map((e) => e.toJson()).toList(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

SchoolStaticCountDto _$SchoolStaticCountDtoFromJson(
        Map<String, dynamic> json) =>
    SchoolStaticCountDto(
      schoolName: json['schoolName'] as String?,
      classCount: (json['classCount'] as num?)?.toInt(),
      teacherCount: (json['teacherCount'] as num?)?.toInt(),
      assignmentCount: (json['assignmentCount'] as num?)?.toInt(),
    );

Map<String, dynamic> _$SchoolStaticCountDtoToJson(
        SchoolStaticCountDto instance) =>
    <String, dynamic>{
      'schoolName': instance.schoolName,
      'classCount': instance.classCount,
      'teacherCount': instance.teacherCount,
      'assignmentCount': instance.assignmentCount,
    };

SchoolStaticCountDtoApiResponse _$SchoolStaticCountDtoApiResponseFromJson(
        Map<String, dynamic> json) =>
    SchoolStaticCountDtoApiResponse(
      data: json['data'] == null
          ? null
          : SchoolStaticCountDto.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$SchoolStaticCountDtoApiResponseToJson(
        SchoolStaticCountDtoApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

SessionAttendanceEntity _$SessionAttendanceEntityFromJson(
        Map<String, dynamic> json) =>
    SessionAttendanceEntity(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      sessionId: (json['sessionId'] as num?)?.toInt(),
      userId: (json['userId'] as num?)?.toInt(),
      joinTime: json['joinTime'] == null
          ? null
          : DateTime.parse(json['joinTime'] as String),
      leaveTime: json['leaveTime'] == null
          ? null
          : DateTime.parse(json['leaveTime'] as String),
      durationMinutes: (json['durationMinutes'] as num?)?.toInt(),
      status: attendanceStatusEnumFromJson((json['status'] as num?)?.toInt()),
      notes: json['notes'] as String?,
      session: json['session'] == null
          ? null
          : ClassSessionEntity.fromJson(
              json['session'] as Map<String, dynamic>),
      user: json['user'] == null
          ? null
          : UserEntity.fromJson(json['user'] as Map<String, dynamic>),
    );

Map<String, dynamic> _$SessionAttendanceEntityToJson(
        SessionAttendanceEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'sessionId': instance.sessionId,
      'userId': instance.userId,
      'joinTime': instance.joinTime?.toIso8601String(),
      'leaveTime': instance.leaveTime?.toIso8601String(),
      'durationMinutes': instance.durationMinutes,
      'status': attendanceStatusEnumToJson(instance.status),
      'notes': instance.notes,
      'session': instance.session?.toJson(),
      'user': instance.user?.toJson(),
    };

Setup2FADto _$Setup2FADtoFromJson(Map<String, dynamic> json) => Setup2FADto(
      sharedKey: json['sharedKey'] as String?,
      authenticatorUri: json['authenticatorUri'] as String?,
    );

Map<String, dynamic> _$Setup2FADtoToJson(Setup2FADto instance) =>
    <String, dynamic>{
      'sharedKey': instance.sharedKey,
      'authenticatorUri': instance.authenticatorUri,
    };

SimpleChatRequest _$SimpleChatRequestFromJson(Map<String, dynamic> json) =>
    SimpleChatRequest(
      message: json['message'] as String?,
      systemPrompt: json['systemPrompt'] as String?,
    );

Map<String, dynamic> _$SimpleChatRequestToJson(SimpleChatRequest instance) =>
    <String, dynamic>{
      'message': instance.message,
      'systemPrompt': instance.systemPrompt,
    };

StatisticalDto _$StatisticalDtoFromJson(Map<String, dynamic> json) =>
    StatisticalDto(
      totalClass: (json['totalClass'] as num?)?.toInt(),
      totalStudent: (json['totalStudent'] as num?)?.toInt(),
      totalExam: (json['totalExam'] as num?)?.toInt(),
      totalQuestion: (json['totalQuestion'] as num?)?.toInt(),
    );

Map<String, dynamic> _$StatisticalDtoToJson(StatisticalDto instance) =>
    <String, dynamic>{
      'totalClass': instance.totalClass,
      'totalStudent': instance.totalStudent,
      'totalExam': instance.totalExam,
      'totalQuestion': instance.totalQuestion,
    };

StatisticalDtoApiResponse _$StatisticalDtoApiResponseFromJson(
        Map<String, dynamic> json) =>
    StatisticalDtoApiResponse(
      data: json['data'] == null
          ? null
          : StatisticalDto.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$StatisticalDtoApiResponseToJson(
        StatisticalDtoApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

Subject _$SubjectFromJson(Map<String, dynamic> json) => Subject(
      id: (json['id'] as num?)?.toInt(),
      name: json['name'] as String?,
    );

Map<String, dynamic> _$SubjectToJson(Subject instance) => <String, dynamic>{
      'id': instance.id,
      'name': instance.name,
    };

SystemEnums _$SystemEnumsFromJson(Map<String, dynamic> json) => SystemEnums(
      code: json['code'] as String?,
      values: json['values'] == null
          ? null
          : Enum.fromJson(json['values'] as Map<String, dynamic>),
      items: (json['items'] as List<dynamic>?)
              ?.map((e) => EnumItemEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$SystemEnumsToJson(SystemEnums instance) =>
    <String, dynamic>{
      'code': instance.code,
      'values': instance.values?.toJson(),
      'items': instance.items?.map((e) => e.toJson()).toList(),
    };

SystemInitDto _$SystemInitDtoFromJson(Map<String, dynamic> json) =>
    SystemInitDto(
      category: (json['category'] as List<dynamic>?)
              ?.map((e) => CategoryEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      enums: (json['enums'] as List<dynamic>?)
              ?.map((e) => SystemEnums.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      userPermissions: (json['userPermissions'] as List<dynamic>?)
              ?.map((e) => RoleModuleDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      currentObject: json['currentObject'] == null
          ? null
          : CurrentObjectDto.fromJson(
              json['currentObject'] as Map<String, dynamic>),
      processingStatus: json['processingStatus'],
      schoolLevels: (json['schoolLevels'] as List<dynamic>?)
              ?.map((e) => SchoolLevel.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      school: json['school'] == null
          ? null
          : SchoolEntity.fromJson(json['school'] as Map<String, dynamic>),
      academicYears: (json['academicYears'] as List<dynamic>?)
              ?.map(
                  (e) => AcademicYearEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$SystemInitDtoToJson(SystemInitDto instance) =>
    <String, dynamic>{
      'category': instance.category?.map((e) => e.toJson()).toList(),
      'enums': instance.enums?.map((e) => e.toJson()).toList(),
      'userPermissions':
          instance.userPermissions?.map((e) => e.toJson()).toList(),
      'currentObject': instance.currentObject?.toJson(),
      'processingStatus': instance.processingStatus,
      'schoolLevels': instance.schoolLevels?.map((e) => e.toJson()).toList(),
      'school': instance.school?.toJson(),
      'academicYears': instance.academicYears?.map((e) => e.toJson()).toList(),
    };

SystemInitDtoApiResponse _$SystemInitDtoApiResponseFromJson(
        Map<String, dynamic> json) =>
    SystemInitDtoApiResponse(
      data: json['data'] == null
          ? null
          : SystemInitDto.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$SystemInitDtoApiResponseToJson(
        SystemInitDtoApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

TagAddNewsDto _$TagAddNewsDtoFromJson(Map<String, dynamic> json) =>
    TagAddNewsDto(
      tagId: (json['tagId'] as num?)?.toInt(),
      newsIds: (json['newsIds'] as List<dynamic>?)
              ?.map((e) => (e as num).toInt())
              .toList() ??
          [],
    );

Map<String, dynamic> _$TagAddNewsDtoToJson(TagAddNewsDto instance) =>
    <String, dynamic>{
      'tagId': instance.tagId,
      'newsIds': instance.newsIds,
    };

TagDto _$TagDtoFromJson(Map<String, dynamic> json) => TagDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      name: json['name'] as String?,
      unsignName: json['unsignName'] as String?,
      url: json['url'] as String?,
      isHotTag: json['isHotTag'] as bool?,
      status: (json['status'] as num?)?.toInt(),
    );

Map<String, dynamic> _$TagDtoToJson(TagDto instance) => <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'name': instance.name,
      'unsignName': instance.unsignName,
      'url': instance.url,
      'isHotTag': instance.isHotTag,
      'status': instance.status,
    };

TagDtoApiResponse _$TagDtoApiResponseFromJson(Map<String, dynamic> json) =>
    TagDtoApiResponse(
      data: json['data'] == null
          ? null
          : TagDto.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$TagDtoApiResponseToJson(TagDtoApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

TagDtoListApiResponse _$TagDtoListApiResponseFromJson(
        Map<String, dynamic> json) =>
    TagDtoListApiResponse(
      data: (json['data'] as List<dynamic>?)
              ?.map((e) => TagDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$TagDtoListApiResponseToJson(
        TagDtoListApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.map((e) => e.toJson()).toList(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

TagGetListQuery _$TagGetListQueryFromJson(Map<String, dynamic> json) =>
    TagGetListQuery(
      sortExpression: json['sortExpression'] as String?,
      pageSize: (json['pageSize'] as num?)?.toInt(),
      pageIndex: (json['pageIndex'] as num?)?.toInt(),
      skip: (json['skip'] as num?)?.toInt(),
      notSkip: (json['notSkip'] as num?)?.toInt(),
      propertyIncludes: (json['propertyIncludes'] as List<dynamic>?)
              ?.map((e) => e as String)
              .toList() ??
          [],
      keyword: json['keyword'] as String?,
      zoneId: (json['zoneId'] as num?)?.toInt(),
      type: (json['type'] as num?)?.toInt(),
    );

Map<String, dynamic> _$TagGetListQueryToJson(TagGetListQuery instance) =>
    <String, dynamic>{
      'sortExpression': instance.sortExpression,
      'pageSize': instance.pageSize,
      'pageIndex': instance.pageIndex,
      'skip': instance.skip,
      'notSkip': instance.notSkip,
      'propertyIncludes': instance.propertyIncludes,
      'keyword': instance.keyword,
      'zoneId': instance.zoneId,
      'type': instance.type,
    };

TagGetListWithNewsCountQuery _$TagGetListWithNewsCountQueryFromJson(
        Map<String, dynamic> json) =>
    TagGetListWithNewsCountQuery(
      onlyHotTags: json['onlyHotTags'] as bool?,
    );

Map<String, dynamic> _$TagGetListWithNewsCountQueryToJson(
        TagGetListWithNewsCountQuery instance) =>
    <String, dynamic>{
      'onlyHotTags': instance.onlyHotTags,
    };

TagListDto _$TagListDtoFromJson(Map<String, dynamic> json) => TagListDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      name: json['name'] as String?,
      isHotTag: json['isHotTag'] as bool?,
      newsCount: (json['newsCount'] as num?)?.toInt(),
      zoneId: (json['zoneId'] as num?)?.toInt(),
      zone: json['zone'] as String?,
      url: json['url'] as String?,
    );

Map<String, dynamic> _$TagListDtoToJson(TagListDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'name': instance.name,
      'isHotTag': instance.isHotTag,
      'newsCount': instance.newsCount,
      'zoneId': instance.zoneId,
      'zone': instance.zone,
      'url': instance.url,
    };

TagListDtoFilterResult _$TagListDtoFilterResultFromJson(
        Map<String, dynamic> json) =>
    TagListDtoFilterResult(
      totalRows: (json['totalRows'] as num?)?.toInt(),
      data: (json['data'] as List<dynamic>?)
              ?.map((e) => TagListDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$TagListDtoFilterResultToJson(
        TagListDtoFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

TagListDtoFilterResultApiResponse _$TagListDtoFilterResultApiResponseFromJson(
        Map<String, dynamic> json) =>
    TagListDtoFilterResultApiResponse(
      data: json['data'] == null
          ? null
          : TagListDtoFilterResult.fromJson(
              json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$TagListDtoFilterResultApiResponseToJson(
        TagListDtoFilterResultApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

TagListDtoListApiResponse _$TagListDtoListApiResponseFromJson(
        Map<String, dynamic> json) =>
    TagListDtoListApiResponse(
      data: (json['data'] as List<dynamic>?)
              ?.map((e) => TagListDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$TagListDtoListApiResponseToJson(
        TagListDtoListApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.map((e) => e.toJson()).toList(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

TeacherCreateDto _$TeacherCreateDtoFromJson(Map<String, dynamic> json) =>
    TeacherCreateDto(
      userName: json['userName'] as String?,
      email: json['email'] as String?,
      password: json['password'] as String?,
      fullName: json['fullName'] as String?,
      phoneNumber: json['phoneNumber'] as String?,
      roles: (json['roles'] as List<dynamic>?)
              ?.map((e) => (e as num).toInt())
              .toList() ??
          [],
      id: (json['id'] as num?)?.toInt(),
      avatar: json['avatar'] as String?,
      status: (json['status'] as num?)?.toInt(),
      type: userTypeEnumFromJson((json['type'] as num?)?.toInt()),
      objectId: (json['objectId'] as num?)?.toInt(),
      provinceId: (json['provinceId'] as num?)?.toInt(),
      birthDay: json['birthDay'] == null
          ? null
          : DateTime.parse(json['birthDay'] as String),
      gender: (json['gender'] as num?)?.toInt(),
      identifierCode: json['identifierCode'] as String?,
      isTemp: json['isTemp'] as bool?,
      classId: (json['classId'] as num?)?.toInt(),
      className: json['className'] as String?,
      ethnic: json['ethnic'] as String?,
      rowIndex: (json['rowIndex'] as num?)?.toInt(),
      address: json['address'] as String?,
      classListStr: json['classListStr'] as String?,
      classManageStr: json['classManageStr'] as String?,
      subject: json['subject'] as String?,
    );

Map<String, dynamic> _$TeacherCreateDtoToJson(TeacherCreateDto instance) =>
    <String, dynamic>{
      'userName': instance.userName,
      'email': instance.email,
      'password': instance.password,
      'fullName': instance.fullName,
      'phoneNumber': instance.phoneNumber,
      'roles': instance.roles,
      'id': instance.id,
      'avatar': instance.avatar,
      'status': instance.status,
      'type': userTypeEnumToJson(instance.type),
      'objectId': instance.objectId,
      'provinceId': instance.provinceId,
      'birthDay': instance.birthDay?.toIso8601String(),
      'gender': instance.gender,
      'identifierCode': instance.identifierCode,
      'isTemp': instance.isTemp,
      'classId': instance.classId,
      'className': instance.className,
      'ethnic': instance.ethnic,
      'rowIndex': instance.rowIndex,
      'address': instance.address,
      'classListStr': instance.classListStr,
      'classManageStr': instance.classManageStr,
      'subject': instance.subject,
    };

TeacherFilterDto _$TeacherFilterDtoFromJson(Map<String, dynamic> json) =>
    TeacherFilterDto(
      sortExpression: json['sortExpression'] as String?,
      pageSize: (json['pageSize'] as num?)?.toInt(),
      pageIndex: (json['pageIndex'] as num?)?.toInt(),
      skip: (json['skip'] as num?)?.toInt(),
      notSkip: (json['notSkip'] as num?)?.toInt(),
      propertyIncludes: (json['propertyIncludes'] as List<dynamic>?)
              ?.map((e) => e as String)
              .toList() ??
          [],
      classId: (json['classId'] as num?)?.toInt(),
      keyword: json['keyword'] as String?,
      status: classUserStatusEnumFromJson((json['status'] as num?)?.toInt()),
      isGetCountAssignExam: json['isGetCountAssignExam'] as bool?,
    );

Map<String, dynamic> _$TeacherFilterDtoToJson(TeacherFilterDto instance) =>
    <String, dynamic>{
      'sortExpression': instance.sortExpression,
      'pageSize': instance.pageSize,
      'pageIndex': instance.pageIndex,
      'skip': instance.skip,
      'notSkip': instance.notSkip,
      'propertyIncludes': instance.propertyIncludes,
      'classId': instance.classId,
      'keyword': instance.keyword,
      'status': classUserStatusEnumToJson(instance.status),
      'isGetCountAssignExam': instance.isGetCountAssignExam,
    };

TeacherGetBySchoolDto _$TeacherGetBySchoolDtoFromJson(
        Map<String, dynamic> json) =>
    TeacherGetBySchoolDto(
      id: (json['id'] as num?)?.toInt(),
      userName: json['userName'] as String?,
      avatar: json['avatar'] as String?,
      fullName: json['fullName'] as String?,
      fullNameNonAccent: json['fullNameNonAccent'] as String?,
      classCount: (json['classCount'] as num?)?.toInt(),
      assignmentCount: (json['assignmentCount'] as num?)?.toInt(),
      assignmentMarkedCount: (json['assignmentMarkedCount'] as num?)?.toInt(),
      assignmentMarkedWaitingCount:
          (json['assignmentMarkedWaitingCount'] as num?)?.toInt(),
    );

Map<String, dynamic> _$TeacherGetBySchoolDtoToJson(
        TeacherGetBySchoolDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'userName': instance.userName,
      'avatar': instance.avatar,
      'fullName': instance.fullName,
      'fullNameNonAccent': instance.fullNameNonAccent,
      'classCount': instance.classCount,
      'assignmentCount': instance.assignmentCount,
      'assignmentMarkedCount': instance.assignmentMarkedCount,
      'assignmentMarkedWaitingCount': instance.assignmentMarkedWaitingCount,
    };

TeacherGetBySchoolDtoFilterResult _$TeacherGetBySchoolDtoFilterResultFromJson(
        Map<String, dynamic> json) =>
    TeacherGetBySchoolDtoFilterResult(
      totalRows: (json['totalRows'] as num?)?.toInt(),
      data: (json['data'] as List<dynamic>?)
              ?.map((e) =>
                  TeacherGetBySchoolDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$TeacherGetBySchoolDtoFilterResultToJson(
        TeacherGetBySchoolDtoFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

TeacherGetBySchoolDtoFilterResultApiResponse
    _$TeacherGetBySchoolDtoFilterResultApiResponseFromJson(
            Map<String, dynamic> json) =>
        TeacherGetBySchoolDtoFilterResultApiResponse(
          data: json['data'] == null
              ? null
              : TeacherGetBySchoolDtoFilterResult.fromJson(
                  json['data'] as Map<String, dynamic>),
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic> _$TeacherGetBySchoolDtoFilterResultApiResponseToJson(
        TeacherGetBySchoolDtoFilterResultApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

TeacherGetBySchoolFilterDto _$TeacherGetBySchoolFilterDtoFromJson(
        Map<String, dynamic> json) =>
    TeacherGetBySchoolFilterDto(
      sortExpression: json['sortExpression'] as String?,
      pageSize: (json['pageSize'] as num?)?.toInt(),
      pageIndex: (json['pageIndex'] as num?)?.toInt(),
      skip: (json['skip'] as num?)?.toInt(),
      notSkip: (json['notSkip'] as num?)?.toInt(),
      propertyIncludes: (json['propertyIncludes'] as List<dynamic>?)
              ?.map((e) => e as String)
              .toList() ??
          [],
      schoolId: (json['schoolId'] as num?)?.toInt(),
      keyword: json['keyword'] as String?,
    );

Map<String, dynamic> _$TeacherGetBySchoolFilterDtoToJson(
        TeacherGetBySchoolFilterDto instance) =>
    <String, dynamic>{
      'sortExpression': instance.sortExpression,
      'pageSize': instance.pageSize,
      'pageIndex': instance.pageIndex,
      'skip': instance.skip,
      'notSkip': instance.notSkip,
      'propertyIncludes': instance.propertyIncludes,
      'schoolId': instance.schoolId,
      'keyword': instance.keyword,
    };

TeacherListDto _$TeacherListDtoFromJson(Map<String, dynamic> json) =>
    TeacherListDto(
      id: (json['id'] as num?)?.toInt(),
      userName: json['userName'] as String?,
      avatar: json['avatar'] as String?,
      fullName: json['fullName'] as String?,
      email: json['email'] as String?,
      status: classUserStatusEnumFromJson((json['status'] as num?)?.toInt()),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      subjectIds: (json['subjectIds'] as List<dynamic>?)
              ?.map((e) => (e as num).toInt())
              .toList() ??
          [],
      subject: json['subject'] as String?,
      isManager: json['isManager'] as bool?,
      countAssignExam: (json['countAssignExam'] as num?)?.toInt(),
      countAssignExamMarkedWaiting:
          (json['countAssignExamMarkedWaiting'] as num?)?.toInt(),
    );

Map<String, dynamic> _$TeacherListDtoToJson(TeacherListDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'userName': instance.userName,
      'avatar': instance.avatar,
      'fullName': instance.fullName,
      'email': instance.email,
      'status': classUserStatusEnumToJson(instance.status),
      'createdDate': instance.createdDate?.toIso8601String(),
      'subjectIds': instance.subjectIds,
      'subject': instance.subject,
      'isManager': instance.isManager,
      'countAssignExam': instance.countAssignExam,
      'countAssignExamMarkedWaiting': instance.countAssignExamMarkedWaiting,
    };

TeacherListDtoFilterResult _$TeacherListDtoFilterResultFromJson(
        Map<String, dynamic> json) =>
    TeacherListDtoFilterResult(
      totalRows: (json['totalRows'] as num?)?.toInt(),
      data: (json['data'] as List<dynamic>?)
              ?.map((e) => TeacherListDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$TeacherListDtoFilterResultToJson(
        TeacherListDtoFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

TeacherStaticByTypeExamDto _$TeacherStaticByTypeExamDtoFromJson(
        Map<String, dynamic> json) =>
    TeacherStaticByTypeExamDto(
      type: assignExamTypeEnumFromJson((json['type'] as num?)?.toInt()),
      total: (json['total'] as num?)?.toInt(),
      markedCount: (json['markedCount'] as num?)?.toInt(),
      markedWaitingCount: (json['markedWaitingCount'] as num?)?.toInt(),
      averageScore: (json['averageScore'] as num?)?.toDouble(),
    );

Map<String, dynamic> _$TeacherStaticByTypeExamDtoToJson(
        TeacherStaticByTypeExamDto instance) =>
    <String, dynamic>{
      'type': assignExamTypeEnumToJson(instance.type),
      'total': instance.total,
      'markedCount': instance.markedCount,
      'markedWaitingCount': instance.markedWaitingCount,
      'averageScore': instance.averageScore,
    };

TeacherStaticByTypeExamDtoListApiResponse
    _$TeacherStaticByTypeExamDtoListApiResponseFromJson(
            Map<String, dynamic> json) =>
        TeacherStaticByTypeExamDtoListApiResponse(
          data: (json['data'] as List<dynamic>?)
                  ?.map((e) => TeacherStaticByTypeExamDto.fromJson(
                      e as Map<String, dynamic>))
                  .toList() ??
              [],
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic> _$TeacherStaticByTypeExamDtoListApiResponseToJson(
        TeacherStaticByTypeExamDtoListApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.map((e) => e.toJson()).toList(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

TeacherUpdateManagerCommand _$TeacherUpdateManagerCommandFromJson(
        Map<String, dynamic> json) =>
    TeacherUpdateManagerCommand(
      classId: (json['classId'] as num?)?.toInt(),
      userId: (json['userId'] as num?)?.toInt(),
    );

Map<String, dynamic> _$TeacherUpdateManagerCommandToJson(
        TeacherUpdateManagerCommand instance) =>
    <String, dynamic>{
      'classId': instance.classId,
      'userId': instance.userId,
    };

TeacherUpdateSubjectsCommand _$TeacherUpdateSubjectsCommandFromJson(
        Map<String, dynamic> json) =>
    TeacherUpdateSubjectsCommand(
      classId: (json['classId'] as num?)?.toInt(),
      userId: (json['userId'] as num?)?.toInt(),
      subjectIds: (json['subjectIds'] as List<dynamic>?)
              ?.map((e) => (e as num).toInt())
              .toList() ??
          [],
    );

Map<String, dynamic> _$TeacherUpdateSubjectsCommandToJson(
        TeacherUpdateSubjectsCommand instance) =>
    <String, dynamic>{
      'classId': instance.classId,
      'userId': instance.userId,
      'subjectIds': instance.subjectIds,
    };

TopAverageScoreDto _$TopAverageScoreDtoFromJson(Map<String, dynamic> json) =>
    TopAverageScoreDto(
      userId: (json['userId'] as num?)?.toInt(),
      avatar: json['avatar'] as String?,
      fullName: json['fullName'] as String?,
      averageScore: (json['averageScore'] as num?)?.toDouble(),
    );

Map<String, dynamic> _$TopAverageScoreDtoToJson(TopAverageScoreDto instance) =>
    <String, dynamic>{
      'userId': instance.userId,
      'avatar': instance.avatar,
      'fullName': instance.fullName,
      'averageScore': instance.averageScore,
    };

TopNeedsToDoHomeworkDto _$TopNeedsToDoHomeworkDtoFromJson(
        Map<String, dynamic> json) =>
    TopNeedsToDoHomeworkDto(
      userId: (json['userId'] as num?)?.toInt(),
      avatar: json['avatar'] as String?,
      fullName: json['fullName'] as String?,
      countExam: (json['countExam'] as num?)?.toInt(),
      countExamDone: (json['countExamDone'] as num?)?.toInt(),
      countExamNotStarted: (json['countExamNotStarted'] as num?)?.toInt(),
    );

Map<String, dynamic> _$TopNeedsToDoHomeworkDtoToJson(
        TopNeedsToDoHomeworkDto instance) =>
    <String, dynamic>{
      'userId': instance.userId,
      'avatar': instance.avatar,
      'fullName': instance.fullName,
      'countExam': instance.countExam,
      'countExamDone': instance.countExamDone,
      'countExamNotStarted': instance.countExamNotStarted,
    };

UpdateAvatarDto _$UpdateAvatarDtoFromJson(Map<String, dynamic> json) =>
    UpdateAvatarDto(
      avatar: json['avatar'] as String?,
    );

Map<String, dynamic> _$UpdateAvatarDtoToJson(UpdateAvatarDto instance) =>
    <String, dynamic>{
      'avatar': instance.avatar,
    };

UpdateInfoDto _$UpdateInfoDtoFromJson(Map<String, dynamic> json) =>
    UpdateInfoDto(
      fullName: json['fullName'] as String?,
      phoneNumber: json['phoneNumber'] as String?,
      avatar: json['avatar'] as String?,
    );

Map<String, dynamic> _$UpdateInfoDtoToJson(UpdateInfoDto instance) =>
    <String, dynamic>{
      'fullName': instance.fullName,
      'phoneNumber': instance.phoneNumber,
      'avatar': instance.avatar,
    };

UserAnsweDataDto _$UserAnsweDataDtoFromJson(Map<String, dynamic> json) =>
    UserAnsweDataDto(
      id: json['id'] as String?,
      content: json['content'] as String?,
      itemId: json['itemId'] as String?,
      isCorrect: json['isCorrect'] as bool?,
      mark: (json['mark'] as num?)?.toDouble(),
    );

Map<String, dynamic> _$UserAnsweDataDtoToJson(UserAnsweDataDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'content': instance.content,
      'itemId': instance.itemId,
      'isCorrect': instance.isCorrect,
      'mark': instance.mark,
    };

UserAnswerDto _$UserAnswerDtoFromJson(Map<String, dynamic> json) =>
    UserAnswerDto(
      id: (json['id'] as num?)?.toInt(),
      questionId: (json['questionId'] as num?)?.toInt(),
      parentId: (json['parentId'] as num?)?.toInt(),
      content: json['content'] as String?,
      isCorrect: json['isCorrect'] as bool?,
      mark: (json['mark'] as num?)?.toDouble(),
      comment: json['comment'] as String?,
      commentBy: (json['commentBy'] as num?)?.toInt(),
      commentDate: json['commentDate'] == null
          ? null
          : DateTime.parse(json['commentDate'] as String),
      answer: (json['answer'] as List<dynamic>?)
              ?.map((e) => UserAnsweDataDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      childAnswer: (json['childAnswer'] as List<dynamic>?)
              ?.map((e) => UserAnswerDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$UserAnswerDtoToJson(UserAnswerDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'questionId': instance.questionId,
      'parentId': instance.parentId,
      'content': instance.content,
      'isCorrect': instance.isCorrect,
      'mark': instance.mark,
      'comment': instance.comment,
      'commentBy': instance.commentBy,
      'commentDate': instance.commentDate?.toIso8601String(),
      'answer': instance.answer?.map((e) => e.toJson()).toList(),
      'childAnswer': instance.childAnswer?.map((e) => e.toJson()).toList(),
    };

UserAnswerEntity _$UserAnswerEntityFromJson(Map<String, dynamic> json) =>
    UserAnswerEntity(
      id: (json['id'] as num?)?.toInt(),
      userExamResultId: (json['userExamResultId'] as num?)?.toInt(),
      questionId: (json['questionId'] as num?)?.toInt(),
      parentId: (json['parentId'] as num?)?.toInt(),
      content: json['content'] as String?,
      fileUrl: json['fileUrl'] as String?,
      mark: (json['mark'] as num?)?.toDouble(),
      isCorrect: json['isCorrect'] as bool?,
      answer: json['answer'] as String?,
      comment: json['comment'] as String?,
      commentBy: (json['commentBy'] as num?)?.toInt(),
      commentDate: json['commentDate'] == null
          ? null
          : DateTime.parse(json['commentDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
    );

Map<String, dynamic> _$UserAnswerEntityToJson(UserAnswerEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'userExamResultId': instance.userExamResultId,
      'questionId': instance.questionId,
      'parentId': instance.parentId,
      'content': instance.content,
      'fileUrl': instance.fileUrl,
      'mark': instance.mark,
      'isCorrect': instance.isCorrect,
      'answer': instance.answer,
      'comment': instance.comment,
      'commentBy': instance.commentBy,
      'commentDate': instance.commentDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
    };

UserClaimEntity _$UserClaimEntityFromJson(Map<String, dynamic> json) =>
    UserClaimEntity(
      id: (json['id'] as num?)?.toInt(),
      userId: (json['userId'] as num?)?.toInt(),
      claimType: json['claimType'] as String?,
      claimValue: json['claimValue'] as String?,
    );

Map<String, dynamic> _$UserClaimEntityToJson(UserClaimEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'userId': instance.userId,
      'claimType': instance.claimType,
      'claimValue': instance.claimValue,
    };

UserCreateDto _$UserCreateDtoFromJson(Map<String, dynamic> json) =>
    UserCreateDto(
      userName: json['userName'] as String?,
      email: json['email'] as String?,
      password: json['password'] as String?,
      fullName: json['fullName'] as String?,
      phoneNumber: json['phoneNumber'] as String?,
      roles: (json['roles'] as List<dynamic>?)
              ?.map((e) => (e as num).toInt())
              .toList() ??
          [],
      id: (json['id'] as num?)?.toInt(),
      avatar: json['avatar'] as String?,
      status: (json['status'] as num?)?.toInt(),
      type: userTypeEnumFromJson((json['type'] as num?)?.toInt()),
      objectId: (json['objectId'] as num?)?.toInt(),
      provinceId: (json['provinceId'] as num?)?.toInt(),
      birthDay: json['birthDay'] == null
          ? null
          : DateTime.parse(json['birthDay'] as String),
      gender: (json['gender'] as num?)?.toInt(),
      identifierCode: json['identifierCode'] as String?,
      isTemp: json['isTemp'] as bool?,
      classId: (json['classId'] as num?)?.toInt(),
      className: json['className'] as String?,
      ethnic: json['ethnic'] as String?,
      rowIndex: (json['rowIndex'] as num?)?.toInt(),
      address: json['address'] as String?,
    );

Map<String, dynamic> _$UserCreateDtoToJson(UserCreateDto instance) =>
    <String, dynamic>{
      'userName': instance.userName,
      'email': instance.email,
      'password': instance.password,
      'fullName': instance.fullName,
      'phoneNumber': instance.phoneNumber,
      'roles': instance.roles,
      'id': instance.id,
      'avatar': instance.avatar,
      'status': instance.status,
      'type': userTypeEnumToJson(instance.type),
      'objectId': instance.objectId,
      'provinceId': instance.provinceId,
      'birthDay': instance.birthDay?.toIso8601String(),
      'gender': instance.gender,
      'identifierCode': instance.identifierCode,
      'isTemp': instance.isTemp,
      'classId': instance.classId,
      'className': instance.className,
      'ethnic': instance.ethnic,
      'rowIndex': instance.rowIndex,
      'address': instance.address,
    };

UserEntity _$UserEntityFromJson(Map<String, dynamic> json) => UserEntity(
      id: (json['id'] as num?)?.toInt(),
      userName: json['userName'] as String?,
      normalizedUserName: json['normalizedUserName'] as String?,
      email: json['email'] as String?,
      normalizedEmail: json['normalizedEmail'] as String?,
      emailConfirmed: json['emailConfirmed'] as bool?,
      passwordHash: json['passwordHash'] as String?,
      securityStamp: json['securityStamp'] as String?,
      concurrencyStamp: json['concurrencyStamp'] as String?,
      phoneNumber: json['phoneNumber'] as String?,
      phoneNumberConfirmed: json['phoneNumberConfirmed'] as bool?,
      twoFactorEnabled: json['twoFactorEnabled'] as bool?,
      lockoutEnd: json['lockoutEnd'] == null
          ? null
          : DateTime.parse(json['lockoutEnd'] as String),
      lockoutEnabled: json['lockoutEnabled'] as bool?,
      accessFailedCount: (json['accessFailedCount'] as num?)?.toInt(),
      claims: (json['claims'] as List<dynamic>?)
              ?.map((e) => UserClaimEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      refreshTokens: (json['refreshTokens'] as List<dynamic>?)
              ?.map(
                  (e) => RefreshTokenEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      avatar: json['avatar'] as String?,
      fullName: json['fullName'] as String?,
      fullNameNonAccent: json['fullNameNonAccent'] as String?,
      lastLoginDate: json['lastLoginDate'] == null
          ? null
          : DateTime.parse(json['lastLoginDate'] as String),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      type: userTypeEnumFromJson((json['type'] as num?)?.toInt()),
      objectId: (json['objectId'] as num?)?.toInt(),
      provinceId: (json['provinceId'] as num?)?.toInt(),
      isOnline: json['isOnline'] as bool?,
      studentCode: json['studentCode'] as String?,
      birthDay: json['birthDay'] == null
          ? null
          : DateTime.parse(json['birthDay'] as String),
      gender: (json['gender'] as num?)?.toInt(),
      identifierCode: json['identifierCode'] as String?,
      address: json['address'] as String?,
      ethnic: json['ethnic'] as String?,
    );

Map<String, dynamic> _$UserEntityToJson(UserEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'userName': instance.userName,
      'normalizedUserName': instance.normalizedUserName,
      'email': instance.email,
      'normalizedEmail': instance.normalizedEmail,
      'emailConfirmed': instance.emailConfirmed,
      'passwordHash': instance.passwordHash,
      'securityStamp': instance.securityStamp,
      'concurrencyStamp': instance.concurrencyStamp,
      'phoneNumber': instance.phoneNumber,
      'phoneNumberConfirmed': instance.phoneNumberConfirmed,
      'twoFactorEnabled': instance.twoFactorEnabled,
      'lockoutEnd': instance.lockoutEnd?.toIso8601String(),
      'lockoutEnabled': instance.lockoutEnabled,
      'accessFailedCount': instance.accessFailedCount,
      'claims': instance.claims?.map((e) => e.toJson()).toList(),
      'refreshTokens': instance.refreshTokens?.map((e) => e.toJson()).toList(),
      'avatar': instance.avatar,
      'fullName': instance.fullName,
      'fullNameNonAccent': instance.fullNameNonAccent,
      'lastLoginDate': instance.lastLoginDate?.toIso8601String(),
      'createdDate': instance.createdDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'type': userTypeEnumToJson(instance.type),
      'objectId': instance.objectId,
      'provinceId': instance.provinceId,
      'isOnline': instance.isOnline,
      'studentCode': instance.studentCode,
      'birthDay': instance.birthDay?.toIso8601String(),
      'gender': instance.gender,
      'identifierCode': instance.identifierCode,
      'address': instance.address,
      'ethnic': instance.ethnic,
    };

UserExamResultDetailWithMessageDto _$UserExamResultDetailWithMessageDtoFromJson(
        Map<String, dynamic> json) =>
    UserExamResultDetailWithMessageDto(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      examId: (json['examId'] as num?)?.toInt(),
      assignExamId: (json['assignExamId'] as num?)?.toInt(),
      userId: (json['userId'] as num?)?.toInt(),
      mark: (json['mark'] as num?)?.toDouble(),
      duration: (json['duration'] as num?)?.toInt(),
      correctAnswerCount: (json['correctAnswerCount'] as num?)?.toInt(),
      correctQuestions: json['correctQuestions'] as String?,
      fromType: (json['fromType'] as num?)?.toInt(),
      comment: json['comment'] as String?,
      status: userExamResultStatusFromJson((json['status'] as num?)?.toInt()),
      userAnswer: (json['userAnswer'] as List<dynamic>?)
              ?.map((e) => UserAnswerDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      examInfo: json['examInfo'] == null
          ? null
          : ExamLearnDto.fromJson(json['examInfo'] as Map<String, dynamic>),
      userInfo: json['userInfo'] == null
          ? null
          : UserWithSimpleInfoDto.fromJson(
              json['userInfo'] as Map<String, dynamic>),
      message: json['message'] as String?,
      teacherNote: json['teacherNote'] as String?,
      isAssigner: json['isAssigner'] as bool?,
      canMarkScore: json['canMarkScore'] as bool?,
    );

Map<String, dynamic> _$UserExamResultDetailWithMessageDtoToJson(
        UserExamResultDetailWithMessageDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'examId': instance.examId,
      'assignExamId': instance.assignExamId,
      'userId': instance.userId,
      'mark': instance.mark,
      'duration': instance.duration,
      'correctAnswerCount': instance.correctAnswerCount,
      'correctQuestions': instance.correctQuestions,
      'fromType': instance.fromType,
      'comment': instance.comment,
      'status': userExamResultStatusToJson(instance.status),
      'userAnswer': instance.userAnswer?.map((e) => e.toJson()).toList(),
      'examInfo': instance.examInfo?.toJson(),
      'userInfo': instance.userInfo?.toJson(),
      'message': instance.message,
      'teacherNote': instance.teacherNote,
      'isAssigner': instance.isAssigner,
      'canMarkScore': instance.canMarkScore,
    };

UserExamResultDto _$UserExamResultDtoFromJson(Map<String, dynamic> json) =>
    UserExamResultDto(
      startTime: json['startTime'] == null
          ? null
          : DateTime.parse(json['startTime'] as String),
      duration: (json['duration'] as num?)?.toInt(),
      examId: (json['examId'] as num?)?.toInt(),
      assignExamId: (json['assignExamId'] as num?)?.toInt(),
      userAnswer: (json['userAnswer'] as List<dynamic>?)
              ?.map((e) => UserAnswerDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
      fromType: (json['fromType'] as num?)?.toInt(),
    );

Map<String, dynamic> _$UserExamResultDtoToJson(UserExamResultDto instance) =>
    <String, dynamic>{
      'startTime': instance.startTime?.toIso8601String(),
      'duration': instance.duration,
      'examId': instance.examId,
      'assignExamId': instance.assignExamId,
      'userAnswer': instance.userAnswer?.map((e) => e.toJson()).toList(),
      'fromType': instance.fromType,
    };

UserExamResultEntity _$UserExamResultEntityFromJson(
        Map<String, dynamic> json) =>
    UserExamResultEntity(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      examId: (json['examId'] as num?)?.toInt(),
      assignExamId: (json['assignExamId'] as num?)?.toInt(),
      userId: (json['userId'] as num?)?.toInt(),
      mark: (json['mark'] as num?)?.toDouble(),
      duration: (json['duration'] as num?)?.toInt(),
      correctAnswerCount: (json['correctAnswerCount'] as num?)?.toInt(),
      correctQuestions: json['correctQuestions'] as String?,
      fromType: (json['fromType'] as num?)?.toInt(),
      comment: json['comment'] as String?,
      status: userExamResultStatusFromJson((json['status'] as num?)?.toInt()),
      userAnswer: (json['userAnswer'] as List<dynamic>?)
              ?.map((e) => UserAnswerEntity.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$UserExamResultEntityToJson(
        UserExamResultEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'examId': instance.examId,
      'assignExamId': instance.assignExamId,
      'userId': instance.userId,
      'mark': instance.mark,
      'duration': instance.duration,
      'correctAnswerCount': instance.correctAnswerCount,
      'correctQuestions': instance.correctQuestions,
      'fromType': instance.fromType,
      'comment': instance.comment,
      'status': userExamResultStatusToJson(instance.status),
      'userAnswer': instance.userAnswer?.map((e) => e.toJson()).toList(),
    };

UserExamResultEntityApiResponse _$UserExamResultEntityApiResponseFromJson(
        Map<String, dynamic> json) =>
    UserExamResultEntityApiResponse(
      data: json['data'] == null
          ? null
          : UserExamResultEntity.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$UserExamResultEntityApiResponseToJson(
        UserExamResultEntityApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

UserGetListQuery _$UserGetListQueryFromJson(Map<String, dynamic> json) =>
    UserGetListQuery(
      sortExpression: json['sortExpression'] as String?,
      pageSize: (json['pageSize'] as num?)?.toInt(),
      pageIndex: (json['pageIndex'] as num?)?.toInt(),
      skip: (json['skip'] as num?)?.toInt(),
      notSkip: (json['notSkip'] as num?)?.toInt(),
      propertyIncludes: (json['propertyIncludes'] as List<dynamic>?)
              ?.map((e) => e as String)
              .toList() ??
          [],
      status: (json['status'] as num?)?.toInt(),
      keyword: json['keyword'] as String?,
      roleIds: (json['roleIds'] as List<dynamic>?)
              ?.map((e) => (e as num).toInt())
              .toList() ??
          [],
      type: userTypeEnumFromJson((json['type'] as num?)?.toInt()),
      objectId: (json['objectId'] as num?)?.toInt(),
    );

Map<String, dynamic> _$UserGetListQueryToJson(UserGetListQuery instance) =>
    <String, dynamic>{
      'sortExpression': instance.sortExpression,
      'pageSize': instance.pageSize,
      'pageIndex': instance.pageIndex,
      'skip': instance.skip,
      'notSkip': instance.notSkip,
      'propertyIncludes': instance.propertyIncludes,
      'status': instance.status,
      'keyword': instance.keyword,
      'roleIds': instance.roleIds,
      'type': userTypeEnumToJson(instance.type),
      'objectId': instance.objectId,
    };

UserInfoDto _$UserInfoDtoFromJson(Map<String, dynamic> json) => UserInfoDto(
      id: (json['id'] as num?)?.toInt(),
      userName: json['userName'] as String?,
      email: json['email'] as String?,
      phoneNumber: json['phoneNumber'] as String?,
      fullName: json['fullName'] as String?,
      avatar: json['avatar'] as String?,
      lastLoginDate: json['lastLoginDate'] as String?,
      type: userTypeEnumFromJson((json['type'] as num?)?.toInt()),
      objectId: (json['objectId'] as num?)?.toInt(),
    );

Map<String, dynamic> _$UserInfoDtoToJson(UserInfoDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'userName': instance.userName,
      'email': instance.email,
      'phoneNumber': instance.phoneNumber,
      'fullName': instance.fullName,
      'avatar': instance.avatar,
      'lastLoginDate': instance.lastLoginDate,
      'type': userTypeEnumToJson(instance.type),
      'objectId': instance.objectId,
    };

UserInfoDtoApiResponse _$UserInfoDtoApiResponseFromJson(
        Map<String, dynamic> json) =>
    UserInfoDtoApiResponse(
      data: json['data'] == null
          ? null
          : UserInfoDto.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$UserInfoDtoApiResponseToJson(
        UserInfoDtoApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

UserListDto _$UserListDtoFromJson(Map<String, dynamic> json) => UserListDto(
      id: (json['id'] as num?)?.toInt(),
      userName: json['userName'] as String?,
      avatar: json['avatar'] as String?,
      fullName: json['fullName'] as String?,
      email: json['email'] as String?,
      phoneNumber: json['phoneNumber'] as String?,
      status: (json['status'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      roles: json['roles'] as String?,
      type: userTypeEnumFromJson((json['type'] as num?)?.toInt()),
      objectId: (json['objectId'] as num?)?.toInt(),
      objectName: json['objectName'] as String?,
    );

Map<String, dynamic> _$UserListDtoToJson(UserListDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'userName': instance.userName,
      'avatar': instance.avatar,
      'fullName': instance.fullName,
      'email': instance.email,
      'phoneNumber': instance.phoneNumber,
      'status': instance.status,
      'createdDate': instance.createdDate?.toIso8601String(),
      'roles': instance.roles,
      'type': userTypeEnumToJson(instance.type),
      'objectId': instance.objectId,
      'objectName': instance.objectName,
    };

UserListDtoFilterResult _$UserListDtoFilterResultFromJson(
        Map<String, dynamic> json) =>
    UserListDtoFilterResult(
      totalRows: (json['totalRows'] as num?)?.toInt(),
      data: (json['data'] as List<dynamic>?)
              ?.map((e) => UserListDto.fromJson(e as Map<String, dynamic>))
              .toList() ??
          [],
    );

Map<String, dynamic> _$UserListDtoFilterResultToJson(
        UserListDtoFilterResult instance) =>
    <String, dynamic>{
      'totalRows': instance.totalRows,
      'data': instance.data?.map((e) => e.toJson()).toList(),
    };

UserListDtoFilterResultApiResponse _$UserListDtoFilterResultApiResponseFromJson(
        Map<String, dynamic> json) =>
    UserListDtoFilterResultApiResponse(
      data: json['data'] == null
          ? null
          : UserListDtoFilterResult.fromJson(
              json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$UserListDtoFilterResultApiResponseToJson(
        UserListDtoFilterResultApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

UserMobileTokenEntity _$UserMobileTokenEntityFromJson(
        Map<String, dynamic> json) =>
    UserMobileTokenEntity(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      userId: (json['userId'] as num?)?.toInt(),
      deviceToken: json['deviceToken'] as String?,
      os: json['os'] as String?,
      appId: (json['appId'] as num?)?.toInt(),
    );

Map<String, dynamic> _$UserMobileTokenEntityToJson(
        UserMobileTokenEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'userId': instance.userId,
      'deviceToken': instance.deviceToken,
      'os': instance.os,
      'appId': instance.appId,
    };

UserMobileTokenEntityApiResponse _$UserMobileTokenEntityApiResponseFromJson(
        Map<String, dynamic> json) =>
    UserMobileTokenEntityApiResponse(
      data: json['data'] == null
          ? null
          : UserMobileTokenEntity.fromJson(
              json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$UserMobileTokenEntityApiResponseToJson(
        UserMobileTokenEntityApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

UserMobileTokenUpdateCommand _$UserMobileTokenUpdateCommandFromJson(
        Map<String, dynamic> json) =>
    UserMobileTokenUpdateCommand(
      token: json['token'] == null
          ? null
          : UserMobileTokenEntity.fromJson(
              json['token'] as Map<String, dynamic>),
    );

Map<String, dynamic> _$UserMobileTokenUpdateCommandToJson(
        UserMobileTokenUpdateCommand instance) =>
    <String, dynamic>{
      'token': instance.token?.toJson(),
    };

UserWebTokenDeleteCommand _$UserWebTokenDeleteCommandFromJson(
        Map<String, dynamic> json) =>
    UserWebTokenDeleteCommand(
      id: (json['id'] as num?)?.toInt(),
    );

Map<String, dynamic> _$UserWebTokenDeleteCommandToJson(
        UserWebTokenDeleteCommand instance) =>
    <String, dynamic>{
      'id': instance.id,
    };

UserWebTokenEntity _$UserWebTokenEntityFromJson(Map<String, dynamic> json) =>
    UserWebTokenEntity(
      id: (json['id'] as num?)?.toInt(),
      createdBy: (json['createdBy'] as num?)?.toInt(),
      createdDate: json['createdDate'] == null
          ? null
          : DateTime.parse(json['createdDate'] as String),
      lastModifiedBy: (json['lastModifiedBy'] as num?)?.toInt(),
      lastModifiedDate: json['lastModifiedDate'] == null
          ? null
          : DateTime.parse(json['lastModifiedDate'] as String),
      isDeleted: json['isDeleted'] as bool?,
      userId: (json['userId'] as num?)?.toInt(),
      pushEndPoint: json['pushEndPoint'] as String?,
      pushP256DH: json['pushP256DH'] as String?,
      pushAuth: json['pushAuth'] as String?,
      appId: (json['appId'] as num?)?.toInt(),
    );

Map<String, dynamic> _$UserWebTokenEntityToJson(UserWebTokenEntity instance) =>
    <String, dynamic>{
      'id': instance.id,
      'createdBy': instance.createdBy,
      'createdDate': instance.createdDate?.toIso8601String(),
      'lastModifiedBy': instance.lastModifiedBy,
      'lastModifiedDate': instance.lastModifiedDate?.toIso8601String(),
      'isDeleted': instance.isDeleted,
      'userId': instance.userId,
      'pushEndPoint': instance.pushEndPoint,
      'pushP256DH': instance.pushP256DH,
      'pushAuth': instance.pushAuth,
      'appId': instance.appId,
    };

UserWebTokenEntityApiResponse _$UserWebTokenEntityApiResponseFromJson(
        Map<String, dynamic> json) =>
    UserWebTokenEntityApiResponse(
      data: json['data'] == null
          ? null
          : UserWebTokenEntity.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$UserWebTokenEntityApiResponseToJson(
        UserWebTokenEntityApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

UserWebTokenUpdateCommand _$UserWebTokenUpdateCommandFromJson(
        Map<String, dynamic> json) =>
    UserWebTokenUpdateCommand(
      token: json['token'] == null
          ? null
          : UserWebTokenEntity.fromJson(json['token'] as Map<String, dynamic>),
    );

Map<String, dynamic> _$UserWebTokenUpdateCommandToJson(
        UserWebTokenUpdateCommand instance) =>
    <String, dynamic>{
      'token': instance.token?.toJson(),
    };

UserWithSimpleInfoDto _$UserWithSimpleInfoDtoFromJson(
        Map<String, dynamic> json) =>
    UserWithSimpleInfoDto(
      id: (json['id'] as num?)?.toInt(),
      userName: json['userName'] as String?,
      avatar: json['avatar'] as String?,
      fullName: json['fullName'] as String?,
      type: userTypeEnumFromJson((json['type'] as num?)?.toInt()),
      isOnline: json['isOnline'] as bool?,
    );

Map<String, dynamic> _$UserWithSimpleInfoDtoToJson(
        UserWithSimpleInfoDto instance) =>
    <String, dynamic>{
      'id': instance.id,
      'userName': instance.userName,
      'avatar': instance.avatar,
      'fullName': instance.fullName,
      'type': userTypeEnumToJson(instance.type),
      'isOnline': instance.isOnline,
    };

UserWithSimpleInfoDtoListApiResponse
    _$UserWithSimpleInfoDtoListApiResponseFromJson(Map<String, dynamic> json) =>
        UserWithSimpleInfoDtoListApiResponse(
          data: (json['data'] as List<dynamic>?)
                  ?.map((e) =>
                      UserWithSimpleInfoDto.fromJson(e as Map<String, dynamic>))
                  .toList() ??
              [],
          message: json['message'] as String?,
          success: json['success'] as bool?,
          code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
        );

Map<String, dynamic> _$UserWithSimpleInfoDtoListApiResponseToJson(
        UserWithSimpleInfoDtoListApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.map((e) => e.toJson()).toList(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

VapidDetails _$VapidDetailsFromJson(Map<String, dynamic> json) => VapidDetails(
      subject: json['subject'] as String?,
      publicKey: json['publicKey'] as String?,
      privateKey: json['privateKey'] as String?,
      expiration: (json['expiration'] as num?)?.toInt(),
    );

Map<String, dynamic> _$VapidDetailsToJson(VapidDetails instance) =>
    <String, dynamic>{
      'subject': instance.subject,
      'publicKey': instance.publicKey,
      'privateKey': instance.privateKey,
      'expiration': instance.expiration,
    };

VapidDetailsApiResponse _$VapidDetailsApiResponseFromJson(
        Map<String, dynamic> json) =>
    VapidDetailsApiResponse(
      data: json['data'] == null
          ? null
          : VapidDetails.fromJson(json['data'] as Map<String, dynamic>),
      message: json['message'] as String?,
      success: json['success'] as bool?,
      code: errorCodeEnumFromJson((json['code'] as num?)?.toInt()),
    );

Map<String, dynamic> _$VapidDetailsApiResponseToJson(
        VapidDetailsApiResponse instance) =>
    <String, dynamic>{
      'data': instance.data?.toJson(),
      'message': instance.message,
      'success': instance.success,
      'code': errorCodeEnumToJson(instance.code),
    };

WeatherForecast _$WeatherForecastFromJson(Map<String, dynamic> json) =>
    WeatherForecast(
      date:
          json['date'] == null ? null : DateTime.parse(json['date'] as String),
      temperatureC: (json['temperatureC'] as num?)?.toInt(),
      temperatureF: (json['temperatureF'] as num?)?.toInt(),
      summary: json['summary'] as String?,
    );

Map<String, dynamic> _$WeatherForecastToJson(WeatherForecast instance) =>
    <String, dynamic>{
      'date': instance.date?.toIso8601String(),
      'temperatureC': instance.temperatureC,
      'temperatureF': instance.temperatureF,
      'summary': instance.summary,
    };

AiPromptByCodeCodeRequest _$AiPromptByCodeCodeRequestFromJson(
        Map<String, dynamic> json) =>
    AiPromptByCodeCodeRequest(
      code: json['code'] as String?,
      grade: (json['grade'] as num?)?.toInt(),
      categoryId: (json['categoryId'] as num?)?.toInt(),
    );

Map<String, dynamic> _$AiPromptByCodeCodeRequestToJson(
        AiPromptByCodeCodeRequest instance) =>
    <String, dynamic>{
      'code': instance.code,
      'grade': instance.grade,
      'categoryId': instance.categoryId,
    };

ChatListChatGroupOfUserRequest _$ChatListChatGroupOfUserRequestFromJson(
        Map<String, dynamic> json) =>
    ChatListChatGroupOfUserRequest(
      keyword: json['keyword'] as String?,
      pageIndex: (json['pageIndex'] as num?)?.toInt(),
      pageSize: (json['pageSize'] as num?)?.toInt(),
    );

Map<String, dynamic> _$ChatListChatGroupOfUserRequestToJson(
        ChatListChatGroupOfUserRequest instance) =>
    <String, dynamic>{
      'keyword': instance.keyword,
      'pageIndex': instance.pageIndex,
      'pageSize': instance.pageSize,
    };

ChatGetListMessageByGroupidRequest _$ChatGetListMessageByGroupidRequestFromJson(
        Map<String, dynamic> json) =>
    ChatGetListMessageByGroupidRequest(
      chatGroupId: (json['chatGroupId'] as num?)?.toInt(),
      skipSize: (json['skipSize'] as num?)?.toInt(),
      pageSize: (json['pageSize'] as num?)?.toInt(),
    );

Map<String, dynamic> _$ChatGetListMessageByGroupidRequestToJson(
        ChatGetListMessageByGroupidRequest instance) =>
    <String, dynamic>{
      'chatGroupId': instance.chatGroupId,
      'skipSize': instance.skipSize,
      'pageSize': instance.pageSize,
    };

PupilPupilStaticRequest _$PupilPupilStaticRequestFromJson(
        Map<String, dynamic> json) =>
    PupilPupilStaticRequest(
      classId: (json['classId'] as num?)?.toInt(),
      userId: (json['userId'] as num?)?.toInt(),
      subjectId: (json['subjectId'] as num?)?.toInt(),
    );

Map<String, dynamic> _$PupilPupilStaticRequestToJson(
        PupilPupilStaticRequest instance) =>
    <String, dynamic>{
      'classId': instance.classId,
      'userId': instance.userId,
      'subjectId': instance.subjectId,
    };

PupilPupilStaticByTypeExamRequest _$PupilPupilStaticByTypeExamRequestFromJson(
        Map<String, dynamic> json) =>
    PupilPupilStaticByTypeExamRequest(
      classId: (json['classId'] as num?)?.toInt(),
      userId: (json['userId'] as num?)?.toInt(),
      subjectId: (json['subjectId'] as num?)?.toInt(),
    );

Map<String, dynamic> _$PupilPupilStaticByTypeExamRequestToJson(
        PupilPupilStaticByTypeExamRequest instance) =>
    <String, dynamic>{
      'classId': instance.classId,
      'userId': instance.userId,
      'subjectId': instance.subjectId,
    };

TeacherStaticByTypeExamRequest _$TeacherStaticByTypeExamRequestFromJson(
        Map<String, dynamic> json) =>
    TeacherStaticByTypeExamRequest(
      classId: (json['classId'] as num?)?.toInt(),
      userId: (json['userId'] as num?)?.toInt(),
      subjectId: (json['subjectId'] as num?)?.toInt(),
    );

Map<String, dynamic> _$TeacherStaticByTypeExamRequestToJson(
        TeacherStaticByTypeExamRequest instance) =>
    <String, dynamic>{
      'classId': instance.classId,
      'userId': instance.userId,
      'subjectId': instance.subjectId,
    };

UserExamResultChangeMarkRequest _$UserExamResultChangeMarkRequestFromJson(
        Map<String, dynamic> json) =>
    UserExamResultChangeMarkRequest(
      userExamResultId: (json['userExamResultId'] as num?)?.toInt(),
      comment: json['comment'] as String?,
    );

Map<String, dynamic> _$UserExamResultChangeMarkRequestToJson(
        UserExamResultChangeMarkRequest instance) =>
    <String, dynamic>{
      'userExamResultId': instance.userExamResultId,
      'comment': instance.comment,
    };
