Skip to content

Commit 9f1ce95

Browse files
committed
feat: add Todo seed data for task management
1 parent 8a63287 commit 9f1ce95

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2+
3+
import { defineDataset } from '@objectstack/spec/data';
4+
import { Task } from '../objects/task.object';
5+
6+
const tasks = defineDataset(Task, {
7+
mode: 'upsert',
8+
externalId: 'subject',
9+
records: [
10+
{ subject: 'Learn ObjectStack', status: 'completed', priority: 'high', category: 'work' },
11+
{ subject: 'Build a cool app', status: 'in_progress', priority: 'normal', category: 'work', due_date: new Date(Date.now() + 86400000 * 3) },
12+
{ subject: 'Review PR #102', status: 'completed', priority: 'high', category: 'work' },
13+
{ subject: 'Write Documentation', status: 'not_started', priority: 'normal', category: 'work', due_date: new Date(Date.now() + 86400000) },
14+
{ subject: 'Fix Server bug', status: 'waiting', priority: 'urgent', category: 'work' },
15+
{ subject: 'Buy groceries', status: 'not_started', priority: 'low', category: 'shopping', due_date: new Date() },
16+
{ subject: 'Schedule dentist appointment',status: 'not_started', priority: 'normal', category: 'health', due_date: new Date(Date.now() + 86400000 * 7) },
17+
{ subject: 'Pay utility bills', status: 'not_started', priority: 'high', category: 'finance', due_date: new Date(Date.now() + 86400000 * 2) },
18+
],
19+
});
20+
21+
export const TodoSeedData = [tasks];

0 commit comments

Comments
 (0)