FreePS/prisma/schema.prisma

53 lines
1.3 KiB
Plaintext

// 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"
binaryTargets = ["native", "debian-openssl-3.0.x"]
}
datasource db {
provider = "sqlite"
url = env("DATABASE_URL")
}
model User {
id Int @id @default(autoincrement())
phone String @unique
username String?
password String
applications Application[]
loginlogs Loginlogs[]
}
model Adminer {
id Int @id @default(autoincrement())
adminId Int
}
model Application {
id Int @id @default(autoincrement())
name String
area String
cpu Int
ram Int
disk Int
desc String
deploy Boolean @default(false)
applicant User @relation(fields: [applicantId], references: [id])
applicantId Int
}
model Register {
id Int @id @default(autoincrement())
phone String
deadline DateTime
code String
}
model Loginlogs {
id Int @id @default(autoincrement())
outtime DateTime
ip String
loginer User @relation(fields: [userid], references: [id])
userid Int
token String @unique
}