class UpdateUserDetailRequestModel {
  // User detail fields
  String? activityID;
  String? dOB;
  String? email;
  String? firstName;
  String? lastName;
  String? firstNameN;
  String? middleName;
  String? middleNameN;
  String? lastNameN;
  String? gender;
  num? height;
  bool? isHeightInCM;
  bool? isWeightInKG;
  String? zipCode;
  num? weight;
  bool? isNotificationOn;
  String? mobileNumber;
  String? identificationNo;

  UpdateUserDetailRequestModel({
    this.activityID,
    this.dOB,
    this.email,
    this.firstName,
    this.lastName,
    this.firstNameN,
    this.middleName,
    this.middleNameN,
    this.lastNameN,
    this.gender,
    this.height,
    this.isHeightInCM,
    this.isWeightInKG,
    this.zipCode,
    this.weight,
    this.isNotificationOn,
    this.mobileNumber,
    this.identificationNo,
  });

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};

    // User detail fields
    if (activityID != null) map['ActivityID'] = activityID;
    if (dOB != null) map['DOB'] = dOB;
    if (email != null) map['Email'] = email;
    if (firstName != null) map['FirstName'] = firstName;
    if (lastName != null) map['LastName'] = lastName;
    if (firstNameN != null) map['FirstNameN'] = firstNameN;
    if (middleName != null) map['MiddleName'] = middleName;
    if (middleNameN != null) map['MiddleNameN'] = middleNameN;
    if (lastNameN != null) map['LastNameN'] = lastNameN;
    if (gender != null) map['Gender'] = gender;
    if (height != null) map['Height'] = height;
    if (isHeightInCM != null) map['IsHeightInCM'] = isHeightInCM;
    if (isWeightInKG != null) map['IsWeightInKG'] = isWeightInKG;
    if (zipCode != null) map['ZipCode'] = zipCode;
    if (weight != null) map['Weight'] = weight;
    if (isNotificationOn != null) map['IsNotificationOn'] = isNotificationOn;
    if (mobileNumber != null) map['MobileNumber'] = mobileNumber;
    if (identificationNo != null) map['IdentificationNo'] = identificationNo;
    return map;
  }

  factory UpdateUserDetailRequestModel.fromJson(Map<String, dynamic> json) => UpdateUserDetailRequestModel(
        activityID: json['ActivityID']?.toString(),
        dOB: json['DOB']?.toString(),
        email: json['Email']?.toString(),
        firstName: json['FirstName']?.toString(),
        lastName: json['LastName']?.toString(),
        firstNameN: json['FirstNameN']?.toString(),
        middleName: json['MiddleName']?.toString(),
        middleNameN: json['MiddleNameN']?.toString(),
        lastNameN: json['LastNameN']?.toString(),
        gender: json['Gender']?.toString(),
        height: json['Height'],
        isHeightInCM: json['IsHeightInCM'] as bool?,
        isWeightInKG: json['IsWeightInKG'] as bool?,
        zipCode: json['ZipCode']?.toString(),
        weight: json['Weight'],
        isNotificationOn: json['IsNotificationOn'] as bool?,
        mobileNumber: json['MobileNumber']?.toString(),
        identificationNo: json['IdentificationNo']?.toString(),
      );
}
