feat(api): add upvote/downvote and best-entry endpoints to performance entries

This commit is contained in:
2026-04-25 18:55:48 +08:00
parent c3a85d1336
commit 5dd30665f7
3 changed files with 172 additions and 2 deletions
+5
View File
@@ -1,5 +1,6 @@
import {
boolean,
integer,
jsonb,
pgEnum,
pgTable,
@@ -68,6 +69,10 @@ export const performanceEntries = pgTable(
isRemoved: boolean("is_removed").default(false).notNull(),
removedReason: text("removed_reason"),
// Community rating
upvotes: integer("upvotes").default(0).notNull(),
downvotes: integer("downvotes").default(0).notNull(),
// Verification (admin/mod workflow)
verifiedAt: timestamp("verified_at"),
verifiedBy: text("verified_by").references(() => user.id, {