136 lines
2.4 KiB
TypeScript
136 lines
2.4 KiB
TypeScript
export interface User {
|
|||
|
|
id: string
|
||
|
|
username: string
|
||
|
|
displayName: string
|
||
|
|
roleId: string
|
||
|
|
roleName: string
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface Account {
|
||
|
|
id: string
|
||
|
|
username: string
|
||
|
|
displayName: string
|
||
|
|
roleId: string
|
||
|
|
roleName: string
|
||
|
|
isActive: boolean
|
||
|
|
createdAt: string
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface LoginResponse {
|
||
|
|
token: string
|
||
|
|
user: User
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface MenuItem {
|
||
|
|
key: string
|
||
|
|
label: string
|
||
|
|
path: string
|
||
|
|
canView: boolean
|
||
|
|
canCreate: boolean
|
||
|
|
canEdit: boolean
|
||
|
|
canDelete: boolean
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface PermissionEntry {
|
||
|
|
screen: string
|
||
|
|
canView: boolean
|
||
|
|
canCreate: boolean
|
||
|
|
canEdit: boolean
|
||
|
|
canDelete: boolean
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface Role {
|
||
|
|
id: string
|
||
|
|
name: string
|
||
|
|
isSystem: boolean
|
||
|
|
permissions: PermissionEntry[]
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface SaveRoleRequest {
|
||
|
|
name: string
|
||
|
|
permissions: PermissionEntry[]
|
||
|
|
}
|
||
|
|
|
||
|
|
export type ProjectStatus = 'Active' | 'Archived'
|
||
|
|
export type MemberRole = 'Owner' | 'Member'
|
||
|
|
export type DocumentType = 'Folder' | 'Document'
|
||
|
|
export type TaskStatus = 'Todo' | 'InProgress' | 'Done' | 'Cancelled'
|
||
|
|
export type TaskPriority = 'Low' | 'Medium' | 'High'
|
||
|
|
|
||
|
|
export interface Project {
|
||
|
|
id: string
|
||
|
|
name: string
|
||
|
|
description: string | null
|
||
|
|
status: ProjectStatus
|
||
|
|
createdAt: string
|
||
|
|
updatedAt: string
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface ProjectMember {
|
||
|
|
userId: string
|
||
|
|
username: string
|
||
|
|
displayName: string
|
||
|
|
role: MemberRole
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface ProjectOverview {
|
||
|
|
project: Project
|
||
|
|
memberCount: number
|
||
|
|
documentCount: number
|
||
|
|
taskCountsByStatus: Record<string, number>
|
||
|
|
recentTasks: RecentTask[]
|
||
|
|
recentDocuments: RecentDocument[]
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface RecentTask {
|
||
|
|
id: string
|
||
|
|
title: string
|
||
|
|
status: string
|
||
|
|
updatedAt: string
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface RecentDocument {
|
||
|
|
id: string
|
||
|
|
title: string
|
||
|
|
updatedAt: string
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface DocumentNode {
|
||
|
|
id: string
|
||
|
|
parentId: string | null
|
||
|
|
title: string
|
||
|
|
type: DocumentType
|
||
|
|
updatedAt: string
|
||
|
|
children: DocumentNode[]
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface DocumentItem {
|
||
|
|
id: string
|
||
|
|
projectId: string
|
||
|
|
parentId: string | null
|
||
|
|
title: string
|
||
|
|
content: string | null
|
||
|
|
type: DocumentType
|
||
|
|
createdBy: string
|
||
|
|
createdAt: string
|
||
|
|
updatedBy: string | null
|
||
|
|
updatedAt: string
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface Task {
|
||
|
|
id: string
|
||
|
|
projectId: string
|
||
|
|
title: string
|
||
|
|
description: string | null
|
||
|
|
status: TaskStatus
|
||
|
|
priority: TaskPriority
|
||
|
|
assigneeId: string | null
|
||
|
|
assigneeName: string | null
|
||
|
|
dueDate: string | null
|
||
|
|
createdAt: string
|
||
|
|
updatedAt: string
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface TaskCounts {
|
||
|
|
[status: string]: number
|
||
|
|
}
|