-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.prisma
More file actions
29 lines (25 loc) · 871 Bytes
/
schema.prisma
File metadata and controls
29 lines (25 loc) · 871 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model User {
id String @id @default(uuid())
telegramId BigInt? @unique @map("telegram_id")
username String @unique
password String
env String @default("tg")
isDeleted Boolean @default(false) @map("is_deleted")
createdAt DateTime @default(now()) @map("created_at")
modifiedAt DateTime @updatedAt @map("modified_at")
expiredAt DateTime @default(dbgenerated("(now() + '3 days'::interval)")) @map("expired_at")
isTrial Boolean @default(false) @map("is_trial")
@@index([telegramId])
@@index([username])
@@index([isDeleted])
@@map("users")
}