Merge branch 'main' of http://113.45.67.59:3003/linfeng/training_data
This commit is contained in:
commit
181e8c995d
|
@ -49,6 +49,7 @@ model Term {
|
|||
plans Plan[] @relation("plan_term")
|
||||
subject Subject? @relation(fields: [subjectId], references: [id], name: "subject_term")
|
||||
subjectId String?
|
||||
trainPlans TrainPlan[] @relation("TrainPlanTerm")
|
||||
|
||||
@@index([name]) // 对name字段建立索引,以加快基于name的查找速度
|
||||
@@index([parentId]) // 对parentId字段建立索引,以加快基于parentId的查找速度
|
||||
|
@ -227,17 +228,44 @@ model Plan {
|
|||
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") // 计划表
|
||||
termRelations Term[]
|
||||
terms Term[] @relation("plan_term")
|
||||
termRefs Term[]
|
||||
checked Boolean @default(false) @map("checked")
|
||||
depts Department[] @relation("plan_dept")
|
||||
meta Json? @map("meta") // 计划表
|
||||
trainPlans TrainPlan[]
|
||||
|
||||
@@map("plan")
|
||||
}
|
||||
|
||||
model TrainPlan {
|
||||
id String @id @default(cuid())
|
||||
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @map("updated_at")
|
||||
deletedAt DateTime? @map("deleted_at") // 删除时间,可为空
|
||||
|
||||
planId String @map("plan_id")
|
||||
plan Plan @relation(fields: [planId], references: [id])
|
||||
|
||||
terms Term[] @relation("TrainPlanTerm")
|
||||
day DateTime? @map("day") // 日期
|
||||
dayType String? @map("day_type") // 早中晚
|
||||
major String? @map("major") // 专业
|
||||
role String? @map("role") // 身份
|
||||
subject String? @map("subject") //科目
|
||||
course String? @map("course") // 课目
|
||||
trainTime Float? @map("train_time") // 培训时长
|
||||
content String? @map("content") // 内容
|
||||
meta Json? @map("meta") // 其他信息
|
||||
|
||||
@@index([day])
|
||||
@@index([major])
|
||||
@@index([subject])
|
||||
@@index([course])
|
||||
@@map("train_plan")
|
||||
}
|
||||
|
||||
model Subject {
|
||||
id String @id @default(cuid())
|
||||
name String @map("name")
|
||||
|
|
Loading…
Reference in New Issue