Darstellung
CrmOpportunityItem
Tabelle: crm_opportunity_item
Domain: CrmOpportunityItem · com.reybex.domain.crm.opportunity
Modul: CRM
Partner-Hinweise
- Daten liegen mandantengetrennt – bei SELECT fast immer
tenant_id = :mandantsetzen (Spalte ggf.TenantIdin älteren Tabellen). - Schreibende SQL (
INSERT/UPDATE/DELETE) nur in abgestimmten Export-/Report-Jobs (Transaktion BAS23) und nie ohne Freigabe durch reybex. - Für API-Integrationen bevorzugt die API statt direkter DB-Zugriffe.
Primärschlüssel
id
Spalten
| Spalte | SQL-Typ | NULL | Default | Beschreibung |
|---|---|---|---|---|
id | bigint auto_increment | Ja | — | Primärschlüssel (Domain: id) |
tenant_id | bigint | Ja | — | Mandanten-ID (Multi-Tenant – in Abfragen fast immer filtern) (Domain: tenantId) |
crm_opportunity_id | bigint | Ja | — | Fremdschlüssel → crm opportunity |
variant_code | varchar(1000) | Ja | — | Domain-Feld variantCode |
attribute_code | varchar(5000) | Ja | — | Domain-Feld attributeCode |
date_created | datetime | Ja | — | Anlagezeitpunkt |
last_updated | datetime | Ja | CURRENT_TIMESTAMP | Letzte Änderung |
created_by_id | bigint | Ja | — | Angelegt von (Benutzer-ID) |
updated_by_id | bigint | Ja | — | Geändert von (Benutzer-ID) |
material_id | bigint | Ja | — | Fremdschlüssel → material |
quantity | decimal(20, 8) | Ja | 0.00000000 | Menge (Domain: quantity) |
price | decimal(20, 8) | Ja | 0.00000000 | Domain-Feld price |
net_amount | decimal(20, 8) | Ja | 0.00000000 | Domain-Feld netAmount |
is_delete | smallint | Ja | 0 | Soft-Delete (0 = aktiv, 1 = gelöscht) |
description | text | Ja | — | Beschreibung (Domain: description) |
Fremdschlüssel
| Spalte(n) | Referenz |
|---|---|
material_id | material (id) |
crm_opportunity_id | crm_opportunity (id) |
tenant_id | company (tenant_id) |