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<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    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<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['userId'] = userId;
    map['userName'] = userName;
    return map;
  }
}
