feat(bot): add session management and user tracking

- Implement Prisma storage adapter for Telegram session management
- Add middleware to upsert Telegram user data
- Extend TelegramUser model with additional fields
- Add db:push command to turbo.json and package.json
- Extend Prisma client with exists helper method
This commit is contained in:
Yuu Ottosoka
2025-07-09 20:36:07 +03:00
parent 84760349c0
commit 49f0385d00
8 changed files with 115 additions and 15 deletions

View File

@@ -22,9 +22,13 @@ model TelegramSession {
}
model TelegramUser {
id String @id
username String?
isBlocked Boolean @default(false)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
id String @id
username String?
isBlocked Boolean @default(false)
firstName String?
lastName String?
languageCode String?
isPremium Boolean?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}