Skip to content

User & Profile Models

User (api_models.dart)

Source: pharmanet/lib/core/models/api_models.dart

Field Type Description
id String UUID
mobile String Phone number
fullname String? Display name
role String? customer, seller, admin
email String? Email address
accountStatus bool? Active/inactive
createdAt DateTime? Account creation date

Profile (profile_model.dart) — @freezed

Source: pharmanet/lib/core/models/profile_model.dart

Field Type Description
id String UUID from auth.users
email String Email address
firstName String? Given name
lastName String? Family name
phone String? Phone number
role String Default: customer
profilePictureUrl String? Avatar URL
fcmToken String? Firebase push token
isActive bool Default: true
latitude double? GPS latitude
longitude double? GPS longitude
biometricEnabled bool Biometric auth toggle
twoFactorEnabled bool 2FA toggle
smsVerificationEnabled bool Default: true
emailVerificationEnabled bool Default: true
hideOrderHistory bool Privacy toggle
dataSharingEnabled bool Analytics opt-out
locationServicesEnabled bool Location toggle
appLockPin String? Hashed PIN
appLockEnabled bool PIN lock toggle
appLockSetAt DateTime? When PIN was set
pharmacy Seller? Related pharmacy profile

Seller (profile_model.dart) — @freezed

Field Type Description
id String UUID
userId String FK to profiles
storeName String Pharmacy name
storeSlug String URL-friendly name
storeLogo String? Logo image URL
storeBanner String? Banner image URL
storeDescription String? About the pharmacy
businessRegistration String? Reg number
businessLicenseUrl String? License document
pharmacistName String? Licensed pharmacist
pharmacistLicenseNumber String? License ID
approvalStatus String pending, approved, rejected
isFeatured bool Featured pharmacy flag
rating double Average rating
totalRevenue double Cumulative revenue
totalOrders int Order count
latitude / longitude double? Store location
operatingHours Map? Store hours
bankName / bankAccount* String? Payout info

SecuritySettings (security_settings_model.dart) — @freezed

Source: pharmanet/lib/core/models/security_settings_model.dart

Field Type Description
biometricEnabled bool Fingerprint/Face ID
twoFactorEnabled bool 2FA
smsVerificationEnabled bool SMS verify
emailVerificationEnabled bool Email verify
hideOrderHistory bool Privacy
dataSharingEnabled bool Analytics
locationServicesEnabled bool Location
appLockPin String? PIN hash
appLockEnabled bool Lock toggle
isActive bool Account active