// To parse this JSON data, do
//
//     final userProfile = userProfileFromJson(jsondynamic);

import 'dart:convert';

UserProfile userProfileFromJson(dynamic str) =>
    UserProfile.fromJson(json.decode(str));

dynamic userProfileToJson(UserProfile data) => json.encode(data.toJson());

class UserProfile {
  dynamic id;
  dynamic email;
  dynamic firstName;
  dynamic lastName;
  dynamic name;
  dynamic img;
  dynamic authType;
  dynamic role;
  dynamic phone;
  dynamic password;
  bool? isActive;
  bool? isPhoneVerified;
  dynamic vendorType;
  dynamic businessId;
  bool? isVendorAccountCreated;
  bool? isVendorAccountActive;
  bool? vendorTermsAccepted;
  DateTime? createdAt;
  DateTime? updatedAt;
  dynamic rtHash;
  dynamic resetToken;
  dynamic resetTokenExpiresAt;

  UserProfile({
    this.id,
    this.email,
    this.firstName,
    this.lastName,
    this.name,
    this.img,
    this.authType,
    this.role,
    this.phone,
    this.password,
    this.isActive,
    this.isPhoneVerified,
    this.vendorType,
    this.businessId,
    this.isVendorAccountCreated,
    this.isVendorAccountActive,
    this.vendorTermsAccepted,
    this.createdAt,
    this.updatedAt,
    this.rtHash,
    this.resetToken,
    this.resetTokenExpiresAt,
  });

  factory UserProfile.fromJson(Map<dynamic, dynamic> json) => UserProfile(
        id: json["id"],
        email: json["email"],
        firstName: json["firstName"],
        lastName: json["lastName"],
        name: json["name"],
        img: json["img"],
        authType: json["authType"],
        role: json["role"],
        phone: json["phone"],
        password: json["password"],
        isActive: json["isActive"],
        isPhoneVerified: json["isPhoneVerified"],
        vendorType: json["vendorType"],
        businessId: json["businessId"],
        isVendorAccountCreated: json["isVendorAccountCreated"],
        isVendorAccountActive: json["isVendorAccountActive"],
        vendorTermsAccepted: json["vendorTermsAccepted"],
        createdAt: DateTime?.parse(json["createdAt"]),
        updatedAt: DateTime?.parse(json["updatedAt"]),
        rtHash: json["rtHash"],
        resetToken: json["resetToken"],
        resetTokenExpiresAt: json["resetTokenExpiresAt"],
      );

  Map<dynamic, dynamic> toJson() => {
        "id": id,
        "email": email,
        "firstName": firstName,
        "lastName": lastName,
        "name": name,
        "img": img,
        "authType": authType,
        "role": role,
        "phone": phone,
        "password": password,
        "isActive": isActive,
        "isPhoneVerified": isPhoneVerified,
        "vendorType": vendorType,
        "businessId": businessId,
        "isVendorAccountCreated": isVendorAccountCreated,
        "isVendorAccountActive": isVendorAccountActive,
        "vendorTermsAccepted": vendorTermsAccepted,
        "createdAt": createdAt,
        "updatedAt": updatedAt,
        "rtHash": rtHash,
        "resetToken": resetToken,
        "resetTokenExpiresAt": resetTokenExpiresAt,
      };
}
