29 lines
587 B
TypeScript
29 lines
587 B
TypeScript
|
import { Task, TaskCategory, TaskID } from './task';
|
||
|
import { Params, DefaultTaskCategories } from "./params";
|
||
|
import { uuidV4 } from "../util/uuid";
|
||
|
|
||
|
export type ProjectID = string;
|
||
|
|
||
|
export interface Project {
|
||
|
id: ProjectID
|
||
|
label: string
|
||
|
description: string
|
||
|
tasks: Tasks
|
||
|
params: Params
|
||
|
}
|
||
|
|
||
|
export interface Tasks {
|
||
|
[id: string]: Task
|
||
|
}
|
||
|
|
||
|
export function newProject(): Project {
|
||
|
return {
|
||
|
id: uuidV4(),
|
||
|
label: "",
|
||
|
description: "",
|
||
|
tasks: {},
|
||
|
params: {
|
||
|
taskCategories: DefaultTaskCategories,
|
||
|
},
|
||
|
};
|
||
|
}
|