unreal-chat/apps/api/prisma/schema.prisma
Juan Sebastian Montoya 3d41e2cc42 feat: add emoji picker to chat room message input
- Integrated emoji-picker-element library for emoji selection
- Added emoji toggle button in message input container
- Implemented emoji picker show/hide functionality
- Created CSS styles for emoji picker positioning
- Added event handling for emoji selection and outside click
- Updated package.json to include emoji-picker-element dependency
- Modified Prisma schema to use TEXT type for message content
- Updated Prisma migration scripts to use dotenv for environment configuration
2025-03-07 00:41:25 -05:00

50 lines
1.4 KiB
Text

// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?
// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "mysql"
url = env("DATABASE_URL")
}
model User {
id String @id @default(uuid())
email String @unique
username String @unique
password String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
messages Message[]
rooms Room[] @relation("RoomMembers")
ownedRooms Room[] @relation("RoomOwner")
}
model Room {
id String @id @default(uuid())
name String
description String?
isPrivate Boolean @default(false)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
messages Message[]
members User[] @relation("RoomMembers")
ownerId String
owner User @relation("RoomOwner", fields: [ownerId], references: [id])
}
model Message {
id String @id @default(uuid())
content String @db.Text
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
userId String
user User @relation(fields: [userId], references: [id])
roomId String
room Room @relation(fields: [roomId], references: [id])
}