mirror of
https://github.com/dsoaress/link-free.git
synced 2026-11-28 21:34:44 +00:00
feat: add user and session
This commit is contained in:
11 files changed
+577
-9
No files matched your search
@@ -11,3 +11,22 @@ model Data {
|
||||
id Int @id @default(autoincrement())
|
||||
data String
|
||||
}
|
||||
|
||||
model User {
|
||||
id Int @id @default(autoincrement())
|
||||
username String @unique
|
||||
password String
|
||||
role Role
|
||||
}
|
||||
|
||||
model Session {
|
||||
id String @id @default(cuid())
|
||||
userId Int
|
||||
expiresAt DateTime
|
||||
createdAt DateTime @default(now())
|
||||
}
|
||||
|
||||
enum Role {
|
||||
ADMIN
|
||||
EDITOR
|
||||
}
|
||||
Reference in new issue
Block a user