BaseEntity

All entities contain these base properties automatically managed by EF Core interceptors:

PropertyTypeDescription
IdGuidPrimary Key
CreatedAtDateTimeCreated UTC timestamp
UpdatedAtDateTime?Last updated UTC timestamp
CreatedByGuid?User ID who created the record
UpdatedByGuid?User ID who last updated the record
IsDeletedboolSoft delete flag

Authentication Entities

Entity FirmUser

PropertyDescription
FirstName, LastNameUser's name
UserName, EmailLogin credentials
PasswordHashPBKDF2 hashed password
IsActiveAccount status
LastLoginAtTimestamp of last login

Entity FirmUserRelation

PropertyDescription
FirmIdLinked firm (tenant)
FirmUserIdLinked user

Entity FirmUserRefreshToken

PropertyDescription
FirmUserIdOwning user
TokenRefresh token string
ExpiresAtExpiration date
SessionIdIdentifier for the login session
IsRevokedBoolean flag

Firm Entities

Entity Firm

PropertyDescription
NameFirm name (100)
IndustryEnum for industry type
LogoLight, LogoDark, FaviconImage URLs (Azure Blob)
Email, PhoneNumber, PhoneCCContact information
IsSuperFirmTrue if this is the system administration firm

Entity FirmAddress

PropertyDescription
FirmIdParent firm
TypeEnum: HeadOffice, Branch, etc.
Street, City, State, Country, ZipCodeAddress fields

Entity FirmSetting

PropertyDescription
FirmIdParent firm
SectionEnum (e.g., General, WhatsApp)
KeySetting name
ValueSetting value

Contact Entities

Entity FirmContact

PropertyDescription
FirmIdParent firm
Prefix, FirstName, LastName, GenderPersonal info
ProfilePicImage URL
IsActiveBoolean flag

Nested FirmContactPhone, Email, Address

PropertyDescription
FirmContactIdParent contact
PhoneNumber, PhoneCC, Email, etc.Contact details
TypeEnum: Work, Personal, etc.
IsPrimaryBoolean flag

Nested FirmContactTag

PropertyDescription
FirmContactIdParent contact
TagNameString tag for filtering

WhatsApp Entities

Entity MetaWhatsappConfiguration

PropertyDescription
FirmIdParent firm
AppToken, BusinessAppId, BusinessPhoneNumberIdMeta API credentials
ProfileName, Address, Description, WebsitesBusiness profile data
QualityRating, MessagingLimit, NameStatusMeta account health status

Entity WhatsappTemplate

PropertyDescription
FirmIdParent firm
Title, MetaTemplateName, LanguageTemplate identifiers
CategoryEnum: UTILITY, MARKETING, AUTHENTICATION
Status, QualityScore, RejectionReasonMeta approval status
Template, Json, UIJsonRaw JSON structures

Entity WhatsappMessage

PropertyDescription
GroupIdParent chat group
MetaMessageIdWAMID from Meta
FirmUserId, FirmContactIdParticipants
Type, DirectionEnums (Text/Template/Image, Inbound/Outbound)
BodyText, ReplyMessageIdContent
StatusEnum: Pending, Sent, Delivered, Read, Failed

Workflow Entities

Entity Workflow

PropertyDescription
FirmIdParent firm
Name, Description, IndustryWorkflow metadata
IsActive, StatusExecution state

Entity WorkflowNode

PropertyDescription
WorkflowIdParent workflow
Type, SubTypeEnum: Event/Action/Condition
ConfigurationJSONB: Node-specific settings
PositionX, PositionYCanvas coordinates

Entity WorkflowExecution

PropertyDescription
WorkflowIdSource workflow
WorkflowJsonJSONB: Snapshot of workflow at execution time
StatusEnum: Pending, Running, Success, Failed

Notification Entity

Entity Notification

PropertyDescription
FirmId, UserId?Target audience
Module, ModuleId?Source and deep-link reference
Title, MessageContent
MetadataJSONB: Flexible payload
StatusEnum: Unread / Read