Files
descrybe/apps/api/sql/queries/brand.sql
T
greeneclipse 8580c996c3 Initial commit of Descrybe v2 without local scratch artifacts.
Drop one-shot tmp/axe scripts and agent i18n scratch so the Gitea tree is deployable.
2026-08-09 22:47:43 +02:00

19 lines
634 B
SQL

-- name: GetCompanyBrand :one
SELECT * FROM company_brand WHERE company_id = $1 LIMIT 1;
-- name: UpsertCompanyBrand :one
INSERT INTO company_brand (
company_id, voice_tone, dos, donts, primary_color, secondary_color, logo_url, preferred_terms, updated_at
) VALUES (
$1, $2, $3, $4, $5, $6, $7, $8, now()
)
ON CONFLICT (company_id) DO UPDATE SET
voice_tone = EXCLUDED.voice_tone,
dos = EXCLUDED.dos,
donts = EXCLUDED.donts,
primary_color = EXCLUDED.primary_color,
secondary_color = EXCLUDED.secondary_color,
logo_url = EXCLUDED.logo_url,
preferred_terms = EXCLUDED.preferred_terms,
updated_at = now()
RETURNING *;