id
UUID
PRIMARY KEY
Unique lead identifier
email
VARCHAR(255)
UNIQUE, NOT NULL
Lead email address (primary deduplication key)
phone
VARCHAR(20)
NULLABLE
Phone number (E.164 format, secondary dedup key)
first_name
VARCHAR(100)
NOT NULL
First name
last_name
VARCHAR(100)
NOT NULL
Last name
company_name
VARCHAR(255)
NULLABLE
Company name (enriched from domain or manually entered)
company_domain
VARCHAR(255)
NULLABLE, INDEX
Company website domain (for enrichment)
job_title
VARCHAR(255)
NULLABLE
Job title/role
industry
VARCHAR(100)
NULLABLE
Industry vertical (enriched)
company_size
VARCHAR(50)
NULLABLE
Employee count range (1-10, 11-50, 51-200, 201-500, 500+)
annual_revenue
VARCHAR(50)
NULLABLE
Revenue range ($0-1M, $1-10M, $10-50M, $50M+)
country
VARCHAR(2)
NULLABLE
ISO 3166-1 alpha-2 country code
state
VARCHAR(100)
NULLABLE
State/province
city
VARCHAR(100)
NULLABLE
City
lead_source_id
UUID
FOREIGN KEY → lead_sources(id)
Reference to source (form, chat, API, import)
score
INTEGER
DEFAULT 0, INDEX
Current lead score (0-100)
stage
ENUM
'cold', 'warm', 'hot', 'mql', 'sql', 'opportunity', 'customer', 'disqualified'
Current lead stage in funnel
disqualification_reason
TEXT
NULLABLE
Reason if stage = 'disqualified'
assigned_to_user_id
UUID
FOREIGN KEY → users(id), NULLABLE
Assigned sales rep
utm_source
VARCHAR(255)
NULLABLE
UTM source parameter
utm_medium
VARCHAR(255)
NULLABLE
UTM medium parameter
utm_campaign
VARCHAR(255)
NULLABLE
UTM campaign parameter
referrer_url
TEXT
NULLABLE
HTTP referrer URL
ip_address
INET
NULLABLE
Submission IP address (for geolocation)
enrichment_data
JSONB
NULLABLE
Enriched data from Clearbit/Hunter (company logo, social profiles, etc.)
custom_fields
JSONB
NULLABLE
Industry-specific custom fields
consent_marketing
BOOLEAN
DEFAULT false
Consent to receive marketing emails (GDPR)
consent_sales
BOOLEAN
DEFAULT false
Consent to be contacted by sales (GDPR)
consent_ip
INET
NULLABLE
IP address when consent was given
consent_timestamp
TIMESTAMP
NULLABLE
When consent was given
created_at
TIMESTAMP
DEFAULT NOW(), INDEX
Lead capture timestamp
updated_at
TIMESTAMP
DEFAULT NOW()
Last update timestamp
last_activity_at
TIMESTAMP
NULLABLE, INDEX
Last engagement timestamp (for score decay)