Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ERD.puml
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,10 @@ dataclass rights {
' by creating a location record with the same TID
dataclass collection {
!if (SHOW_FIELDS == "true")
type?
collectionTitle
shortCollectionDescription?
collectionDescription?
collectionDescription (Leaflet ref)?
items[]
createdAt
!endif
Expand Down
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -405,19 +405,20 @@ Hypercerts-specific lexicons for tracking impact work and claims.

**Lexicon ID:** `org.hypercerts.claim.collection`

**Description:** A collection/group of items (activities and/or other collections). Collections support recursive nesting, allowing collections to contain other collections. Use app.certified.location as a sidecar (same TID) for location metadata.
**Description:** A collection/group of items (activities and/or other collections). Collections support recursive nesting, allowing collections to contain other collections. The optional `type` field can be used to distinguish different collection types (e.g., 'favorites', 'project'). Use app.certified.location as a sidecar (same TID) for location metadata.

**Key:** `tid`

#### Properties

| Property | Type | Required | Description | Comments |
| ---------------------------- | -------- | -------- | ---------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `collectionTitle` | `string` | ✅ | The title of this collection | maxLength: 800, maxGraphemes: 80 |
| `shortCollectionDescription` | `string` | ❌ | Short summary of this collection, suitable for previews and list views | maxLength: 3000, maxGraphemes: 300 |
| `collectionDescription` | `string` | ❌ | Full description of this collection, suitable for detail views | maxLength: 3000, maxGraphemes: 300 |
| `items` | `array` | ✅ | Array of strong references to items in this collection | Items can be activities (`org.hypercerts.claim.activity`) and/or other collections (`org.hypercerts.claim.collection`). Enables recursive nesting. |
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | |
| Property | Type | Required | Description | Comments |
| ---------------------------- | -------- | -------- | ---------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `type` | `string` | ❌ | The type of this collection (e.g., 'favorites', 'project', or any custom type) | Used to distinguish different collection types |
| `collectionTitle` | `string` | ✅ | The title of this collection | maxLength: 800, maxGraphemes: 80 |
| `shortCollectionDescription` | `string` | ❌ | Short summary of this collection, suitable for previews and list views | maxLength: 3000, maxGraphemes: 300 |
| `collectionDescription` | `ref` | ❌ | Rich-text description of this collection, represented as a Leaflet linear document | References must conform to `pub.leaflet.pages.linearDocument#main` |
| `items` | `array` | ✅ | Array of strong references to items in this collection | Items can be activities (`org.hypercerts.claim.activity`) and/or other collections (`org.hypercerts.claim.collection`). Enables recursive nesting. |
| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created | |

#### Example: Creating a Collection with Nested Items

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lexicon": 1,
"id": "org.hypercerts.claim.contribution",
"id": "org.hypercerts.claim.contributor",
"defs": {
"main": {
"type": "record",
Expand Down
Loading