json icon

Franchise Partner Removed

v1.1.0events

A person stopped being a partner of a franchise unit. One message per partner. Consumed by cna-nexus itself to invalidate the economic group statistics cache, which cannot see hard-deleted rows otherwise.

1{
2  "$schema": "https://json-schema.org/draft/2020-12/schema",
3  "title": "FranchisePartnerRemoved payload",
4  "type": "object",
5  "additionalProperties": false,
6  "properties": {
7    "franchiseId": {
8      "type": "string",
9      "description": "Franchise id (UUID). Kafka message key."
10    },
11    "roles": {
12      "type": "array",
13      "items": {
14        "type": "string",
15        "enum": ["FRANCHISEE", "OPERATING_PARTNER"]
16      },
17      "description": "Roles of the partner in this unit (FranchisePartnerRole). Never empty."
18    },
19    "person": {
20      "type": "object",
21      "additionalProperties": false,
22      "description": "Snapshot of the person (common.persons).",
23      "properties": {
24        "id": {
25          "type": "string",
26          "description": "Person id (UUID)."
27        },
28        "document": {
29          "type": "string",
30          "description": "Person document; format depends on documentType."
31        },
32        "documentType": {
33          "type": "string",
34          "enum": ["CPF", "CNPJ", "RNM"],
35          "description": "Document type (PersonsDocumentType)."
36        },
37        "name": {
38          "type": "string",
39          "description": "Person name."
40        },
41        "email": {
42          "type": ["string", "null"],
43          "description": "E-mail, or null."
44        },
45        "phone": {
46          "type": ["string", "null"],
47          "description": "Phone, or null."
48        },
49        "birthDate": {
50          "type": ["string", "null"],
51          "format": "date",
52          "description": "Birth date as a calendar day, YYYY-MM-DD, no time zone. Null when unknown."
53        },
54        "legalName": {
55          "type": ["string", "null"],
56          "description": "Legal name, for companies."
57        },
58        "isFranchisee": {
59          "type": "boolean",
60          "description": "Whether the person holds the FRANCHISEE role in at least one franchise (any unit, not only this one). Derived, not stored."
61        }
62      },
63      "required": ["id", "document", "documentType", "name", "isFranchisee"]
64    }
65  },
66  "required": ["franchiseId", "roles", "person"]
67}
68

Details

Format
JSON Schema
Resource
events
Filename
schema.json

Versions