import 'package:domain/generated/json/base/json_convert_content.dart'; import 'package:domain/entity/notice_board_event_entity.dart'; NoticeBoardEventEntity $NoticeBoardEventEntityFromJson( Map json) { final NoticeBoardEventEntity noticeBoardEventEntity = NoticeBoardEventEntity(); final int? count = jsonConvert.convert(json['count']); if (count != null) { noticeBoardEventEntity.count = count; } final int? page = jsonConvert.convert(json['page']); if (page != null) { noticeBoardEventEntity.page = page; } final int? limit = jsonConvert.convert(json['limit']); if (limit != null) { noticeBoardEventEntity.limit = limit; } final int? countPage = jsonConvert.convert(json['count_page']); if (countPage != null) { noticeBoardEventEntity.countPage = countPage; } final List? list = (json['list'] as List?) ?.map( (e) => jsonConvert.convert(e) as NoticeBoardEventList) .toList(); if (list != null) { noticeBoardEventEntity.list = list; } return noticeBoardEventEntity; } Map $NoticeBoardEventEntityToJson( NoticeBoardEventEntity entity) { final Map data = {}; data['count'] = entity.count; data['page'] = entity.page; data['limit'] = entity.limit; data['count_page'] = entity.countPage; data['list'] = entity.list.map((v) => v.toJson()).toList(); return data; } extension NoticeBoardEventEntityExtension on NoticeBoardEventEntity { NoticeBoardEventEntity copyWith({ int? count, int? page, int? limit, int? countPage, List? list, }) { return NoticeBoardEventEntity() ..count = count ?? this.count ..page = page ?? this.page ..limit = limit ?? this.limit ..countPage = countPage ?? this.countPage ..list = list ?? this.list; } } NoticeBoardEventList $NoticeBoardEventListFromJson(Map json) { final NoticeBoardEventList noticeBoardEventList = NoticeBoardEventList(); final int? id = jsonConvert.convert(json['id']); if (id != null) { noticeBoardEventList.id = id; } final String? title = jsonConvert.convert(json['title']); if (title != null) { noticeBoardEventList.title = title; } final String? datetime = jsonConvert.convert(json['datetime']); if (datetime != null) { noticeBoardEventList.datetime = datetime; } final String? createdAt = jsonConvert.convert(json['created_at']); if (createdAt != null) { noticeBoardEventList.createdAt = createdAt; } return noticeBoardEventList; } Map $NoticeBoardEventListToJson(NoticeBoardEventList entity) { final Map data = {}; data['id'] = entity.id; data['title'] = entity.title; data['datetime'] = entity.datetime; data['created_at'] = entity.createdAt; return data; } extension NoticeBoardEventListExtension on NoticeBoardEventList { NoticeBoardEventList copyWith({ int? id, String? title, String? datetime, String? createdAt, }) { return NoticeBoardEventList() ..id = id ?? this.id ..title = title ?? this.title ..datetime = datetime ?? this.datetime ..createdAt = createdAt ?? this.createdAt; } }