auth/prisma/schema.prisma

37 lines
694 B
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"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model Auth {
uuid String @id @db.Uuid
password String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@map("auth")
}
model Username {
username String @id
uuid String @db.Uuid
type Type @default(EMAIL) // type is needed in case of username update
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@unique([uuid, type])
@@map("username")
}
enum Type {
EMAIL
PHONE
}