-- Fetch all the Leads belonging to the Salesforce
-- account of a particular user.
SELECT *
FROM fiber.salesforce_lead
WHERE account_id = '{user.salesforce_id}'
-- Fetch all the Leads belonging to the Salesforce
-- account of a particular user.
SELECT *
FROM fiber.salesforce_lead
WHERE account_id = '{user.salesforce_id}'
Code
CREATE TABLE fiber.salesforce_lead (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
account_id TEXT,
available JSONB,
pending JSONB,
object TEXT,
connect_reserved JSONB,
instant_available JSONB,
issuing JSONB,
livemode BOOLEAN
)
CREATE TABLE fiber.salesforce_lead (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
account_id TEXT,
available JSONB,
pending JSONB,
object TEXT,
connect_reserved JSONB,
instant_available JSONB,
issuing JSONB,
livemode BOOLEAN
)
Model definition