Initial commit
This commit is contained in:
23
types/kanban.ts
Normal file
23
types/kanban.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { Task, TaskStatus } from './project';
|
||||
|
||||
export interface TaskCard {
|
||||
id: string;
|
||||
title: string;
|
||||
description: string;
|
||||
priority: string;
|
||||
assigneeId?: string;
|
||||
estimatedHours?: number;
|
||||
actualHours?: number;
|
||||
}
|
||||
|
||||
export interface KanbanColumn {
|
||||
status: TaskStatus;
|
||||
title: string;
|
||||
tasks: TaskCard[];
|
||||
}
|
||||
|
||||
export interface KanbanBoard {
|
||||
projectId: string;
|
||||
projectName: string;
|
||||
columns: KanbanColumn[];
|
||||
}
|
||||
90
types/project.ts
Normal file
90
types/project.ts
Normal file
@@ -0,0 +1,90 @@
|
||||
export type ProjectStatus = 'Active' | 'Archived' | 'OnHold';
|
||||
|
||||
export interface Project {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
key: string;
|
||||
status: ProjectStatus;
|
||||
ownerId: string;
|
||||
createdAt: string;
|
||||
updatedAt?: string;
|
||||
}
|
||||
|
||||
export interface CreateProjectDto {
|
||||
name: string;
|
||||
description: string;
|
||||
key: string;
|
||||
ownerId?: string; // Optional in form, will be set automatically
|
||||
}
|
||||
|
||||
export interface UpdateProjectDto {
|
||||
name?: string;
|
||||
description?: string;
|
||||
status?: ProjectStatus;
|
||||
}
|
||||
|
||||
export interface Epic {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
projectId: string;
|
||||
status: TaskStatus;
|
||||
priority: TaskPriority;
|
||||
createdAt: string;
|
||||
createdBy: string;
|
||||
}
|
||||
|
||||
export type TaskStatus = 'ToDo' | 'InProgress' | 'InReview' | 'Done' | 'Blocked';
|
||||
export type TaskPriority = 'Low' | 'Medium' | 'High' | 'Urgent';
|
||||
|
||||
export interface Story {
|
||||
id: string;
|
||||
title: string;
|
||||
description: string;
|
||||
epicId: string;
|
||||
status: TaskStatus;
|
||||
priority: TaskPriority;
|
||||
estimatedHours?: number;
|
||||
actualHours?: number;
|
||||
assigneeId?: string;
|
||||
createdBy: string;
|
||||
createdAt: string;
|
||||
updatedAt?: string;
|
||||
}
|
||||
|
||||
export interface Task {
|
||||
id: string;
|
||||
title: string;
|
||||
description: string;
|
||||
storyId: string;
|
||||
status: TaskStatus;
|
||||
priority: TaskPriority;
|
||||
estimatedHours?: number;
|
||||
actualHours?: number;
|
||||
assigneeId?: string;
|
||||
customFields?: Record<string, any>;
|
||||
createdBy: string;
|
||||
createdAt: string;
|
||||
updatedAt?: string;
|
||||
}
|
||||
|
||||
export interface CreateTaskDto {
|
||||
title: string;
|
||||
description: string;
|
||||
storyId: string;
|
||||
priority: TaskPriority;
|
||||
estimatedHours?: number;
|
||||
assigneeId?: string;
|
||||
}
|
||||
|
||||
export interface UpdateTaskDto {
|
||||
title?: string;
|
||||
description?: string;
|
||||
status?: TaskStatus;
|
||||
priority?: TaskPriority;
|
||||
estimatedHours?: number;
|
||||
actualHours?: number;
|
||||
assigneeId?: string;
|
||||
customFields?: Record<string, any>;
|
||||
}
|
||||
29
types/user.ts
Normal file
29
types/user.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
export type UserRole = 'Admin' | 'ProjectManager' | 'User';
|
||||
|
||||
export interface User {
|
||||
id: string;
|
||||
email: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
role: UserRole;
|
||||
createdAt: string;
|
||||
updatedAt?: string;
|
||||
}
|
||||
|
||||
export interface LoginDto {
|
||||
email: string;
|
||||
password: string;
|
||||
}
|
||||
|
||||
export interface RegisterDto {
|
||||
email: string;
|
||||
password: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
}
|
||||
|
||||
export interface AuthResponse {
|
||||
accessToken: string;
|
||||
refreshToken: string;
|
||||
user: User;
|
||||
}
|
||||
Reference in New Issue
Block a user