02211320
This commit is contained in:
parent
2f42048c5c
commit
db43031fd4
|
@ -45,6 +45,7 @@ model Term {
|
||||||
depts Department[] @relation("department_term")
|
depts Department[] @relation("department_term")
|
||||||
hasChildren Boolean? @default(false) @map("has_children")
|
hasChildren Boolean? @default(false) @map("has_children")
|
||||||
posts Post[] @relation("post_term")
|
posts Post[] @relation("post_term")
|
||||||
|
|
||||||
@@index([name]) // 对name字段建立索引,以加快基于name的查找速度
|
@@index([name]) // 对name字段建立索引,以加快基于name的查找速度
|
||||||
@@index([parentId]) // 对parentId字段建立索引,以加快基于parentId的查找速度
|
@@index([parentId]) // 对parentId字段建立索引,以加快基于parentId的查找速度
|
||||||
@@map("term")
|
@@map("term")
|
||||||
|
@ -221,6 +222,7 @@ model Post {
|
||||||
watchableStaffs Staff[] @relation("post_watch_staff") // 可观看的员工列表,关联 Staff 模型
|
watchableStaffs Staff[] @relation("post_watch_staff") // 可观看的员工列表,关联 Staff 模型
|
||||||
watchableDepts Department[] @relation("post_watch_dept") // 可观看的部门列表,关联 Department 模型
|
watchableDepts Department[] @relation("post_watch_dept") // 可观看的部门列表,关联 Department 模型
|
||||||
meta Json? // 封面url 视频url objectives具体的学习目标 rating评分Int
|
meta Json? // 封面url 视频url objectives具体的学习目标 rating评分Int
|
||||||
|
|
||||||
// 索引
|
// 索引
|
||||||
@@index([type, domainId])
|
@@index([type, domainId])
|
||||||
@@index([authorId, type])
|
@@index([authorId, type])
|
||||||
|
@ -302,8 +304,6 @@ model Visit {
|
||||||
@@map("visit")
|
@@map("visit")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
model Enrollment {
|
model Enrollment {
|
||||||
id String @id @default(cuid()) @map("id")
|
id String @id @default(cuid()) @map("id")
|
||||||
status String @map("status")
|
status String @map("status")
|
||||||
|
@ -404,3 +404,20 @@ model NodeEdge {
|
||||||
@@index([targetId])
|
@@index([targetId])
|
||||||
@@map("node_edge")
|
@@map("node_edge")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
model Animal {
|
||||||
|
id String @id @default(cuid())
|
||||||
|
name String
|
||||||
|
age Int
|
||||||
|
gender Boolean
|
||||||
|
personId String?
|
||||||
|
person Person? @relation(fields: [personId], references: [id])
|
||||||
|
}
|
||||||
|
|
||||||
|
model Person {
|
||||||
|
id String @id @default(cuid())
|
||||||
|
name String
|
||||||
|
age Int
|
||||||
|
gender Boolean
|
||||||
|
animals Animal[]
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue