feedback feature

This commit is contained in:
wass08
2026-02-18 10:26:57 +09:00
parent 1cceb50ab6
commit 9a2c89547b
8 changed files with 209 additions and 89 deletions
@@ -0,0 +1,15 @@
import { pgTable } from 'drizzle-orm/pg-core'
import { createInsertSchema, createSelectSchema } from 'drizzle-zod'
import { id, createdAt } from '../../helpers'
export const feedback = pgTable('feedback', (t) => ({
id: id('feedback'),
userId: t.text('user_id'), // nullable — stores Better Auth user ID or null for anonymous
message: t.text('message').notNull(),
createdAt,
})).enableRLS()
export type Feedback = typeof feedback.$inferSelect
export type NewFeedback = typeof feedback.$inferInsert
export const insertFeedbackSchema = createInsertSchema(feedback)
export const selectFeedbackSchema = createSelectSchema(feedback)
+3
View File
@@ -5,6 +5,9 @@ export * from './auth/sessions'
export * from './auth/users'
export * from './auth/verifications'
// Feedback table
export * from './feedback/feedback'
// Project tables
export * from './projects/addresses'
export * from './projects/likes'