32 lines
703 B
TypeScript
32 lines
703 B
TypeScript
export interface TodoDTO {
|
|
id: string;
|
|
title: string;
|
|
details: string | null;
|
|
completed: boolean;
|
|
order: number;
|
|
groupId: string;
|
|
// ISO 8601 strings, not Date -- these cross the server action boundary
|
|
// and get optimistically recomputed client-side (see board-context.tsx),
|
|
// so a plain serializable string is simpler than a Date on both ends.
|
|
createdAt: string;
|
|
updatedAt: string;
|
|
completedAt: string | null;
|
|
}
|
|
|
|
export interface GroupDTO {
|
|
id: string;
|
|
title: string;
|
|
color: string;
|
|
order: number;
|
|
noteContent: string;
|
|
categoryId: string;
|
|
todos: TodoDTO[];
|
|
}
|
|
|
|
export interface CategoryDTO {
|
|
id: string;
|
|
name: string;
|
|
order: number;
|
|
groups: GroupDTO[];
|
|
}
|