feat(auth): setup base auth domain
This commit is contained in:
21
prisma/schema/auth.prisma
Normal file
21
prisma/schema/auth.prisma
Normal file
@@ -0,0 +1,21 @@
|
||||
model AuthIdentity {
|
||||
id String @id @default(uuid())
|
||||
email String @unique
|
||||
password String
|
||||
isVerified Boolean @default(false)
|
||||
createdAt DateTime @default(now())
|
||||
organizationMemberships OrganizationUserMembership[]
|
||||
verifications AuthVerification[]
|
||||
sentInvitations OrganizationInvitation[]
|
||||
}
|
||||
|
||||
model AuthVerification {
|
||||
id String @id @default(uuid())
|
||||
identityId String
|
||||
magicToken String
|
||||
createdAt DateTime @default(now())
|
||||
acceptedAt DateTime?
|
||||
isAccepted Boolean @default(false)
|
||||
isRevoked Boolean @default(false)
|
||||
identity AuthIdentity @relation(fields: [identityId], references: [id])
|
||||
}
|
||||
Reference in New Issue
Block a user