UserProfile class

Domain entity representing a user's professional profile

This entity contains:

  • Personal/Engineer data (always required)
  • Company data (optional, only when professionalType == company)

Constructors

UserProfile({required String id, required String personalName, required String personalEmail, required String personalPhone, required String personalDni, required String engineerId, List<int>? personalPhotoBytes, required ProfessionalType professionalType, String? companyCif, String? companyName, String? companyAddress, String? companyEmail, String? companyPhone, List<int>? companyLogoBytes})
const

Properties

companyAddress String?
Company physical address
final
companyCif String?
Company CIF (tax identification)
final
companyEmail String?
Company contact email
final
companyLogoBytes List<int>?
Company logo stored as bytes (for PDF generation)
final
companyName String?
Company legal name (razón social)
final
companyPhone String?
Company contact phone
final
engineerId String
Professional engineer ID (colegiado number)
final
hasCompleteCompanyInfo bool
Checks if this profile has complete company information Only relevant when professionalType == company
no setter
hasCompletePersonalInfo bool
Checks if this profile has complete personal information
no setter
hashCode int
The hash code for this object.
no setteroverride
id String
Unique identifier for the profile
final
personalDni String
DNI/NIF (Spanish ID) of the engineer
final
personalEmail String
Personal email address
final
personalName String
Full name of the engineer/professional
final
personalPhone String
Personal phone number
final
personalPhotoBytes List<int>?
Profile photo stored as bytes (nullable)
final
professionalType ProfessionalType
Whether this profile represents a freelancer or a company
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({String? id, String? personalName, String? personalEmail, String? personalPhone, String? personalDni, String? engineerId, List<int>? personalPhotoBytes, ProfessionalType? professionalType, String? companyCif, String? companyName, String? companyAddress, String? companyEmail, String? companyPhone, List<int>? companyLogoBytes}) UserProfile
Creates a copy of this profile with updated fields
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override