diff --git a/src/models/attachment.ts b/src/models/attachment.ts index d2765c4a..c5c9933c 100644 --- a/src/models/attachment.ts +++ b/src/models/attachment.ts @@ -1,9 +1,8 @@ import AbstractModel from './abstractModel' import UserModel, {type IUser} from './user' import FileModel, {type IFile} from './file' -import type {IAbstract} from './abstractModel' -export interface IAttachment extends IAbstract { +export interface IAttachment extends AbstractModel { id: number taskId: number createdBy: IUser diff --git a/src/models/avatar.ts b/src/models/avatar.ts index e6a67091..411e3cd3 100644 --- a/src/models/avatar.ts +++ b/src/models/avatar.ts @@ -1,8 +1,8 @@ -import AbstractModel, { type IAbstract } from './abstractModel' +import AbstractModel from './abstractModel' export type AvatarProvider = 'default' | 'initials' | 'gravatar' | 'marble' | 'upload' -export interface IAvatar extends IAbstract { +export interface IAvatar extends AbstractModel { avatarProvider: AvatarProvider } diff --git a/src/models/backgroundImage.ts b/src/models/backgroundImage.ts index a5dbf8d7..21be0773 100644 --- a/src/models/backgroundImage.ts +++ b/src/models/backgroundImage.ts @@ -1,6 +1,6 @@ -import AbstractModel, { type IAbstract } from './abstractModel' +import AbstractModel from './abstractModel' -export interface IBackgroundImage extends IAbstract { +export interface IBackgroundImage extends AbstractModel { id: number url: string thumb: string diff --git a/src/models/bucket.ts b/src/models/bucket.ts index 89bca3e9..f4b43759 100644 --- a/src/models/bucket.ts +++ b/src/models/bucket.ts @@ -1,8 +1,8 @@ -import AbstractModel, { type IAbstract } from './abstractModel' +import AbstractModel from './abstractModel' import UserModel, { type IUser } from './user' import TaskModel, { type ITask } from './task' -export interface IBucket extends IAbstract { +export interface IBucket extends AbstractModel { id: number title: string listId: number diff --git a/src/models/caldavToken.ts b/src/models/caldavToken.ts index 5604eb42..b2186b0a 100644 --- a/src/models/caldavToken.ts +++ b/src/models/caldavToken.ts @@ -1,6 +1,6 @@ -import AbstractModel, { type IAbstract } from './abstractModel' +import AbstractModel from './abstractModel' -export interface ICaldavToken extends IAbstract { +export interface ICaldavToken extends AbstractModel { id: number; created: Date; } diff --git a/src/models/emailUpdate.ts b/src/models/emailUpdate.ts index 2258176e..4f6f4385 100644 --- a/src/models/emailUpdate.ts +++ b/src/models/emailUpdate.ts @@ -1,6 +1,6 @@ import AbstractModel from './abstractModel' -interface IEmailUpdate { +interface IEmailUpdate extends AbstractModel { newEmail: string password: string } diff --git a/src/models/file.ts b/src/models/file.ts index c6248baf..81240a79 100644 --- a/src/models/file.ts +++ b/src/models/file.ts @@ -1,6 +1,6 @@ import AbstractModel from './abstractModel' -export interface IFile { +export interface IFile extends AbstractModel { id: number mime: string name: string diff --git a/src/models/label.ts b/src/models/label.ts index a4dd7270..75a104e3 100644 --- a/src/models/label.ts +++ b/src/models/label.ts @@ -4,7 +4,7 @@ import {colorIsDark} from '@/helpers/color/colorIsDark' const DEFAULT_LABEL_BACKGROUND_COLOR = 'e8e8e8' -export interface ILabel { +export interface ILabel extends AbstractModel { id: number title: string hexColor: string diff --git a/src/models/labelTask.ts b/src/models/labelTask.ts index 80dee9de..2179f9a8 100644 --- a/src/models/labelTask.ts +++ b/src/models/labelTask.ts @@ -1,6 +1,6 @@ import AbstractModel from './abstractModel' -interface ILabel { +interface ILabel extends AbstractModel { id: number taskId: number labelId: number diff --git a/src/models/linkShare.ts b/src/models/linkShare.ts index 1b1ae880..10100ee4 100644 --- a/src/models/linkShare.ts +++ b/src/models/linkShare.ts @@ -1,8 +1,8 @@ -import AbstractModel, { type IAbstract } from './abstractModel' +import AbstractModel from './abstractModel' import UserModel, { type IUser } from './user' import {RIGHTS, type Right} from '@/models/constants/rights' -export interface ILinkShare extends IAbstract { +export interface ILinkShare extends AbstractModel { id: number hash: string right: Right diff --git a/src/models/list.ts b/src/models/list.ts index a3426f84..7ced8929 100644 --- a/src/models/list.ts +++ b/src/models/list.ts @@ -1,4 +1,4 @@ -import AbstractModel, { type IAbstract } from '@/models/abstractModel' +import AbstractModel from '@/models/abstractModel' import TaskModel, { type ITask } from '@/models/task' import UserModel, { type IUser } from '@/models/user' import SubscriptionModel, { type ISubscription } from '@/models/subscription' @@ -6,7 +6,7 @@ import type { INamespace } from '@/models/namespace' import {getSavedFilterIdFromListId} from '@/helpers/savedFilter' -export interface IList extends IAbstract { +export interface IList extends AbstractModel { id: number title: string description: string diff --git a/src/models/listDuplicateModel.ts b/src/models/listDuplicateModel.ts index bc3272ce..40896537 100644 --- a/src/models/listDuplicateModel.ts +++ b/src/models/listDuplicateModel.ts @@ -2,7 +2,7 @@ import AbstractModel from './abstractModel' import ListModel, { type IList } from './list' import type { INamespace } from './namespace' -export interface ListDuplicate { +export interface ListDuplicate extends AbstractModel { listId: number namespaceId: INamespace['id'] list: IList diff --git a/src/models/namespace.ts b/src/models/namespace.ts index ee120a96..5d8c608c 100644 --- a/src/models/namespace.ts +++ b/src/models/namespace.ts @@ -1,9 +1,9 @@ -import AbstractModel, { type IAbstract } from './abstractModel' +import AbstractModel from './abstractModel' import ListModel, { type IList } from './list' import UserModel, { type IUser } from './user' import SubscriptionModel, { type ISubscription } from '@/models/subscription' -export interface INamespace extends IAbstract { +export interface INamespace extends AbstractModel { id: number title: string description: string diff --git a/src/models/notification.ts b/src/models/notification.ts index a2156320..4d9f48ab 100644 --- a/src/models/notification.ts +++ b/src/models/notification.ts @@ -40,7 +40,7 @@ interface NotificationMemberAdded extends Notification { team: ITeam } -export interface INotification { +export interface INotification extends AbstractModel { id: number name: string notification: NotificationTask | NotificationAssigned | NotificationDeleted | NotificationCreated | NotificationMemberAdded diff --git a/src/models/passwordReset.ts b/src/models/passwordReset.ts index 0dc8ebed..dd05f37a 100644 --- a/src/models/passwordReset.ts +++ b/src/models/passwordReset.ts @@ -1,6 +1,6 @@ import AbstractModel from './abstractModel' -export interface IPasswordReset { +export interface IPasswordReset extends AbstractModel { token: string newPassword: string email: string diff --git a/src/models/passwordUpdate.ts b/src/models/passwordUpdate.ts index a91a59c1..51640e32 100644 --- a/src/models/passwordUpdate.ts +++ b/src/models/passwordUpdate.ts @@ -1,6 +1,6 @@ import AbstractModel from '@/models/abstractModel' -export interface IPasswordUpdate { +export interface IPasswordUpdate extends AbstractModel { newPassword: string oldPassword: string } diff --git a/src/models/savedFilter.ts b/src/models/savedFilter.ts index 60c0521c..16861306 100644 --- a/src/models/savedFilter.ts +++ b/src/models/savedFilter.ts @@ -1,7 +1,7 @@ import AbstractModel from '@/models/abstractModel' import UserModel, { type IUser } from '@/models/user' -export interface ISavedFilter { +export interface ISavedFilter extends AbstractModel { id: 0 title: string description: string diff --git a/src/models/subscription.ts b/src/models/subscription.ts index 013aef7d..bd52d0d6 100644 --- a/src/models/subscription.ts +++ b/src/models/subscription.ts @@ -1,7 +1,7 @@ import AbstractModel from '@/models/abstractModel' import UserModel, { type IUser } from '@/models/user' -export interface ISubscription { +export interface ISubscription extends AbstractModel { id: number entity: string // FIXME: correct type? entityId: number // FIXME: correct type? diff --git a/src/models/task.ts b/src/models/task.ts index 518c53a2..92003d6d 100644 --- a/src/models/task.ts +++ b/src/models/task.ts @@ -26,7 +26,7 @@ export interface RepeatAfter { amount: number } -export interface ITask { +export interface ITask extends AbstractModel { id: number title: string description: string diff --git a/src/models/taskAssignee.ts b/src/models/taskAssignee.ts index 800e50af..5ceb15ad 100644 --- a/src/models/taskAssignee.ts +++ b/src/models/taskAssignee.ts @@ -2,7 +2,7 @@ import AbstractModel from './abstractModel' import type { ITask } from './task' import type { IUser } from './user' -export interface ITaskAssignee { +export interface ITaskAssignee extends AbstractModel { created: Date userId: IUser['id'] taskId: ITask['id'] diff --git a/src/models/taskComment.ts b/src/models/taskComment.ts index 93d58958..15ca3b6d 100644 --- a/src/models/taskComment.ts +++ b/src/models/taskComment.ts @@ -2,7 +2,7 @@ import AbstractModel from './abstractModel' import UserModel, { type IUser } from './user' import type { ITask } from './task' -export interface ITaskComment { +export interface ITaskComment extends AbstractModel { id: number taskId: ITask['id'] comment: string diff --git a/src/models/taskRelation.ts b/src/models/taskRelation.ts index 2f3b54cb..e86e9dab 100644 --- a/src/models/taskRelation.ts +++ b/src/models/taskRelation.ts @@ -19,7 +19,7 @@ export const RELATION_KINDS = [...Object.values(RELATION_KIND)] as const export type RelationKind = typeof RELATION_KINDS[number] -export interface ITaskRelationModel { +export interface ITaskRelationModel extends AbstractModel { id: number otherTaskId: ITask['id'] taskId: ITask['id'] diff --git a/src/models/team.ts b/src/models/team.ts index e76fa216..b81c99d8 100644 --- a/src/models/team.ts +++ b/src/models/team.ts @@ -3,7 +3,7 @@ import UserModel, { type IUser } from './user' import TeamMemberModel, { type ITeamMember } from './teamMember' import {RIGHTS, type Right} from '@/models/constants/rights' -export interface ITeam { +export interface ITeam extends AbstractModel { id: number name: string description: string diff --git a/src/models/teamList.ts b/src/models/teamList.ts index 0dce79b6..d3bbb42a 100644 --- a/src/models/teamList.ts +++ b/src/models/teamList.ts @@ -1,7 +1,7 @@ import TeamShareBaseModel from './teamShareBase' import type { IList } from './list' -export interface ITeamList { +export interface ITeamList extends TeamShareBaseModel { listId: IList['id'] } diff --git a/src/models/teamMember.ts b/src/models/teamMember.ts index ee6eb161..f699408a 100644 --- a/src/models/teamMember.ts +++ b/src/models/teamMember.ts @@ -1,7 +1,7 @@ import UserModel from './user' import type { IList } from './list' -export interface ITeamMember { +export interface ITeamMember extends UserModel { admin: boolean teamId: IList['id'] } diff --git a/src/models/teamNamespace.ts b/src/models/teamNamespace.ts index a550bbee..2064d141 100644 --- a/src/models/teamNamespace.ts +++ b/src/models/teamNamespace.ts @@ -1,7 +1,7 @@ import TeamShareBaseModel from './teamShareBase' import type { INamespace } from './namespace' -export interface ITeamNamespace { +export interface ITeamNamespace extends TeamShareBaseModel { namespaceId: INamespace['id'] } diff --git a/src/models/teamShareBase.ts b/src/models/teamShareBase.ts index 3983905c..c3e94370 100644 --- a/src/models/teamShareBase.ts +++ b/src/models/teamShareBase.ts @@ -2,7 +2,7 @@ import AbstractModel from './abstractModel' import {RIGHTS, type Right} from '@/models/constants/rights' import type { ITeam } from './team' -export interface ITeamShareBase { +export interface ITeamShareBase extends AbstractModel { teamId: ITeam['id'] right: Right diff --git a/src/models/totp.ts b/src/models/totp.ts index ab641598..a47044c5 100644 --- a/src/models/totp.ts +++ b/src/models/totp.ts @@ -1,6 +1,6 @@ import AbstractModel from './abstractModel' -export interface ITotp { +export interface ITotp extends AbstractModel { secret: string enabled: boolean url: string diff --git a/src/models/user.ts b/src/models/user.ts index f3908149..eaa472a7 100644 --- a/src/models/user.ts +++ b/src/models/user.ts @@ -1,7 +1,7 @@ import AbstractModel from './abstractModel' import UserSettingsModel, { type IUserSettings } from '@/models/userSettings' -export interface IUser { +export interface IUser extends AbstractModel { id: number email: string username: string diff --git a/src/models/userList.ts b/src/models/userList.ts index 1bc597ad..d0b9cbd3 100644 --- a/src/models/userList.ts +++ b/src/models/userList.ts @@ -1,7 +1,7 @@ import UserShareBaseModel from './userShareBase' import type { IList } from './list' -export interface IUserList { +export interface IUserList extends UserShareBaseModel { listId: IList['id'] } diff --git a/src/models/userNamespace.ts b/src/models/userNamespace.ts index a21995d1..2a11a35e 100644 --- a/src/models/userNamespace.ts +++ b/src/models/userNamespace.ts @@ -1,7 +1,7 @@ import UserShareBaseModel from './userShareBase' import type { INamespace } from './namespace' -export interface IUserNamespace { +export interface IUserNamespace extends UserShareBaseModel { namespaceId: INamespace['id'] } diff --git a/src/models/userSettings.ts b/src/models/userSettings.ts index 4e7fcede..a5db3f80 100644 --- a/src/models/userSettings.ts +++ b/src/models/userSettings.ts @@ -2,7 +2,7 @@ import AbstractModel from './abstractModel' import type { IList } from './list' -export interface IUserSettings { +export interface IUserSettings extends AbstractModel { name: string emailRemindersEnabled: boolean discoverableByName: boolean diff --git a/src/models/userShareBase.ts b/src/models/userShareBase.ts index fadeb894..8eda9ed2 100644 --- a/src/models/userShareBase.ts +++ b/src/models/userShareBase.ts @@ -2,7 +2,7 @@ import AbstractModel from './abstractModel' import {RIGHTS, type Right} from '@/models/constants/rights' import type { IUser } from './user' -export interface IUserShareBase { +export interface IUserShareBase extends AbstractModel { userId: IUser['id'] right: Right