Creating a batch-able notification table for a social media application
model Action { id String @id @default(cuid()) type String // like, reply, follow author_id String source_id String // entry_id, chain_id source_type String // entry, chain author User @relation(fields: [author_id], references: [id]) is_deleted Boolean @default(false) created_at DateTime @default(now()) updated_at DateTime @updatedAt @@index([author_id]) } model Activity { id String @id @default(cuid()) author_id String source_id String source_type String […]