Franchise Address
The address of a franchise unit - street, number, complement, neighborhood, postal code, IBGE city or foreign city and state, country and coordinates. One row per unit in common.addresses. Travels on the Franchise Kafka topic keyed by the franchise.
Overview
A franchise unit has at most one address. In cna-nexus it is a row in common.addresses, a table shared with persons and contract franchises, linked to the unit by franchise_id; the one-per-unit rule is enforced by the application (validateUniqueAddressForOwner), not by a database constraint. The coordinates are stored as a PostGIS point and exposed as latitude and longitude text.
The row is inserted when the unit is created from an opening ContractContractEntityv1.0.0A franchise contract in CNA Nexus - opening, renewal or resale - uploaded as a document, analysed by AI, reviewed by a p...Ownercna-platformView docs or through the createAddress mutation, and updated through the updateAddress mutation, when a contract is applied onto the unit, or when an ADDRESS Contract AmendmentContract AmendmentEntityv1.0.0A supplementary document attached to a contract - attachment, addendum or rescission - carrying one change per contract ...Ownercna-platformView docs is applied. Every insert publishes Franchise Address CreatedFranchise Address CreatedEventv1.0.0A franchise unit received its address in CNA Nexus. The address block of the franchise snapshot plus the franchise id. P...Ownercna-platformSchemaMapView docs and every update publishes Franchise Address UpdatedFranchise Address UpdatedEventv1.0.0The address of a franchise unit changed in CNA Nexus. The address block of the franchise snapshot plus the franchise id....Ownercna-platformSchemaMapView docs on Franchise (Kafka topic)Franchise (Kafka topic)Channelv1.0.0Kafka topic for the Franchise aggregate. Carries the nine NEXUS events about franchise units, their addresses, economic ...Ownercna-platformView docs, keyed by the franchise so the address stays in order with the unit’s other messages. The address also travels inside the Franchise CreatedFranchise CreatedEventv1.2.0A franchise unit was created in CNA Nexus by activating an opening contract. Full snapshot of the unit; cna-one mirrors ...Ownercna-platformSchemaMapView docs and Franchise UpdatedFranchise UpdatedEventv1.2.0A franchise unit changed in CNA Nexus - edited in one of the franchise screens, re-activated from a contract, or amended...Ownercna-platformSchemaMapView docs snapshots as payload.address, without franchiseId.
CNA OneCNA OneServicev1.0.0Franchise operating system (franchises and employees, pricing, products and learning books, school operations). Publishe...PublishesGrantApplicationAccess, EmployeeCreated +6SubscribesInviteUser, FranchiseCreated +9Ownercna-platformMapRepoView docs mirrors the row into its own common.addresses (streetAddress, number, district, additionalAddress, an 8-digit postalCode, cityId and the location point). It requires a Brazilian address with a known IBGE city; the country and foreign fields are ignored.
| Name | Type | Required | Description | Reference |
|---|---|---|---|---|
id | string | Required | Internal id (UUID) in common.addresses. Not carried by the address events; cna-one keeps its own row id. | |
franchiseId | string | Required | The unit the address belongs to. Kafka message key of the address events and the id cna-one looks the unit up by. | FranchiseProperty: id |
street | string | Optional | Street. | |
number | string | Optional | Number. | |
complement | string | Optional | Complement. | |
neighborhood | string | Optional | Neighborhood. | |
postalCode | string | Optional | Postal code as typed. cna-one strips it to 8 digits. | |
cityId | integer | Optional | IBGE city code (common.cities.id). Required for a Brazilian address, null outside Brazil. | |
cityName | string | Optional | Name of the IBGE city, read from common.cities. Null outside Brazil. | |
state | string | Optional | State code (UF) of the IBGE city, read from common.cities. Null outside Brazil. | |
countryId | string | Required | Country as an ISO 3166-1 alpha-2 code. Defaults to BR. | |
foreignCity | string | Optional | Free-text city for an address outside Brazil. Null for a Brazilian address. | |
foreignState | string | Optional | Free-text state or province for an address outside Brazil. Null for a Brazilian address. | |
latitude | string | Optional | Latitude in WGS84 as decimal text, computed from the PostGIS location point. Null until the address is geocoded. | |
longitude | string | Optional | Longitude in WGS84 as decimal text, computed from the PostGIS location point. Null until the address is geocoded. |
Custom properties
| Property | Value |
|---|---|
| Kafka Topicx-kafka-topic | Franchise |
| Routing Keyx-routing-key | franchiseId |