english version and minio console access
This commit is contained in:
@@ -18,9 +18,9 @@ model User {
|
||||
email String @unique
|
||||
password String
|
||||
createdAt DateTime @default(now())
|
||||
plans Plan[] @relation("UserPlans")
|
||||
// plans Plan[] @relation("UserPlans")
|
||||
operator Int @default(0)
|
||||
isAdmin Boolean @default(false) // Админские права
|
||||
isAdmin Boolean @default(false)
|
||||
tickets Ticket[] @relation("UserTickets")
|
||||
responses Response[] @relation("OperatorResponses")
|
||||
checks Check[] @relation("UserChecks")
|
||||
@@ -56,26 +56,13 @@ model Check {
|
||||
@@map("check")
|
||||
}
|
||||
|
||||
model Plan {
|
||||
id Int @id @default(autoincrement())
|
||||
name String @unique
|
||||
price Float
|
||||
description String?
|
||||
isCustom Boolean @default(false)
|
||||
createdAt DateTime @default(now())
|
||||
userId Int
|
||||
owner User @relation("UserPlans", fields: [userId], references: [id])
|
||||
services Service[] @relation("PlanServices")
|
||||
|
||||
@@map("plan")
|
||||
}
|
||||
|
||||
model Service {
|
||||
id Int @id @default(autoincrement())
|
||||
name String @unique
|
||||
price Float
|
||||
planId Int?
|
||||
plan Plan? @relation("PlanServices", fields: [planId], references: [id])
|
||||
// planId Int?
|
||||
// plan Plan? @relation("PlanServices", fields: [planId], references: [id])
|
||||
|
||||
@@map("service")
|
||||
}
|
||||
@@ -473,6 +460,9 @@ model StorageCheckoutSession {
|
||||
planName String
|
||||
planDescription String?
|
||||
price Float
|
||||
promoCodeId Int?
|
||||
promoCode PromoCode? @relation(fields: [promoCodeId], references: [id])
|
||||
promoDiscount Float? @default(0)
|
||||
quotaGb Int
|
||||
bandwidthGb Int
|
||||
requestLimit String
|
||||
@@ -517,4 +507,19 @@ model StorageClass {
|
||||
buckets StorageBucket[] @relation("BucketClass")
|
||||
|
||||
@@map("storage_class")
|
||||
}
|
||||
|
||||
model PromoCode {
|
||||
id Int @id @default(autoincrement())
|
||||
code String @unique
|
||||
amount Float // discount amount in RUB
|
||||
used Boolean @default(false)
|
||||
usedBy Int?
|
||||
usedAt DateTime?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
user User? @relation(fields: [usedBy], references: [id])
|
||||
|
||||
@@map("promo_code")
|
||||
}
|
||||
Reference in New Issue
Block a user