feat: add prisma support, admin panel and auth

This commit is contained in:
AyrisAI
2026-05-15 19:11:17 +03:00
parent 31c3deb2da
commit 09a105cd1e
29 changed files with 3606 additions and 441 deletions

48
prisma/schema.prisma Normal file
View File

@@ -0,0 +1,48 @@
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
}
model Restaurant {
id String @id @default(cuid())
name String
footerNote String?
categories Category[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model Category {
id String @id @default(cuid())
externalId String?
title String
restaurantId String
restaurant Restaurant @relation(fields: [restaurantId], references: [id])
items Item[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model Item {
id String @id @default(cuid())
name String
ingredients String?
tasteProfile String?
grapeVariety String?
price Json
categoryId String
category Category @relation(fields: [categoryId], references: [id])
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model User {
id String @id @default(cuid())
username String @unique
password String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}