Compare commits

...

3 Commits

Author SHA1 Message Date
Rao 758678b729 Merge branch 'main' of http://113.45.67.59:3003/linfeng/training_data 2025-04-21 15:50:36 +08:00
Rao bfc595d843 rht 2025-04-21 15:46:52 +08:00
Rao 3ad10be5ca rht 2025-04-21 13:19:51 +08:00
62 changed files with 75 additions and 0 deletions

0
.vscode/settings.json vendored Normal file → Executable file
View File

View File

View File

View File

View File

View File

0
apps/server/src/models/position/dailyTrain.module.ts Normal file → Executable file
View File

0
apps/server/src/models/position/dailyTrain.router.ts Normal file → Executable file
View File

0
apps/server/src/models/position/dailyTrain.service.ts Normal file → Executable file
View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

0
apps/web/src/app/main/daily/page.tsx Normal file → Executable file
View File

0
apps/web/src/app/main/layout/MainHeader.tsx Normal file → Executable file
View File

0
apps/web/src/app/main/layout/MainLayout.tsx Normal file → Executable file
View File

0
apps/web/src/app/main/layout/MainProvider.tsx Normal file → Executable file
View File

0
apps/web/src/app/main/layout/NavigationMenu.tsx Normal file → Executable file
View File

0
apps/web/src/app/main/plan/monthplan/page.tsx Normal file → Executable file
View File

0
apps/web/src/app/main/plan/page.tsx Normal file → Executable file
View File

0
apps/web/src/app/main/plan/weekplan/page.tsx Normal file → Executable file
View File

View File

0
apps/web/src/app/main/sport/page.tsx Normal file → Executable file
View File

0
apps/web/src/app/main/sport/sportPageModal.tsx Normal file → Executable file
View File

0
apps/web/src/app/main/sport/sportPageProvider.tsx Normal file → Executable file
View File

0
apps/web/src/app/main/sport/sportUpdateModal.tsx Normal file → Executable file
View File

0
apps/web/src/app/main/staffpage/page.tsx Normal file → Executable file
View File

0
apps/web/src/app/main/staffpage/staffmodal/page.tsx Normal file → Executable file
View File

0
apps/web/src/app/main/staffpage/stafftable/page.tsx Normal file → Executable file
View File

View File

View File

View File

View File

View File

View File

View File

View File

0
packages/client/src/api/hooks/useSport.ts Normal file → Executable file
View File

0
packages/client/src/api/hooks/useTrainSituation.ts Normal file → Executable file
View File

View File

@ -45,6 +45,10 @@ model Term {
depts Department[] @relation("department_term")
hasChildren Boolean? @default(false) @map("has_children")
posts Post[] @relation("post_term")
Plan Plan? @relation(fields: [planId], references: [id])
planId String?
Subject Subject? @relation(fields: [subjectId], references: [id])
subjectId String?
@@index([name]) // 对name字段建立索引以加快基于name的查找速度
@@index([parentId]) // 对parentId字段建立索引以加快基于parentId的查找速度
@ -420,6 +424,9 @@ model Department {
// watchedPost Post[] @relation("post_watch_dept")
hasChildren Boolean? @default(false) @map("has_children")
planId String?
Plan Plan? @relation(fields: [planId], references: [id])
@@index([parentId])
@@index([isDomain])
@@index([name])
@ -465,6 +472,7 @@ model Staff {
enrollments Enrollment[]
teachedPosts PostInstructor[]
ownedResources Resource[]
Plan Plan[]
@@index([officerId])
@@index([deptId])
@ -529,3 +537,70 @@ model SportStandard {
@@unique([projectId, gender, personType], name: "projectId_gender_personType")
@@map("sport_standard")
}
model Plan {
id String @id @default(cuid())
authorId String? @map("author_id")
author Staff? @relation(fields: [authorId], references: [id]) // 帖子作者,关联 Staff 模型
createdAt DateTime @default(now()) @map("created_at")
publishedAt DateTime? @map("published_at") // 发布时间
updatedAt DateTime @map("updated_at")
deletedAt DateTime? @map("deleted_at") // 删除时间,可为空
terms Term[] @relation("plan_term")
month DateTime @map("month")
week DateTime @map("week")
checked Boolean @default(false) @map("checked")
depts Department[] @relation("plan_dept")
meta Json? @map("meta") // 计划表
@@map("plan")
}
model Subject {
id String @id @default(cuid())
name String @map("name")
terms Term[] @relation("subject_term")
parentId String? @map("parent_id")
parent Subject? @relation("SubjectChildren", fields: [parentId], references: [id]) // 父级帖子,关联 Post 模型
children Subject[] @relation("SubjectChildren") // 子级帖子列表,关联 Post 模型
ancestors SubjectAncestry[] @relation("DescendantToAncestor")
descendants SubjectAncestry[] @relation("AncestorToDescendant")
@@map("subject")
}
model SubjectAncestry {
id String @id @default(cuid())
relDepth Int @map("rel_depth")
ancestorId String? @map("ancestor_id")
ancestor Subject? @relation("DescendantToAncestor", fields: [ancestorId], references: [id])
descendantId String @map("descendant_id")
descendant Subject @relation("AncestorToDescendant", fields: [descendantId], references: [id])
@@index([ancestorId])
@@index([descendantId])
@@index([ancestorId, descendantId])
@@map("subject_ancestry")
}

0
packages/common/src/models/train.ts Normal file → Executable file
View File

0
packages/utils/src/safePrismaQuery.ts Normal file → Executable file
View File