Files
Kifi/kifi-app/lib/features/business/domain/business_profile.dart
2026-08-16 22:51:34 +05:30

62 lines
1.5 KiB
Dart

class BusinessProfile {
final int? id;
final int? userId;
final String businessName;
final String? industry;
final String? taxNumber;
final String? currency;
final bool? taxIncludedInPrice;
BusinessProfile({
this.id,
this.userId,
required this.businessName,
this.industry,
this.taxNumber,
this.currency,
this.taxIncludedInPrice,
});
factory BusinessProfile.fromJson(Map<String, dynamic> json) {
return BusinessProfile(
id: json['id'],
userId: json['userId'],
businessName: json['businessName'],
industry: json['industry'],
taxNumber: json['taxNumber'],
currency: json['currency'],
taxIncludedInPrice: json['taxIncludedInPrice'],
);
}
Map<String, dynamic> toJson() {
return {
'id': id,
'userId': userId,
'businessName': businessName,
'industry': industry,
'taxNumber': taxNumber,
'currency': currency,
'taxIncludedInPrice': taxIncludedInPrice,
};
}
BusinessProfile copyWith({
String? businessName,
String? industry,
String? taxNumber,
String? currency,
bool? taxIncludedInPrice,
}) {
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,
);
}
}