# PartnerIdentification

## Description

PartnerIdentification is a child entity of BusinessPartner that stores official registration numbers — tax IDs, VAT numbers, DUNS numbers, company registry codes, national IDs, and other identification documents. Each record captures the type, value, and optional metadata including issuing country and validity period.

Uniqueness is enforced on the combination of (type, value) within a company scope. Identifications can be added at any point in the partner's lifecycle.

## Domain Model Definitions

### Model type

Standard

### Command Definitions

- [createPartnerIdentification](../command/CreatePartnerIdentification.md) - Add an identification record to a partner
- [updatePartnerIdentification](../command/UpdatePartnerIdentification.md) - Update identification details
- [deletePartnerIdentification](../command/DeletePartnerIdentification.md) - Remove an identification record

### Query Definitions

- [GetPartnerIdentification](../query/GetPartnerIdentification.md) - Retrieve an identification record by id
- [ListPartnerIdentificationsByPartner](../query/ListPartnerIdentificationsByPartner.md) - List all identification records for a partner

### Models

- PartnerIdentification

### Invariants

- `type` and `value` are both required; records missing either field are rejected
- Supported types are: TAX_ID, VAT, DUNS, COMPANY_REGISTRY, NATIONAL_ID, OTHER
- The combination of (type, value) must be unique within the company scope (cross-company deduplication is not enforced)
- Two partners within the same company may not share an identification record with the same (type, value) combination
- A single partner can hold multiple identification records with different types
- `type` is immutable after creation; changing the identification type requires deleting the existing record and creating a new one
- `issuingCountry`, `validFrom`, and `validTo` are optional and may be omitted
- When both `validFrom` and `validTo` are set, `validTo` must be equal to or later than `validFrom`
- Identifications can be added to partners in any lifecycle state (DRAFT, ACTIVE, INACTIVE)
- Updating an identification's value must re-validate the (type, value) uniqueness constraint
- Deleting an identification record does not affect the parent partner or other identifications

### Relationships

- **References BusinessPartner**: Each identification record belongs to exactly one BusinessPartner
