partners.yml
2.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# pbc-partners metadata.
#
# Loaded at boot by MetadataLoader, tagged source='core'.
# This declares what the partners PBC offers to the rest of the
# framework and the SPA: which entities exist, which permissions guard
# them, which menu entries point at them.
entities:
- name: Partner
pbc: partners
table: partners__partner
description: An external organisation the company does business with (customer, supplier, or both)
- name: Address
pbc: partners
table: partners__address
description: A postal address attached to a partner (billing, shipping, other)
- name: Contact
pbc: partners
table: partners__contact
description: A named human at a partner organisation (PII — GDPR-relevant)
permissions:
- key: partners.partner.read
description: Read partner records
- key: partners.partner.create
description: Create partners
- key: partners.partner.update
description: Update partners
- key: partners.partner.deactivate
description: Deactivate partners (preserved for historical references)
- key: partners.address.read
description: Read partner addresses
- key: partners.address.create
description: Add an address to a partner
- key: partners.address.update
description: Update a partner address
- key: partners.address.delete
description: Remove a partner address
- key: partners.contact.read
description: Read partner contact people (PII — elevated)
- key: partners.contact.create
description: Add a contact to a partner
- key: partners.contact.update
description: Update a partner contact
- key: partners.contact.deactivate
description: Deactivate a partner contact
menus:
- path: /partners/partners
label: Partners
icon: users
section: Partners
order: 300
# Custom fields declared on the Partner entity (P3.4 — Tier 1
# customization). The framework's ExtJsonValidator enforces these on
# every save through the JSONB `ext` column on partners__partner.
#
# These two fields are seeded as `source=core` here so the framework
# has something to demo from a fresh boot. In production, key users
# would add custom fields via the SPA's customization UI (which writes
# `source=user` rows). Plug-ins can also declare custom fields via
# their own YAML.
customFields:
- key: partners_credit_limit
targetEntity: Partner
type:
kind: decimal
precision: 14
scale: 2
required: false
pii: false
labelTranslations:
en: Credit limit
zh-CN: 信用额度
- key: partners_industry
targetEntity: Partner
type:
kind: enum
allowedValues:
- printing
- publishing
- packaging
- other
required: false
pii: false
labelTranslations:
en: Industry
zh-CN: 行业