hestia/prisma/schema.prisma
DanMihailescu 992eb07f5c
Lucia Authentication (#8)
* initial lucia installation

* added prismAdapter for lucia

* fixed adapter

* main lucia set

* moved into correct folder

* fixed

* removed npm lock

* removed supabase(i swear)

* Lucia register done

* lucia login done

* removed

* fixed issues with uuid

* fixed all commented issues

* fixed event param

* Update +page.server.ts

Signed-off-by: DanMihailescu <as42554525@yahoo.ca>

* Update lucia.ts

Signed-off-by: DanMihailescu <as42554525@yahoo.ca>

---------

Signed-off-by: DanMihailescu <as42554525@yahoo.ca>
Co-authored-by: Dan Mihailescu <dan.mihailescu5@gmail.com>
2024-12-19 20:06:44 -05:00

48 lines
No EOL
1.1 KiB
Text

// 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"
}
generator pothos {
provider = "prisma-pothos-types"
}
datasource db {
provider = "sqlite"
url = env("DATABASE_URL")
}
model User {
id String @id @default(uuid())
email String? @unique
name String
password String
posts Post[]
sessions Session[]
createdAt DateTime @default(now())
updatedAt DateTime @default(now()) @updatedAt
}
model Session {
id String @id @default(uuid())
expiresAt DateTime
createdAt DateTime @default(now())
updatedAt DateTime @default(now()) @updatedAt
userId String
user User @relation(references: [id], fields: [userId])
}
model Post {
id String @id @default(uuid())
title String
content String
published Boolean? @default(false)
author User @relation(references: [id], fields: [authorId])
authorId String
createdAt DateTime @default(now())
updatedAt DateTime @default(now()) @updatedAt
}