Skip to content

Commit

Permalink
Remove model diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
mnkiefer committed Oct 13, 2023
1 parent 7ed90d8 commit ab64089
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 157 deletions.
42 changes: 0 additions & 42 deletions guides/change-tracking/assets/DataModel.drawio

This file was deleted.

111 changes: 0 additions & 111 deletions guides/change-tracking/assets/DataModel.drawio.svg

This file was deleted.

6 changes: 2 additions & 4 deletions guides/change-tracking/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Following the best practice of separation of concerns, we annotate our domain mo
```cds [srv/change-tracking.cds]
using { ProcessorService as srv } from '@capire/incidents';
annotate srv.Incidents with @changelog.keys: [customer.name, createdAt] {
annotate srv.Incidents with @changelog: [customer.name, createdAt] {
customer @changelog: [ customer.name ];
title @changelog;
status @changelog;
Expand All @@ -41,12 +41,10 @@ annotate srv.Conversations with @changelog.keys: [author, timestamp] {

:::

Entities are annotated with `@changelog.keys:` followed by a list of identifiers that uniquely describe a change set, while elements are annotated with `@changelog` only.
Entities and elements are annotated with `@changelog`.

The underlying structure of how the Change Tracking data model is stored is as follows:

<img src="./assets/DataModel.drawio.svg" alt="Data Subjects.drawio" style="zoom:111%;" />

The main entity `ChangeLog` contains the `changes` property, which is a `Composition of many Changes`. These changes contain all the detailed information on the changes performed in a draft event and are stored in `Changes`.

The view `ChangeView` provides a summary of all of detailed change records. Here, the `Object ID` and `Parent Object ID` are meaningful and human-readable string patterns which we have annotated above when setting the identifiers. Note, that by implementing Object ID and parent Object ID, change history could be displayed in hierarchy.
Expand Down

0 comments on commit ab64089

Please sign in to comment.