BaseEntity
All entities contain these base properties automatically managed by EF Core interceptors:
| Property | Type | Description |
Id | Guid | Primary Key |
CreatedAt | DateTime | Created UTC timestamp |
UpdatedAt | DateTime? | Last updated UTC timestamp |
CreatedBy | Guid? | User ID who created the record |
UpdatedBy | Guid? | User ID who last updated the record |
IsDeleted | bool | Soft delete flag |
Authentication Entities
Entity FirmUser
| Property | Description |
FirstName, LastName | User's name |
UserName, Email | Login credentials |
PasswordHash | PBKDF2 hashed password |
IsActive | Account status |
LastLoginAt | Timestamp of last login |
Entity FirmUserRelation
| Property | Description |
FirmId | Linked firm (tenant) |
FirmUserId | Linked user |
Entity FirmUserRefreshToken
| Property | Description |
FirmUserId | Owning user |
Token | Refresh token string |
ExpiresAt | Expiration date |
SessionId | Identifier for the login session |
IsRevoked | Boolean flag |
Firm Entities
Entity Firm
| Property | Description |
Name | Firm name (100) |
Industry | Enum for industry type |
LogoLight, LogoDark, Favicon | Image URLs (Azure Blob) |
Email, PhoneNumber, PhoneCC | Contact information |
IsSuperFirm | True if this is the system administration firm |
Entity FirmAddress
| Property | Description |
FirmId | Parent firm |
Type | Enum: HeadOffice, Branch, etc. |
Street, City, State, Country, ZipCode | Address fields |
Entity FirmSetting
| Property | Description |
FirmId | Parent firm |
Section | Enum (e.g., General, WhatsApp) |
Key | Setting name |
Value | Setting value |
Entity FirmContact
| Property | Description |
FirmId | Parent firm |
Prefix, FirstName, LastName, Gender | Personal info |
ProfilePic | Image URL |
IsActive | Boolean flag |
Nested FirmContactPhone, Email, Address
| Property | Description |
FirmContactId | Parent contact |
PhoneNumber, PhoneCC, Email, etc. | Contact details |
Type | Enum: Work, Personal, etc. |
IsPrimary | Boolean flag |
Nested FirmContactTag
| Property | Description |
FirmContactId | Parent contact |
TagName | String tag for filtering |
WhatsApp Entities
Entity MetaWhatsappConfiguration
| Property | Description |
FirmId | Parent firm |
AppToken, BusinessAppId, BusinessPhoneNumberId | Meta API credentials |
ProfileName, Address, Description, Websites | Business profile data |
QualityRating, MessagingLimit, NameStatus | Meta account health status |
Entity WhatsappTemplate
| Property | Description |
FirmId | Parent firm |
Title, MetaTemplateName, Language | Template identifiers |
Category | Enum: UTILITY, MARKETING, AUTHENTICATION |
Status, QualityScore, RejectionReason | Meta approval status |
Template, Json, UIJson | Raw JSON structures |
Entity WhatsappMessage
| Property | Description |
GroupId | Parent chat group |
MetaMessageId | WAMID from Meta |
FirmUserId, FirmContactId | Participants |
Type, Direction | Enums (Text/Template/Image, Inbound/Outbound) |
BodyText, ReplyMessageId | Content |
Status | Enum: Pending, Sent, Delivered, Read, Failed |
Workflow Entities
Entity Workflow
| Property | Description |
FirmId | Parent firm |
Name, Description, Industry | Workflow metadata |
IsActive, Status | Execution state |
Entity WorkflowNode
| Property | Description |
WorkflowId | Parent workflow |
Type, SubType | Enum: Event/Action/Condition |
Configuration | JSONB: Node-specific settings |
PositionX, PositionY | Canvas coordinates |
Entity WorkflowExecution
| Property | Description |
WorkflowId | Source workflow |
WorkflowJson | JSONB: Snapshot of workflow at execution time |
Status | Enum: Pending, Running, Success, Failed |
Notification Entity
Entity Notification
| Property | Description |
FirmId, UserId? | Target audience |
Module, ModuleId? | Source and deep-link reference |
Title, Message | Content |
Metadata | JSONB: Flexible payload |
Status | Enum: Unread / Read |