mirror of
http://172.20.10.11:3000/gitadmin/INSIGHT-MVP.git
synced 2026-06-25 05:56:39 +02:00
- Backend: new CRUD services/controllers for Industries, AccountTypes, RelationshipTypes, CompanyRelationships with Prisma schema migration - Frontend: new hooks, API functions, and types for all config entities - CompanyDetailPage redesign with ActivityFeed, RelationshipsCard - CompanyFormModal extended with industry, account type, owner fields - Activities service now supports companyId filter + includeContacts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
46 lines
2.6 KiB
SQL
46 lines
2.6 KiB
SQL
-- ============================================================
|
|
-- INSIGHT CRM - Default Konfigurationsdaten (Seed)
|
|
-- ============================================================
|
|
-- Ausfuehrung: Manuell nach Migration auf dem Server
|
|
-- Hinweis: {TENANT_ID} muss durch die echte Tenant-UUID ersetzt werden
|
|
-- ============================================================
|
|
|
|
-- Ersetze diese Variable mit der echten Tenant-ID:
|
|
-- SET session my.tenant_id = 'DEINE-TENANT-UUID-HIER';
|
|
|
|
-- --------------------------------------------------------
|
|
-- Default Industries (Branchen)
|
|
-- --------------------------------------------------------
|
|
INSERT INTO "app_crm"."industries" ("id", "tenant_id", "name", "color", "sort_order", "created_at", "updated_at")
|
|
VALUES
|
|
(gen_random_uuid(), '{TENANT_ID}', 'IT & Software', '#3B82F6', 1, NOW(), NOW()),
|
|
(gen_random_uuid(), '{TENANT_ID}', 'Produktion', '#F59E0B', 2, NOW(), NOW()),
|
|
(gen_random_uuid(), '{TENANT_ID}', 'Handel', '#10B981', 3, NOW(), NOW()),
|
|
(gen_random_uuid(), '{TENANT_ID}', 'Dienstleistung', '#8B5CF6', 4, NOW(), NOW()),
|
|
(gen_random_uuid(), '{TENANT_ID}', 'Gesundheit', '#EF4444', 5, NOW(), NOW()),
|
|
(gen_random_uuid(), '{TENANT_ID}', 'Finanzen', '#6366F1', 6, NOW(), NOW()),
|
|
(gen_random_uuid(), '{TENANT_ID}', 'Bildung', '#EC4899', 7, NOW(), NOW()),
|
|
(gen_random_uuid(), '{TENANT_ID}', 'Oeffentlicher Sektor', '#6B7280', 8, NOW(), NOW())
|
|
ON CONFLICT ("tenant_id", "name") DO NOTHING;
|
|
|
|
-- --------------------------------------------------------
|
|
-- Default AccountTypes (Kontotypen)
|
|
-- --------------------------------------------------------
|
|
INSERT INTO "app_crm"."account_types" ("id", "tenant_id", "name", "sort_order", "created_at", "updated_at")
|
|
VALUES
|
|
(gen_random_uuid(), '{TENANT_ID}', 'Interessent', 1, NOW(), NOW()),
|
|
(gen_random_uuid(), '{TENANT_ID}', 'Endkunde', 2, NOW(), NOW()),
|
|
(gen_random_uuid(), '{TENANT_ID}', 'Personaldienstleister', 3, NOW(), NOW()),
|
|
(gen_random_uuid(), '{TENANT_ID}', 'Partner', 4, NOW(), NOW())
|
|
ON CONFLICT ("tenant_id", "name") DO NOTHING;
|
|
|
|
-- --------------------------------------------------------
|
|
-- Default RelationshipTypes (Beziehungstypen)
|
|
-- --------------------------------------------------------
|
|
INSERT INTO "app_crm"."relationship_types" ("id", "tenant_id", "name", "sort_order", "created_at", "updated_at")
|
|
VALUES
|
|
(gen_random_uuid(), '{TENANT_ID}', 'Endkunde', 1, NOW(), NOW()),
|
|
(gen_random_uuid(), '{TENANT_ID}', 'Abrechnungspartner', 2, NOW(), NOW()),
|
|
(gen_random_uuid(), '{TENANT_ID}', 'Muttergesellschaft', 3, NOW(), NOW()),
|
|
(gen_random_uuid(), '{TENANT_ID}', 'Tochtergesellschaft', 4, NOW(), NOW())
|
|
ON CONFLICT ("tenant_id", "name") DO NOTHING;
|