mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:21:09 +02:00
Integrated techbase (software comparison platform) into monorepo structure: - Created NestJS backend with votes and comments modules - Migrated from external Supabase to own PostgreSQL - Set up Drizzle ORM schema for votes and comments - Created API client replacing Supabase in Astro frontend - Added environment configuration (port 3021) Archived immediately as it's not yet ready for active development. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
17 lines
763 B
TypeScript
17 lines
763 B
TypeScript
import { pgTable, uuid, varchar, text, boolean, timestamp } from 'drizzle-orm/pg-core';
|
|
|
|
export const comments = pgTable('comments', {
|
|
id: uuid('id').defaultRandom().primaryKey(),
|
|
softwareId: varchar('software_id', { length: 255 }).notNull(),
|
|
userName: varchar('user_name', { length: 100 }).notNull(),
|
|
comment: text('comment').notNull(),
|
|
ipHash: varchar('ip_hash', { length: 255 }).notNull(),
|
|
isApproved: boolean('is_approved').default(false),
|
|
isSpam: boolean('is_spam').default(false),
|
|
moderatedAt: timestamp('moderated_at'),
|
|
moderatedBy: varchar('moderated_by', { length: 255 }),
|
|
createdAt: timestamp('created_at').defaultNow().notNull(),
|
|
});
|
|
|
|
export type Comment = typeof comments.$inferSelect;
|
|
export type NewComment = typeof comments.$inferInsert;
|