first commit
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
import type Group from "./group";
|
||||
import type Item from "./item";
|
||||
import type { LogResult } from "./log";
|
||||
|
||||
export default interface Goal {
|
||||
id: string
|
||||
groupId: string
|
||||
startTime: string
|
||||
endTime: string
|
||||
amount: number
|
||||
name: string
|
||||
description: string
|
||||
}
|
||||
|
||||
export interface GoalFilter {
|
||||
minTime?: Date
|
||||
maxTime?: Date
|
||||
includesTime?: Date
|
||||
}
|
||||
|
||||
export interface GoalResult extends Goal {
|
||||
group: Group
|
||||
items: GoalResultItem[]
|
||||
logs: LogResult[]
|
||||
completedAmount: number
|
||||
}
|
||||
|
||||
interface GoalResultItem extends Item {
|
||||
completedAmount: number
|
||||
}
|
||||
|
||||
export interface GoalInput {
|
||||
groupId: string
|
||||
startTime: string | Date
|
||||
endTime: string | Date
|
||||
amount: number
|
||||
name: string
|
||||
description: string
|
||||
}
|
||||
|
||||
export interface GoalUpdate {
|
||||
startTime?: string | Date
|
||||
endTime?: string | Date
|
||||
amount?: number
|
||||
name?: string
|
||||
description?: string
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import type Item from "./item";
|
||||
|
||||
export default interface Group {
|
||||
id: string
|
||||
name: string
|
||||
icon: string
|
||||
description: string
|
||||
}
|
||||
|
||||
export interface GroupResult extends Group {
|
||||
items: Item[]
|
||||
}
|
||||
|
||||
export interface GroupInput {
|
||||
name: string
|
||||
icon: string
|
||||
description: string
|
||||
}
|
||||
|
||||
export interface GroupUpdate {
|
||||
name?: string
|
||||
icon?: string
|
||||
description?: string
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
import type Group from "./group";
|
||||
|
||||
export default interface Item {
|
||||
id: string
|
||||
groupId: string
|
||||
groupWeight: number
|
||||
icon: string
|
||||
name: string
|
||||
description: string
|
||||
}
|
||||
|
||||
export interface ItemResult extends Item {
|
||||
group: Group
|
||||
}
|
||||
|
||||
export interface ItemInput {
|
||||
groupId: string
|
||||
groupWeight: number
|
||||
name: string
|
||||
description: string
|
||||
}
|
||||
|
||||
export interface ItemUpdate {
|
||||
groupWeight?: number
|
||||
name?: string
|
||||
description?: string
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
import type Task from "./task";
|
||||
|
||||
export default interface Log {
|
||||
id: string
|
||||
taskId: string
|
||||
itemId: string
|
||||
loggedTime: string
|
||||
description: string
|
||||
}
|
||||
|
||||
|
||||
export interface LogFilter {
|
||||
minTime?: Date
|
||||
maxTime?: Date
|
||||
}
|
||||
|
||||
export interface LogResult extends Log {
|
||||
task: Task
|
||||
}
|
||||
|
||||
export interface LogInput {
|
||||
taskId: string
|
||||
loggedTime?: string
|
||||
description: string
|
||||
}
|
||||
|
||||
export interface LogUpdate {
|
||||
loggedTime?: string
|
||||
description?: string
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
import type { TaskResult } from "./task";
|
||||
|
||||
export default interface Project {
|
||||
id: string
|
||||
name: string
|
||||
description: string
|
||||
icon: string
|
||||
active: string
|
||||
createdTime: string
|
||||
endTime?: string
|
||||
}
|
||||
|
||||
export interface ProjectResult extends Project {
|
||||
tasks: TaskResult[]
|
||||
}
|
||||
|
||||
export interface ProjectFilter {
|
||||
active?: boolean
|
||||
expiring?: boolean
|
||||
}
|
||||
|
||||
export interface ProjectInput {
|
||||
name: string
|
||||
description: string
|
||||
icon: string
|
||||
active: boolean
|
||||
endTime?: string | Date
|
||||
}
|
||||
|
||||
export interface ProjectUpdate {
|
||||
name?: string
|
||||
description?: string
|
||||
icon?: string
|
||||
active?: boolean
|
||||
endTime?: string | Date
|
||||
clearEndTime?: boolean
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
import type Item from "./item";
|
||||
import type Log from "./log";
|
||||
|
||||
export default interface Task {
|
||||
id: string
|
||||
itemId: string
|
||||
projectId: string
|
||||
itemAmount: number
|
||||
name: string
|
||||
description: string
|
||||
icon: string
|
||||
active: boolean
|
||||
createdTime: string
|
||||
endTime?: string
|
||||
}
|
||||
|
||||
export interface TaskResult extends Task {
|
||||
item: Item
|
||||
logs: Log[]
|
||||
completedAmount: number
|
||||
}
|
||||
|
||||
export interface TaskInput {
|
||||
itemId: string
|
||||
projectId: string
|
||||
itemAmount: number
|
||||
name: string
|
||||
description: string
|
||||
active: boolean
|
||||
endTime?: string | Date
|
||||
}
|
||||
|
||||
export interface TaskUpdate {
|
||||
itemAmount?: number
|
||||
name?: string
|
||||
description?: string
|
||||
active?: boolean
|
||||
endTime?: string | Date
|
||||
clearEndTime?: boolean
|
||||
}
|
||||
Reference in New Issue
Block a user