import { jsonb, pgTable, text, timestamp } from 'drizzle-orm/pg-core';

export const memories = pgTable('memory_records', {
  id: text('id').primaryKey(),
  userId: text('user_id').notNull(),
  orgId: text('org_id'),
  key: text('key').notNull(),
  value: text('value').notNull(),
  embedding: jsonb('embedding').$type<number[]>(),
  createdAt: timestamp('created_at').defaultNow().notNull(),
});
