diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 677d2e1..a49472a 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -82,31 +82,11 @@ model register { time DateTime @default(now()) @db.Timestamp(0) } -/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments -model scratch_favo { - id Int @default(autoincrement()) @db.UnsignedInt - userid Int @db.UnsignedInt - projectid Int @db.UnsignedInt - time DateTime? @default(now()) @db.Timestamp(0) - - @@id([id, userid, projectid]) -} - -/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments -model scratch_like { - id Int @default(autoincrement()) @db.UnsignedInt - userid Int @db.UnsignedInt - projectid Int @db.UnsignedInt - time DateTime? @default(now()) @db.Timestamp(0) - - @@id([id, userid, projectid]) -} - /// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments model ow_projects { id Int @id @default(autoincrement()) @db.UnsignedInt type String? @default("text") @db.VarChar(32) - license String? @db.VarChar(32) + licence String? @db.VarChar(32) authorid Int teacherid Int? @default(0) @db.UnsignedInt state String? @default("private") @db.VarChar(32) @@ -239,83 +219,3 @@ model scratch { description String? @default("OurWorld上的Scratch项目") @db.VarChar(1000) src String? @db.MediumText } - -model sys_ini { - id Int @id @default(autoincrement()) @db.UnsignedInt - iniKey String? @db.Char(16) - iniValue String? @db.Char(64) -} - -/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments -model user { - id String @unique(map: "id_UNIQUE") @db.VarChar(32) - username String @unique(map: "user_UNIQUE") @db.Char(100) - pwd String @db.Char(100) - display_name String @default("OurWorld创作者") @db.Char(20) - state Int @default(0) @db.TinyInt - loginTime DateTime? @db.Timestamp(0) - regTime DateTime? @default(now()) @db.Timestamp(0) - sex Int? @default(0) @db.TinyInt - birthday DateTime? @default(dbgenerated("'2000-04-01 00:00:00'")) @db.Timestamp(0) - motto String? @default("OurWorld创作者") @db.VarChar(1000) - images String? @default("头像") @db.VarChar(255) - - @@id([id, username]) -} - -model wl_comment { - id Int @id @default(autoincrement()) @db.UnsignedInt - user_id Int? - comment String? @db.Text - insertedAt DateTime? @default(now()) @db.Timestamp(0) - ip String? @default("") @db.VarChar(100) - link String? @db.VarChar(255) - mail String? @db.VarChar(255) - nick String? @db.VarChar(255) - pid Int? - rid Int? - sticky Boolean? - status String @default("") @db.VarChar(50) - like Int? - ua String? @db.Text - url String? @db.VarChar(255) - createdAt DateTime? @default(now()) @db.Timestamp(0) - updatedAt DateTime? @default(now()) @db.Timestamp(0) -} - -model wl_counter { - id Int @id @default(autoincrement()) @db.UnsignedInt - time Int? - reaction0 Int? - reaction1 Int? - reaction2 Int? - reaction3 Int? - reaction4 Int? - reaction5 Int? - reaction6 Int? - reaction7 Int? - reaction8 Int? - url String @default("") @db.VarChar(255) - createdAt DateTime? @default(now()) @db.Timestamp(0) - updatedAt DateTime? @default(now()) @db.Timestamp(0) -} - -model wl_users { - id Int @id @default(autoincrement()) @db.UnsignedInt - display_name String @default("") @db.VarChar(255) - email String @default("") @db.VarChar(255) - password String @default("") @db.VarChar(255) - type String @default("") @db.VarChar(50) - label String? @db.VarChar(255) - url String? @db.VarChar(255) - avatar String? @db.VarChar(255) - github String? @db.VarChar(255) - twitter String? @db.VarChar(255) - facebook String? @db.VarChar(255) - google String? @db.VarChar(255) - weibo String? @db.VarChar(255) - qq String? @db.VarChar(255) - fa String? @map("2fa") @db.VarChar(32) - createdAt DateTime? @default(now()) @db.Timestamp(0) - updatedAt DateTime? @default(now()) @db.Timestamp(0) -} diff --git a/server/router_search.js b/server/router_search.js index 0ed4739..da36fa8 100644 --- a/server/router_search.js +++ b/server/router_search.js @@ -16,7 +16,7 @@ router.get("/", async function (req, res) { userid: req.query.search_userid, type: req.query.search_type, title: req.query.search_title, - src: req.query.search_src, + source: req.query.search_source, description: req.query.search_description, orderby: req.query.search_orderby, tags: req.query.search_tag,