Domain
Sending and receiving domains with DNS verification records.
Source: packages/db/src/schema/domain.ts
Enums
| Enum | Values |
|---|---|
domain_status | pending, verifying, active, suspended, failed |
dns_record_type | A, AAAA, CNAME, MX, TXT |
dns_record_type_name | MX, SPF, DKIM, DMARC, CNAME |
dns_record_purpose | sending, receiving, tracking |
tls_mode | opportunistic, enforced |
domain
| Column | Type | Notes |
|---|---|---|
id | text | PK, prefix domain_ |
domain | varchar(255) | NOT NULL |
organization_id | text | FK → organization.id, CASCADE |
user_id | text | FK → user.id, CASCADE |
status | domain_status | default pending |
user_verified_domain | boolean | default false |
system_verified | boolean | default false |
custom_return_path | varchar(255) | default inbound |
tracking_subdomain | varchar(255) | default tracking |
is_click_tracking_enabled | boolean | default false |
is_open_tracking_enabled | boolean | default false |
tls | tls_mode | default opportunistic |
is_tracking_domain | boolean | default false |
is_sending_email_enabled | boolean | default true |
is_receiving_email_enabled | boolean | default true |
verification_failed_reason | text | |
deleted_at | timestamp | soft delete |
last_verified_at | timestamp | |
created_at | timestamp | |
updated_at | timestamp |
Unique: (organization_id, domain)
domain_dns_record
| Column | Type | Notes |
|---|---|---|
id | text | PK, prefix dns_ |
domain_id | text | FK → domain.id, CASCADE |
organization_id | text | FK → organization.id, CASCADE |
user_id | text | FK → user.id, CASCADE |
record_type | dns_record_type | NOT NULL |
name | text | NOT NULL |
status | domain_status | default pending |
value | text | NOT NULL |
ttl | text | default Auto |
priority | integer | |
record_type_name | dns_record_type_name | NOT NULL |
purpose | dns_record_purpose | default sending |
domain | text | NOT NULL |
fqdn | text | NOT NULL |
private_key | text | DKIM private key |
verification_error | text | |
deleted_at | timestamp | |
created_at | timestamp | |
updated_at | timestamp |
Unique: (domain_id, record_type, name, value)
Was this page helpful?