feat: started working with api

This commit is contained in:
2025-06-08 13:41:10 +03:00
parent 5948b9d739
commit 11c6d538b1
19 changed files with 299 additions and 31 deletions

View File

@@ -0,0 +1,14 @@
-- CreateTable
CREATE TABLE "User" (
"id" TEXT NOT NULL,
"tgId" TEXT,
"email" TEXT,
CONSTRAINT "User_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "User_tgId_key" ON "User"("tgId");
-- CreateIndex
CREATE UNIQUE INDEX "User_email_key" ON "User"("email");

View File

@@ -0,0 +1,3 @@
# Please do not edit this file manually
# It should be added in your version-control system (e.g., Git)
provider = "postgresql"

14
prisma/schema.prisma Normal file
View File

@@ -0,0 +1,14 @@
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model User {
id String @id @default(uuid())
tgId String? @unique
email String? @unique
}