2022-10-02 11:01:29 +00:00
|
|
|
import type {Priority} from '@/constants/priorities'
|
2022-08-04 18:57:43 +00:00
|
|
|
|
|
|
|
import type {IAbstract} from './IAbstract'
|
|
|
|
import type {IUser} from './IUser'
|
|
|
|
import type {ILabel} from './ILabel'
|
|
|
|
import type {IAttachment} from './IAttachment'
|
|
|
|
import type {ISubscription} from './ISubscription'
|
2022-11-13 21:04:57 +00:00
|
|
|
import type {IProject} from './IProject'
|
2022-08-04 18:57:43 +00:00
|
|
|
import type {IBucket} from './IBucket'
|
|
|
|
|
|
|
|
import type {IRelationKind} from '@/types/IRelationKind'
|
|
|
|
import type {IRepeatAfter} from '@/types/IRepeatAfter'
|
|
|
|
import type {IRepeatMode} from '@/types/IRepeatMode'
|
2022-10-02 11:01:29 +00:00
|
|
|
|
2022-10-18 13:55:41 +00:00
|
|
|
import type {PartialWithId} from '@/types/PartialWithId'
|
|
|
|
|
2022-08-04 18:57:43 +00:00
|
|
|
export interface ITask extends IAbstract {
|
|
|
|
id: number
|
|
|
|
title: string
|
|
|
|
description: string
|
|
|
|
done: boolean
|
|
|
|
doneAt: Date | null
|
|
|
|
priority: Priority
|
|
|
|
labels: ILabel[]
|
|
|
|
assignees: IUser[]
|
|
|
|
|
|
|
|
dueDate: Date | null
|
|
|
|
startDate: Date | null
|
|
|
|
endDate: Date | null
|
|
|
|
repeatAfter: number | IRepeatAfter
|
|
|
|
repeatFromCurrentDate: boolean
|
|
|
|
repeatMode: IRepeatMode
|
|
|
|
reminderDates: Date[]
|
|
|
|
parentTaskId: ITask['id']
|
|
|
|
hexColor: string
|
|
|
|
percentDone: number
|
2022-10-02 11:01:29 +00:00
|
|
|
relatedTasks: Partial<Record<IRelationKind, ITask[]>>
|
2022-08-04 18:57:43 +00:00
|
|
|
attachments: IAttachment[]
|
2022-11-01 13:27:35 +00:00
|
|
|
coverImageAttachmentId: IAttachment['id'] | null
|
2022-08-04 18:57:43 +00:00
|
|
|
identifier: string
|
|
|
|
index: number
|
|
|
|
isFavorite: boolean
|
|
|
|
subscription: ISubscription
|
|
|
|
|
|
|
|
position: number
|
|
|
|
kanbanPosition: number
|
|
|
|
|
|
|
|
createdBy: IUser
|
|
|
|
created: Date
|
|
|
|
updated: Date
|
|
|
|
|
2022-11-13 21:04:57 +00:00
|
|
|
projectId: IProject['id'] // Meta, only used when creating a new task
|
2022-08-04 18:57:43 +00:00
|
|
|
bucketId: IBucket['id']
|
2022-10-18 13:55:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export type ITaskPartialWithId = PartialWithId<ITask>
|