Schema.md (1303B)
1 # Listless Schema Notes 2 3 ## TaskItem 4 - `id: UUID` — stable primary key generated at creation; used as the Boutique `ItemIdentifier`. 5 - `title: String` — UTF-8 text up to 2,048 characters; may be empty or contain only whitespace to represent placeholder rows. Preserve user-entered blank lines. 6 - `createdAt: Date` — timestamp used for deterministic ordering when indexes match. 7 - `updatedAt: Date` — refreshed on every mutation to aid conflict resolution between local cache and iCloud. 8 - `completedOrder: Int64` — monotonically increasing value assigned when a task is completed; higher values sort first (most recently completed at top). Reset to 0 when uncompleted. A value of 0 means the task is active; a value greater than 0 means it is completed. 9 10 ## Storage & Sync 11 - Boutique `Store<TaskItem>` configured with `StorageEngine.cloudKit(appGroup: "net.inqk.listless")` keeps data synced across macOS, iOS, and iPadOS. 12 - Listless uses a single list collection; avoid multiple stores to prevent divergence. 13 - Keep serialization inside `Listless/Sync`; expose helpers that convert between `TaskItem` and CloudKit records if custom fields become necessary. 14 - When adding fields, document them in this file and note whether migrations are required so contributors can coordinate schema bumps.