class BusinessProfile { final int? id; final int? userId; final String businessName; final String? industry; final String? taxNumber; final String? currency; final bool? taxIncludedInPrice; final String? address; final int? stateId; final String? contactPerson; final String? contactNumber; final String? emailId; final String? panNumber; final String? gstin; final String? natureOfBusiness; final String? msmeNumber; BusinessProfile({ this.id, this.userId, required this.businessName, this.industry, this.taxNumber, this.currency, this.taxIncludedInPrice, this.address, this.stateId, this.contactPerson, this.contactNumber, this.emailId, this.panNumber, this.gstin, this.natureOfBusiness, this.msmeNumber, }); factory BusinessProfile.fromJson(Map json) { return BusinessProfile( id: json['id'], userId: json['userId'], businessName: json['businessName'] ?? '', industry: json['industry'], taxNumber: json['taxNumber'], currency: json['currency'], taxIncludedInPrice: json['taxIncludedInPrice'], address: json['address'], stateId: json['stateId'], contactPerson: json['contactPerson'], contactNumber: json['contactNumber'], emailId: json['emailId'], panNumber: json['panNumber'], gstin: json['gstin'], natureOfBusiness: json['natureOfBusiness'] ?? json['industry'], msmeNumber: json['msmeNumber'], ); } Map toJson() { return { 'id': id, 'userId': userId, 'businessName': businessName, 'industry': industry, 'taxNumber': taxNumber, 'currency': currency, 'taxIncludedInPrice': taxIncludedInPrice, 'address': address, 'stateId': stateId, 'contactPerson': contactPerson, 'contactNumber': contactNumber, 'emailId': emailId, 'panNumber': panNumber, 'gstin': gstin, 'natureOfBusiness': natureOfBusiness, 'msmeNumber': msmeNumber, }; } BusinessProfile copyWith({ String? businessName, String? industry, String? taxNumber, String? currency, bool? taxIncludedInPrice, String? address, int? stateId, String? contactPerson, String? contactNumber, String? emailId, String? panNumber, String? gstin, String? natureOfBusiness, String? msmeNumber, }) { return BusinessProfile( id: id, userId: userId, businessName: businessName ?? this.businessName, industry: industry ?? this.industry, taxNumber: taxNumber ?? this.taxNumber, currency: currency ?? this.currency, taxIncludedInPrice: taxIncludedInPrice ?? this.taxIncludedInPrice, address: address ?? this.address, stateId: stateId ?? this.stateId, contactPerson: contactPerson ?? this.contactPerson, contactNumber: contactNumber ?? this.contactNumber, emailId: emailId ?? this.emailId, panNumber: panNumber ?? this.panNumber, gstin: gstin ?? this.gstin, natureOfBusiness: natureOfBusiness ?? this.natureOfBusiness, msmeNumber: msmeNumber ?? this.msmeNumber, ); } }