// 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) level Int @default(0) xp Int @default(0) balance Int @default(0) lastDaily DateTime? vegan Boolean @default(false) trusted Boolean @default(false) activist Boolean @default(false) plus Boolean @default(false) vegCurious Boolean @default(false) convinced Boolean @default(false) muted Boolean @default(false) VerifyUser Verify[] @relation("user") VerifyVerifier Verify[] @relation("verifier") SusUser Sus[] @relation("user") SusMod Sus[] @relation("mod") RestrictUser Restrict[] @relation("user") RestrictMod Restrict[] @relation("mod") BanUser Ban[] @relation("user") BanMod Ban[] @relation("mod") TempBanUser TempBan[] @relation("user") TempBanMod TempBan[] @relation("mod") } model Verify { id Int @id @default(autoincrement()) user User @relation("user", fields: [userId], references: [id]) userId String verifier User? @relation("verifier", fields: [verifierId], references: [id]) verifierId String? time DateTime @default(now()) timedOut Boolean @default(false) // If they got kicked out of verification because they timed out vegan Boolean @default(false) // If they got verified as a vegan text Boolean @default(false) // If they used text verification serverVegan Boolean @default(false) // People that went vegan on the server notes String? } model Sus { id Int @id @default(autoincrement()) user User @relation("user", fields: [userId], references: [id]) userId String mod User @relation("mod", fields: [modId], references: [id]) modId String } model Restrict { id Int @id @default(autoincrement()) user User @relation("user", fields: [userId], references: [id]) userId String mod User @relation("mod", fields: [modId], references: [id]) modId String startTime DateTime @default(now()) endedTime DateTime? reason String } model Ban { id Int @id @default(autoincrement()) user User @relation("user", fields: [userId], references: [id]) userId String mod User @relation("mod", fields: [modId], references: [id]) modId String time DateTime @default(now()) active Boolean @default(true) reason String } model TempBan { id Int @id @default(autoincrement()) user User @relation("user", fields: [userId], references: [id]) userId String mod User @relation("mod", fields: [modId], references: [id]) modId String startTime DateTime @default(now()) endedTime DateTime active Boolean @default(true) reason String }