auth/prisma/schema.prisma

37 lines
694 B
Plaintext
Raw Permalink Normal View History

2022-12-16 15:46:14 +00:00
// 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")
}
2022-12-20 16:37:59 +00:00
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
}