class GasRefillComment { GasRefillComment({ this.id, this.gasRefillId, this.createdOn, this.createdBy, this.comment, }); GasRefillComment.fromJson(dynamic json) { id = json['id']; gasRefillId = json['gasRefillId']; createdOn = json['createdOn']; createdBy = json['createdBy'] != null ? CreatedBy.fromJson(json['createdBy']) : null; comment = json['comment']; } num? id; num? gasRefillId; String? createdOn; CreatedBy? createdBy; String? comment; GasRefillComment copyWith({ num? id, num? callRequestId, String? createdOn, CreatedBy? createdBy, String? comment, }) => GasRefillComment( id: id ?? this.id, gasRefillId: callRequestId ?? gasRefillId, createdOn: createdOn ?? this.createdOn, createdBy: createdBy ?? this.createdBy, comment: comment ?? this.comment, ); Map toJson() { final map = {}; map['id'] = id; map['gasRefillId'] = gasRefillId; map['createdOn'] = createdOn; if (createdBy != null) { map['createdBy'] = createdBy!.toJson(); } map['comment'] = comment; return map; } } class CreatedBy { CreatedBy({ this.userId, this.userName, }); CreatedBy.fromJson(dynamic json) { userId = json['userId']; userName = json['userName']; } String? userId; String? userName; CreatedBy copyWith({String? userId, String? userName}) => CreatedBy( userId: userId ?? this.userId, userName: userName ?? this.userName, ); Map toJson() { final map = {}; map['userId'] = userId; map['userName'] = userName; return map; } }