feat: 初始化 FTB 智能项目管理系统 monorepo 项目结构
包含 Turborepo 配置、Next.js 前端骨架、NestJS 后端骨架、Prisma Schema、 共享类型包、Docker Compose 和环境变量模板。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
14
packages/shared/package.json
Normal file
14
packages/shared/package.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "@ftb/shared",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"main": "./src/index.ts",
|
||||
"types": "./src/index.ts",
|
||||
"scripts": {
|
||||
"type-check": "tsc --noEmit",
|
||||
"lint": "eslint src/"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^5.5.0"
|
||||
}
|
||||
}
|
||||
22
packages/shared/src/enums.ts
Normal file
22
packages/shared/src/enums.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
export enum TaskStatus {
|
||||
TODO = 'todo',
|
||||
IN_PROGRESS = 'in_progress',
|
||||
IN_REVIEW = 'in_review',
|
||||
DONE = 'done',
|
||||
CLOSED = 'closed',
|
||||
}
|
||||
|
||||
export enum ProjectRole {
|
||||
OWNER = 'owner',
|
||||
ADMIN = 'admin',
|
||||
MEMBER = 'member',
|
||||
VIEWER = 'viewer',
|
||||
}
|
||||
|
||||
export enum RequirementStatus {
|
||||
DRAFT = 'draft',
|
||||
REVIEWING = 'reviewing',
|
||||
APPROVED = 'approved',
|
||||
REJECTED = 'rejected',
|
||||
DELIVERED = 'delivered',
|
||||
}
|
||||
2
packages/shared/src/index.ts
Normal file
2
packages/shared/src/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from './enums';
|
||||
export * from './types';
|
||||
68
packages/shared/src/types.ts
Normal file
68
packages/shared/src/types.ts
Normal file
@@ -0,0 +1,68 @@
|
||||
import { TaskStatus, ProjectRole, RequirementStatus } from './enums';
|
||||
|
||||
export interface Product {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}
|
||||
|
||||
export interface Project {
|
||||
id: string;
|
||||
productId: string;
|
||||
name: string;
|
||||
description: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}
|
||||
|
||||
export interface Task {
|
||||
id: string;
|
||||
projectId: string;
|
||||
sprintId: string | null;
|
||||
versionId: string | null;
|
||||
parentId: string | null;
|
||||
title: string;
|
||||
description: string;
|
||||
status: TaskStatus;
|
||||
assigneeId: string | null;
|
||||
creatorId: string;
|
||||
priority: number;
|
||||
startDate: Date | null;
|
||||
dueDate: Date | null;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}
|
||||
|
||||
export interface Requirement {
|
||||
id: string;
|
||||
productId: string;
|
||||
title: string;
|
||||
description: string;
|
||||
status: RequirementStatus;
|
||||
priority: number;
|
||||
creatorId: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}
|
||||
|
||||
export interface Version {
|
||||
id: string;
|
||||
productId: string;
|
||||
name: string;
|
||||
description: string;
|
||||
releaseDate: Date | null;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}
|
||||
|
||||
export interface Sprint {
|
||||
id: string;
|
||||
projectId: string;
|
||||
name: string;
|
||||
startDate: Date;
|
||||
endDate: Date;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
}
|
||||
13
packages/shared/tsconfig.json
Normal file
13
packages/shared/tsconfig.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2020",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"declaration": true,
|
||||
"outDir": "./dist"
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
Reference in New Issue
Block a user