Party
Description
Entity representing parties involved in business transactions.
Table Definition
Columns
Name | Type | Default | Nullable | Children | Parents | Comment |
---|---|---|---|---|---|---|
party_id | VARCHAR | false | party_relation person organization organization_role device_party_relationship | {“isSqlDomainZodDescrMeta”:true,“isVarChar”:true} | ||
party_type_id | ULID | false | party_type | {“isSqlDomainZodDescrMeta”:true,“isUlid”:true} | ||
party_name | TEXT | false | The name of the party | |||
elaboration | TEXT | true | Any elaboration needed for the party. | |||
created_at | TIMESTAMPTZ | CURRENT_TIMESTAMP | true | |||
created_by | TEXT | ’UNKNOWN’ | true | |||
updated_at | TIMESTAMPTZ | true | ||||
updated_by | TEXT | true | ||||
deleted_at | TIMESTAMPTZ | true | ||||
deleted_by | TEXT | true | ||||
activity_log | TEXT | true | {“isSqlDomainZodDescrMeta”:true,“isJsonSqlDomain”:true} |
Constraints
Name | Type | Definition |
---|---|---|
party_id | PRIMARY KEY | PRIMARY KEY (party_id) |
- (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (party_type_id) REFERENCES party_type (party_type_id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE |
sqlite_autoindex_party_1 | PRIMARY KEY | PRIMARY KEY (party_id) |
- | CHECK | CHECK(json_valid(elaboration) OR elaboration IS NULL) |
Indexes
Name | Definition |
---|---|
idx_party__party_type_id__party_name | CREATE INDEX “idx_party__party_type_id__party_name” ON “party”(“party_type_id”, “party_name”) |
sqlite_autoindex_party_1 | PRIMARY KEY (party_id) |