🌿 Ulmexa SaaS Entities
This document describes the main entities in the Ulmexa SaaS application, including their fields and relationships.
The architecture is based on a modular multi-tier system with entities for campaigns, clients, users, projects, VPSs, billing, and messaging.
1. Users​
Represents platform users.
-
Fields:
id(PK)emailfirst_namelast_namepasswordconfirm_passworduser_codelast_seencreated_datelast_modified_date
-
Relationships:
- One-to-many with projects
- One-to-many with tickets
- Many-to-many with teams via
team_members
2. Teams​
Represents a group of users collaborating on projects or tickets.
-
Fields:
team_id(PK)namedescriptionteam_codecreated_by_idis_defaultcreated_datelast_modified_date
-
Relationships:
- Many-to-many with users via
team_members - Many-to-many with projects via
team_projects - Linked to tickets (assigned team)
- Many-to-many with users via
3. Projects​
Represents a user or team workspace.
-
Fields:
project_id(PK)project_namedescriptionuser_id(owner)image_urlcreated_datelast_modified_date
-
Relationships:
- One-to-many with clients
- One-to-many with campaigns
- One-to-many with VPS
- Many-to-many with teams via
team_projects - One-to-many with project_service_entity
4. Clients​
Represents contacts/customers linked to a project.
-
Fields:
client_id(PK)first_name,last_nameemail,address,business_addresswhatsapp_tel,num_telgendertype_clientsocial_media_availabilityfield_of_activityfiscal_infoproject_id(FK)created_date,last_modified_date
-
Relationships:
- Linked to campaign_recipient (emails sent)
- Belongs to project
5. Campaigns​
Represents email campaigns.
-
Fields:
campaign_id(PK)subject,html_contentstatus: draft, scheduled, sentscheduled_at,sent_atsuccess_ratetracking_idproject_id(FK)from_mailbox_id(FK)domain_id(FK)created_date,last_modified_dateis_sent(boolean)
-
Relationships:
- One-to-many with campaign_recipient
- Belongs to a project
- Sent from a mailbox and domain
6. Campaign Recipient​
Represents a recipient of a campaign.
-
Fields:
recipient_id(PK)emailopened_atopen_countstatus: delivered, bounced, openedbounce_reasontracking_idcampaign_id(FK)client_id(FK)created_date,last_modified_date
-
Relationships:
- Belongs to campaign
- Linked optionally to client
7. Mailbox​
Represents an email account on a domain.
-
Fields:
mailbox_id(PK)display_namedomain_id(FK)quota,tls_enforce_in,tls_enforce_outpassword_hashis_enabledforce_pw_updatelocal_partcreated_date,last_modified_date
-
Relationships:
- One-to-many with smtp_credentials
- Linked to campaigns as sender
8. SMTP Credentials​
Represents credentials for sending emails via a mailbox.
-
Fields:
smtp_cred_id(PK)smtp_host,smtp_port,smtp_username,smtp_passwordsmtp_encryptionsmtp_sender_addressmailbox_id(FK)created_date,last_modified_date
-
Relationships:
- Belongs to mailbox
- Used by campaign sending system
9. Domain​
Represents registered email domains.
-
Fields:
domain_id(PK)domain_namealiases,backupmx,descriptionis_verifiedmail_providermailboxes_count,maxquota,quotarelay_all_recipients,relay_hostrestart_sogo,rl_frame,rl_valueproject_service_service_id(FK)created_date,last_modified_date,active
-
Relationships:
- Has multiple mailboxes
- Linked to campaigns for sending
10. Project Service Entity​
Represents services (like OpenStack, Mailcow) attached to a project.
-
Fields:
service_id(PK)project_id(FK)activation_date,deactivation_dateis_enabledservice_typeopenstack_project_id
-
Relationships:
- Linked to VPS and domains
11. VPS​
Represents virtual server instances.
-
Fields:
vps_id(PK)project_service_service_id(FK)template_id(FK)status,suspended_atfloating_ip,internal_ipopenstack_instance_idcreated_at,due_date
-
Relationships:
- Linked to vps_template
- Belongs to project_service_entity
12. VPS Template​
Represents VPS OS templates.
-
Fields:
id(PK)image_id(FK)flavor_id(FK)active,is_defaultcloud_init_script,description
-
Relationships:
- Used to provision VPS instances
13. VPS Flavor​
Represents VPS hardware configuration.
-
Fields:
id(PK)namevcpus,ram_mb,disk_gbpricecreated_at,updated_at,active
-
Relationships:
- Linked to VPS templates and instances
14. Chat​
Represents internal messaging between users.
-
Fields:
id(PK)sender_id,receiver_id(FK)project_id(FK)created_date,last_modified_date
-
Relationships:
- Has multiple messages
- Linked to users and projects
15. Message​
Represents individual messages in chat or campaign context.
-
Fields:
id(PK)content,media_file_pathstate,typesender_id,receiver_idchat_id(FK)created_date,last_modified_date
-
Relationships:
- Belongs to chat
- Optional link to campaign recipients
16. Tickets​
Represents support tickets.
-
Fields:
ticket_id(PK)title,description,status,typeuser_id(FK)created_at,closed_at,last_modified_date
-
Relationships:
- Assigned to user or team
17. Subscription​
Represents user or organization subscription.
-
Fields:
subscription_id(PK)user_id(FK)plan_id(FK)price,start_date,end_dateis_activecreated_date,last_modified_date,next_billing_date
-
Relationships:
- Linked to invoice and plan
18. Plan​
Defines subscription plan limits.
-
Fields:
id(PK)name,description,featuresactive,recommendedbilling_cycle,price
-
Relationships:
- Linked to subscriptions and invoices
19. Invoice​
Represents billing invoices.
-
Fields:
invoice_id(PK)subscription_id(FK)amount,paid,invoice_number,issue_datesubscription_price,vps_pricecreated_date,last_modified_date
-
Relationships:
- Linked to subscription
20. OS Images​
Represents operating system images for VPS templates.
-
Fields:
id(PK)name,os_type,os_versioncontainer_format,disk_formatsize_bytesis_public,created_at,updated_atopenstack_image_id
-
Relationships:
- Used by VPS templates
21. Domain Tags​
Represents custom tags for domains.
-
Fields:
domain_domain_id(FK)tags
-
Relationships:
- Belongs to domain
22. Flyway Schema History​
Tracks database migration history.
- Fields:
installed_rank(PK)version,description,type,script,checksuminstalled_by,installed_on,execution_timesuccess
ERD Diagram​
Here is the full entity-relationship diagram for Ulmexa SaaS:
