|
| 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