diff options
| author | Sébastien Dailly <sebastien@dailly.me> | 2026-11-19 11:32:16 +0100 |
|---|---|---|
| committer | Sébastien Dailly <sebastien@dailly.me> | 2026-11-19 11:32:16 +0100 |
| commit | 8708171877054c98aad45079d85d4e699420f2fe (patch) | |
| tree | 2e580e6891708b7b70d07f7bec03bd0a76ae171b /lib/model/data_list.mli | |
| parent | e1bf7686f408b52a870d4ed4f3c565dbbcc3954f (diff) | |
Added fields in lists
Diffstat (limited to 'lib/model/data_list.mli')
| -rw-r--r-- | lib/model/data_list.mli | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/model/data_list.mli b/lib/model/data_list.mli new file mode 100644 index 0000000..e74bf23 --- /dev/null +++ b/lib/model/data_list.mli @@ -0,0 +1,18 @@ +(** A static list declared in the configuration. + + Unlike contents, lists are not editable by the user: their entries are + loaded by the data provider (from a file or any other source, which is not + part of the model) and they can only be referenced from fields. + + Lists have their own fields, declared directly under the ["field"] key of + the list — unlike contents, there is no section grouping them. The fields + use the same {!Field.t} as the content fields; the only restriction is that + a reference field in a list can only target another list, declared before it + (a list cannot reference itself or a later list). *) + +type 'a t = { + id : Identifier.t; + (** Name of the list; usable as the target of a reference field, and as + the name of its dedicated table in the database *) + fields : 'a Field.t list; (** The fields of each entry of the list *) +} |
