25 lines
971 B
Plaintext
25 lines
971 B
Plaintext
// 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"
|
|
output = "../generated/prisma"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "postgresql"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
model User {
|
|
id Int @id @default(autoincrement()) // Âíóòðåííèé ID áàçû
|
|
telegramId BigInt @unique // ID èç Òåëåãðàìà (BigInt îáÿçàòåëåí)
|
|
username String? // Íèêíåéì (ìîæåò íå áûòü)
|
|
fio String? // ÔÈÎ (Èìÿ + Ôàìèëèÿ)
|
|
createdAt DateTime @default(now()) // Äàòà ïåðâîãî îáðàùåíèÿ ê áîòó
|
|
|
|
@@map("users") // Íåîáÿçàòåëüíî: äåëàåò èìÿ òàáëèöû â ÁÄ "users" (ìíîæåñòâåííîå ÷èñëî)
|
|
} |