// SPDX-License-Identifier: GPL-3.0-or-later // Animal Rights Advocates Discord Bot // Copyright (C) 2022 Anthony Berg // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . generator client { provider = "prisma-client-js" } datasource db { provider = "postgresql" url = env("DATABASE_URL") } model User { id String @id @db.VarChar(255) vegan Boolean @default(false) trusted Boolean @default(false) activist Boolean @default(false) plus Boolean @default(false) notVegan Boolean @default(false) vegCurious Boolean @default(false) convinced Boolean @default(false) muted Boolean @default(false) VerifyUser Verify[] @relation("verUser") VerifyVerifier Verify[] @relation("verVerifier") SusUser Sus[] @relation("susUser") SusMod Sus[] @relation("susMod") RestrictUser Restrict[] @relation("restUser") RestrictMod Restrict[] @relation("restMod") BanUser Ban[] @relation("banUser") BanMod Ban[] @relation("banMod") BanEndMod Ban[] @relation("endBanMod") TempBanUser TempBan[] @relation("tbanUser") TempBanMod TempBan[] @relation("tbanMod") } model Verify { id String @id user User @relation("verUser", fields: [userId], references: [id]) userId String verifier User? @relation("verVerifier", fields: [verifierId], references: [id]) verifierId String? joinTime DateTime @default(now()) startTime DateTime? finishTime DateTime? timedOut Boolean @default(false) // If they got kicked out of verification because they timed out //complete Boolean @default(false) // If the verification was incomplete // Roles they got from verification vegan Boolean @default(false) // If they got verified as a vegan activist Boolean @default(false) // If they got the activist role when they verified trusted Boolean @default(false) // If they got the trusted role when they verified vegCurious Boolean @default(false) // If they got the Veg Curious role convinced Boolean @default(false) text Boolean @default(false) // If they used text verification serverVegan Boolean @default(false) // People that went vegan on the server // Stats on verification reason Int? where Int? length Int? reasoning Int? life Int? food Int? notes String? } model Sus { id Int @id @default(autoincrement()) user User @relation("susUser", fields: [userId], references: [id]) userId String mod User @relation("susMod", fields: [modId], references: [id]) modId String time DateTime @default(now()) active Boolean @default(true) note String } model Restrict { id Int @id @default(autoincrement()) user User @relation("restUser", fields: [userId], references: [id]) userId String mod User @relation("restMod", fields: [modId], references: [id]) modId String startTime DateTime @default(now()) endedTime DateTime? reason String } model Ban { id Int @id @default(autoincrement()) user User @relation("banUser", fields: [userId], references: [id]) userId String mod User @relation("banMod", fields: [modId], references: [id]) modId String time DateTime @default(now()) endMod User? @relation("endBanMod", fields: [endModId], references: [id]) endModId String? endTime DateTime? active Boolean @default(true) reason String } model TempBan { id Int @id @default(autoincrement()) user User @relation("tbanUser", fields: [userId], references: [id]) userId String mod User @relation("tbanMod", fields: [modId], references: [id]) modId String startTime DateTime @default(now()) endedTime DateTime active Boolean @default(true) reason String }