rht
This commit is contained in:
parent
2818d7d8f4
commit
c91cfa81bc
|
@ -68,12 +68,15 @@ model TermAncestry {
|
||||||
}
|
}
|
||||||
|
|
||||||
model Staff {
|
model Staff {
|
||||||
id String @id @default(cuid())
|
id String @id @default(cuid())
|
||||||
showname String? @map("showname")
|
showname String? @map("showname")
|
||||||
username String @unique @map("username")
|
username String @unique @map("username")
|
||||||
avatar String? @map("avatar")
|
avatar String? @map("avatar")
|
||||||
password String? @map("password")
|
password String? @map("password")
|
||||||
phoneNumber String? @unique @map("phone_number")
|
phoneNumber String? @unique @map("phone_number")
|
||||||
|
age Int? @map("age")
|
||||||
|
sex Boolean? @map("sex")
|
||||||
|
absent Boolean? @map("absent")
|
||||||
|
|
||||||
domainId String? @map("domain_id")
|
domainId String? @map("domain_id")
|
||||||
deptId String? @map("dept_id")
|
deptId String? @map("dept_id")
|
||||||
|
@ -101,6 +104,8 @@ model Staff {
|
||||||
teachedPosts PostInstructor[]
|
teachedPosts PostInstructor[]
|
||||||
ownedResources Resource[]
|
ownedResources Resource[]
|
||||||
|
|
||||||
|
traincontent TrainContent[] @relation("StaffTrainContent")
|
||||||
|
|
||||||
@@index([officerId])
|
@@index([officerId])
|
||||||
@@index([deptId])
|
@@index([deptId])
|
||||||
@@index([domainId])
|
@@index([domainId])
|
||||||
|
@ -418,3 +423,29 @@ model Person {
|
||||||
gender Boolean
|
gender Boolean
|
||||||
animals Animal[]
|
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")
|
||||||
|
}
|
Loading…
Reference in New Issue