[READ-ONLY] Mirror of https://github.com/thoda-dev/shhh. Self-hostable zero-knowledge pastebin for secrets that expire on their own
docker end-to-end-encryption nuxt nuxtjs pastebin secrets selft-hosted zero-knowledge
Something went wrong. Try again.
1234567891011121314151617import { relations } from 'drizzle-orm'import { pgTable, text, jsonb, timestamp, uuid } from 'drizzle-orm/pg-core'import { users } from './user'
export const adminAuditLog = pgTable('admin_audit_log', { id: uuid('id').defaultRandom().primaryKey(), actorId: text('actor_id').references(() => users.id, { onDelete: 'set null' }), action: text('action').notNull(), targetId: text('target_id'), details: jsonb('details'), createdAt: timestamp('created_at', { withTimezone: true }).notNull().defaultNow()})
export const adminAuditLogRelations = relations(adminAuditLog, ({ one }) => ({ actor: one(users, { fields: [adminAuditLog.actorId], references: [users.id] })}))