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
# =============================================================================
# support Module - Schema Index
# =============================================================================
# Version: 2.0
# Description: Module schema index. `module:` and `schema:` are stamped from the
# module name by `metaphor module create`. `schema:` gives this module its OWN
# Postgres schema (migrations emit `CREATE SCHEMA support` and qualify tables
# as `support.<table>`) — the convention every backbone module follows
# (see backbone-sapiens, backbone-bucket). Do not remove it.
# =============================================================================
module: support
version: 2
schema: support
# Tenancy: none, by design (ADR-0029). The module is tenant-agnostic and reusable —
# it ships no scoping column and no fence declaration. A composing backend-service
# that wants these tables org-scoped declares them in its tenancy.yaml; the
# decorator installs org_unit_id, the RLS policy, the kind guard, and per-unit
# uniques at composition time.
description: "support domain module"
config:
database: postgresql
soft_delete: true
audit: true
default_timestamps: true
generators:
# Hand code lives in <name>.ext.rs beside the generated file (ADR-0031).
extensions: true
# Off-by-default targets this module's released API still carries; it keeps
# them until its next breaking release.
opt_in:
disabled:
- graphql
- grpc
- proto
# Reuse sapiens for user identity (actors) — logical refs, no DB constraint.
external_imports:
- module: sapiens
types:
# Shared value-object types available to all models in this module.
shared_types:
Timestamps:
created_at:
type: datetime
attributes:
description: "Record creation timestamp"
updated_at:
type: datetime
attributes:
description: "Last update timestamp"
deleted_at:
type: datetime?
description: "Soft delete timestamp"
Actors:
created_by:
type: uuid?
attributes:
description: "User who created this record"
updated_by:
type: uuid?
attributes:
description: "User who last updated this record"
deleted_by:
type: uuid?
attributes:
description: "User who deleted this record"
Metadata:
# Import each entity model.
imports:
- service_level_agreement.model.yaml
- issue.model.yaml
- warranty_claim.model.yaml