feat: add modelTypes
This commit is contained in:
parent
8416b1f448
commit
7d4ba6249e
91 changed files with 751 additions and 513 deletions
50
src/modelTypes/ITask.ts
Normal file
50
src/modelTypes/ITask.ts
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
import type { Priority } from '@/constants/priorities'
|
||||
|
||||
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'
|
||||
import type {IList} from './IList'
|
||||
import type {IBucket} from './IBucket'
|
||||
|
||||
import type {IRelationKind} from '@/types/IRelationKind'
|
||||
import type {IRepeatAfter} from '@/types/IRepeatAfter'
|
||||
import type {IRepeatMode} from '@/types/IRepeatMode'
|
||||
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
|
||||
relatedTasks: Partial<Record<IRelationKind, ITask>>,
|
||||
attachments: IAttachment[]
|
||||
identifier: string
|
||||
index: number
|
||||
isFavorite: boolean
|
||||
subscription: ISubscription
|
||||
|
||||
position: number
|
||||
kanbanPosition: number
|
||||
|
||||
createdBy: IUser
|
||||
created: Date
|
||||
updated: Date
|
||||
|
||||
listId: IList['id'] // Meta, only used when creating a new task
|
||||
bucketId: IBucket['id']
|
||||
}
|
||||
Reference in a new issue