pro info
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:professional_repository/professional_repository.dart';
|
||||
import 'package:professional_repository/src/models/location_preferences.dart';
|
||||
|
||||
class ProfessionalEntity extends Equatable {
|
||||
final String id;
|
||||
final String identification;
|
||||
final String address;
|
||||
final String aditionalAddress;
|
||||
final String profession;
|
||||
final String rate;
|
||||
final String location;
|
||||
final LocationPreferences locationPreferences;
|
||||
final String bannerPicture;
|
||||
final String identificationPicture;
|
||||
final String certificatePicture;
|
||||
final String latitude;
|
||||
@@ -21,9 +24,11 @@ class ProfessionalEntity extends Equatable {
|
||||
required this.id,
|
||||
required this.identification,
|
||||
required this.address,
|
||||
required this.aditionalAddress,
|
||||
required this.profession,
|
||||
required this.rate,
|
||||
required this.location,
|
||||
required this.locationPreferences,
|
||||
required this.bannerPicture,
|
||||
required this.identificationPicture,
|
||||
required this.certificatePicture,
|
||||
required this.latitude,
|
||||
@@ -39,9 +44,11 @@ class ProfessionalEntity extends Equatable {
|
||||
id: doc['id'] as String,
|
||||
identification: doc['identification'] as String,
|
||||
address: doc['address'] as String,
|
||||
aditionalAddress: doc['aditional_address'] as String,
|
||||
profession: doc['profession'] as String,
|
||||
rate: doc['rate'] as String,
|
||||
location: doc['location'] as String,
|
||||
locationPreferences: intToEnum(doc['location_preferences'] as int),
|
||||
bannerPicture: doc['banner_picture'] as String,
|
||||
identificationPicture: doc['identification_picture'] as String,
|
||||
certificatePicture: doc['certificate_picture'] as String,
|
||||
latitude: doc['latitude'] as String,
|
||||
@@ -54,14 +61,16 @@ class ProfessionalEntity extends Equatable {
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
Map<String, dynamic> toDocument() {
|
||||
return {
|
||||
'id': id,
|
||||
'identification': identification,
|
||||
'address': address,
|
||||
'aditional_address': aditionalAddress,
|
||||
'profession': profession,
|
||||
'rate': rate,
|
||||
'location': location,
|
||||
'location_preferences': enumToInt(locationPreferences),
|
||||
'banner_picture': bannerPicture,
|
||||
'identification_picture': identificationPicture,
|
||||
'certificate_picture': certificatePicture,
|
||||
'latitude': latitude,
|
||||
@@ -78,9 +87,11 @@ class ProfessionalEntity extends Equatable {
|
||||
id,
|
||||
identification,
|
||||
address,
|
||||
aditionalAddress,
|
||||
profession,
|
||||
rate,
|
||||
location,
|
||||
locationPreferences,
|
||||
bannerPicture,
|
||||
identificationPicture,
|
||||
certificatePicture,
|
||||
latitude,
|
||||
@@ -97,9 +108,11 @@ class ProfessionalEntity extends Equatable {
|
||||
id: $id,
|
||||
identification: $identification,
|
||||
address: $address,
|
||||
aditional_address: $aditionalAddress,
|
||||
profession: $profession,
|
||||
rate: $rate,
|
||||
location: $location,
|
||||
location_preferences: $locationPreferences,
|
||||
bannerPicture: $bannerPicture,
|
||||
identificationPicture: $identificationPicture,
|
||||
certificatePicture: $certificatePicture,
|
||||
latitude: $latitude,
|
||||
|
||||
Reference in New Issue
Block a user