Darstellung
CostCenter
Tabelle: cost_center
Domain: CostCenter · com.reybex.domain.wws.costcenter
Modul: FIN
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 | Nein | — | Mandanten-ID (Multi-Tenant – in Abfragen fast immer filtern) (Domain: tenantId) |
profit_center_id | bigint | Ja | — | Fremdschlüssel → profit center |
cost_center_code | varchar(15) | Nein | — | Domain-Feld costCenterCode |
name | varchar(50) | Nein | — | Bezeichnung / Name (Domain: name) |
is_delete | smallint | Ja | 0 | Soft-Delete (0 = aktiv, 1 = gelöscht) |
is_active | smallint | Ja | 0 | Aktiv-Flag |
main_cost_center_id | bigint | Ja | — | Fremdschlüssel → main cost center |
responsible_id | bigint | Ja | — | Fremdschlüssel → responsible |
category | smallint | Ja | 0 | 0=Haupt,1=Hilfs,2=Dummy |
type | smallint | Ja | 0 | 0=Verteiler,1=Sammler,2=Beides |
addressline1 | varchar(255) | Ja | — | Domain-Feld addressline1 |
street1 | varchar(255) | Ja | — | Domain-Feld street1 |
zip_street | varchar(50) | Ja | — | Domain-Feld zipStreet |
country_id | bigint | Ja | — | Fremdschlüssel → country |
currency_id | bigint | Nein | — | Fremdschlüssel → currency |
is_primary | smallint | Ja | 1 | Boolean: Primary |
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) |
unique_name | varchar(20) | Ja | — | unique name |
is_customer_specific | smallint | Ja | 0 | Boolean: Customer Specific |
is_used_in_sales | smallint | Ja | 0 | Boolean: Used In Sales |
Fremdschlüssel
| Spalte(n) | Referenz |
|---|---|
country_id | lt_country (id) |
currency_id | ltt_currency (id) |
main_cost_center_id | cost_center (id) |
profit_center_id | ltt_profit_center (id) |