Context
The model decorators in 0095 to 0097 covered validation and traits but not money, JSON or renames. The owner’s intent-map item P3, with the data answer DA8 (mem L534), fixes the field vocabulary, model keys and what a rename does to a migration.Decision
@Nullableis separate from@Optional.- Semantic field types:
@Money,@Decimal,@Json(schema),@Url,@Phoneand@Computed.@Geois deferred. @Model({ key })takes a key under the module namespace (0131).@Stored({ column, renamedFrom })makes a rename safe in the migration diff, so a rename is not a drop and a create.@Crudderives the create, update and filter schemas from the model.Versionablemeans optimistic concurrency. A stale write returns a409with theconflictcode. History is eitherHasRevisionsor the audit log.- A new trait,
HasUserStamps, joins the trait table of 0096. - Gen emits in-process domain events
<modelKey>.created,<modelKey>.updatedand<modelKey>.deleted.
@Geo. The sources give no revival trigger. The owner must name one (open question).
Consequences
- Renames are safe only when the author writes
renamedFrom. Gen cannot infer it. - Money and decimal fields need the ledger rules (ADR 0220 and the data specs, not on this branch).
Enforcement
planned — gen rejects a@Stored rename with no renamedFrom when the column changes, and the migration diff check runs in
stackra gen --check (ADR 0158, wave 1 part 3).
Alternatives
- Infer renames from column names: rejected, the author states the rename.