DB Schema
Dataset & Collection
Dataset
Optional compiled/aggregated data container at project level.
| Field | Type | Description |
|---|---|---|
id | ObjectId | Primary key |
name | String | Dataset name |
description | String? | Description |
tags | String[] | Tags |
projectId | String | Parent project |
metadata | Json? | Arbitrary metadata |
deletedAt | DateTime? | Soft delete timestamp |
createdAt | DateTime | Created timestamp |
updatedAt | DateTime | Last updated |
Relations: collections: Collection[]
Unique: [projectId, name]
Indexes: projectId, deletedAt, tags
Collection
Named curated collection of references to data across the project. Members are typed references to video segments, track ranges, episodes, or files.
| Field | Type | Description |
|---|---|---|
id | ObjectId | Primary key |
name | String | Collection name |
description | String? | Description |
tags | String[] | Tags |
projectId | String | Parent project |
datasetId | String? | Optional parent Dataset (null = standalone) |
members | Json | Array of typed references (default: []) |
metadata | Json? | Arbitrary metadata |
deletedAt | DateTime? | Soft delete timestamp |
createdAt | DateTime | Created timestamp |
updatedAt | DateTime | Last updated |
Unique: [projectId, name]
Indexes: projectId, datasetId, deletedAt, tags
Example member:
[
{ "kind": "video_segment", "videoId": "...", "startMs": 0, "endMs": 5000 },
{ "kind": "track_range", "trackId": "...", "startIndex": 0, "endIndex": 100 }
]