You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

57 lines
1.1 KiB

import type Group from "./group";
import type Item from "./item";
import type { LogResult } from "./log";
export default interface Goal {
id: string
groupId: string
itemId?: string
startTime: string
endTime: string
amount: number
name: string
description: string
unweighted: boolean
compositionMode: 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
itemId: string
startTime: string | Date
endTime: string | Date
amount: number
name: string
description: string
unweighted: boolean
compositionMode: string
}
export interface GoalUpdate {
itemId?: string
startTime?: string | Date
endTime?: string | Date
amount?: number
name?: string
description?: string
unweighted?: boolean
compositionMode?: string
clearItemId?: boolean
}