This commit is contained in:
Rao 2025-03-10 20:31:05 +08:00
parent 2818d7d8f4
commit c91cfa81bc
1 changed files with 37 additions and 6 deletions

View File

@ -68,12 +68,15 @@ model TermAncestry {
}
model Staff {
id String @id @default(cuid())
showname String? @map("showname")
username String @unique @map("username")
avatar String? @map("avatar")
password String? @map("password")
phoneNumber String? @unique @map("phone_number")
id String @id @default(cuid())
showname String? @map("showname")
username String @unique @map("username")
avatar String? @map("avatar")
password String? @map("password")
phoneNumber String? @unique @map("phone_number")
age Int? @map("age")
sex Boolean? @map("sex")
absent Boolean? @map("absent")
domainId String? @map("domain_id")
deptId String? @map("dept_id")
@ -101,6 +104,8 @@ model Staff {
teachedPosts PostInstructor[]
ownedResources Resource[]
traincontent TrainContent[] @relation("StaffTrainContent")
@@index([officerId])
@@index([deptId])
@@index([domainId])
@ -418,3 +423,29 @@ model Person {
gender Boolean
animals Animal[]
}
model TrainContent {
id String @id @default(cuid())
title String @map("title")
score Float? @map("score")
mustTrainTime String @map("must_train_time")
alreadyTrainTime String @map("already_train_time")
type String @map("type")
parentId String? @map("parent_id")
parent TrainContent? @relation("ContentParent", fields: [parentId], references: [id]) // 指向自身
children TrainContent[] @relation("ContentParent") // 指向自身
staff Staff[] @relation("StaffTrainContent")
deletedAt DateTime? @map("deleted_at")
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
@@map("train_content")
}