added slate editor, fixes
This commit is contained in:
parent
1d40d7e15f
commit
bc250e73bb
12 changed files with 828 additions and 16 deletions
|
|
@ -11,6 +11,7 @@ export async function toBookChapterSchema(model: BookChapter): Promise<BookChapt
|
|||
updatedAt: model.createdAt.toISOString(),
|
||||
foreword: model.foreword,
|
||||
footnote: model.footnote,
|
||||
sequenceNumber: model.sequenceNumber,
|
||||
reviewsTotal: await call(async () => {
|
||||
const reviewsCount = await prisma.review.count({
|
||||
where: {
|
||||
|
|
|
|||
|
|
@ -52,6 +52,18 @@ input PaginationFilterInput {
|
|||
size: Int
|
||||
}
|
||||
|
||||
input BookCreateInput {
|
||||
title: String!
|
||||
description: String!
|
||||
}
|
||||
|
||||
input BookChapterCreateInput {
|
||||
title: String!
|
||||
content: String!
|
||||
foreword: String
|
||||
footnote: String
|
||||
}
|
||||
|
||||
input BookManyInput {
|
||||
filter: PaginationFilterInput!
|
||||
}
|
||||
|
|
@ -88,6 +100,7 @@ type BookChapter {
|
|||
updatedAt: String!
|
||||
foreword: String!
|
||||
footnote: String!
|
||||
sequenceNumber: Int!
|
||||
reviewsTotal: Int!
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -59,6 +59,8 @@ model BookChapter {
|
|||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
sequenceNumber Int @default(1)
|
||||
|
||||
title String @db.VarChar(255)
|
||||
foreword String @db.MediumText
|
||||
footnote String @db.MediumText
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue