🔧 chore(account): update account module structure and email queue processing
- Enhanced account management with new validation and Swagger documentation. - Updated Prisma schemas and migrations for the account and profile. - Improved email handling mechanisms in the email queue system with new worker functionality. - Adjusted Docker configurations and package dependencies for better integration.
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
-- CreateEnum
|
||||
CREATE TYPE "ROLE" AS ENUM ('ADMIN', 'USER');
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "Account" (
|
||||
"id" TEXT NOT NULL,
|
||||
"email" TEXT NOT NULL,
|
||||
"password" TEXT NOT NULL,
|
||||
"role" "ROLE" NOT NULL DEFAULT 'USER',
|
||||
"lastOtp" TEXT,
|
||||
"lastOtpSendingTime" TIMESTAMP(3),
|
||||
"isDeleted" BOOLEAN NOT NULL DEFAULT false,
|
||||
"isAccountVerified" BOOLEAN NOT NULL DEFAULT false,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
|
||||
CONSTRAINT "Account_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "Profile" (
|
||||
"id" TEXT NOT NULL,
|
||||
"accountId" TEXT NOT NULL,
|
||||
"shopName" TEXT NOT NULL,
|
||||
"shopLogo" TEXT,
|
||||
"contactNumber" TEXT,
|
||||
"shopAddress" TEXT,
|
||||
"shopMapLocation" TEXT,
|
||||
"shopCategory" TEXT,
|
||||
|
||||
CONSTRAINT "Profile_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "Account_email_key" ON "Account"("email");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "Profile_accountId_key" ON "Profile"("accountId");
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "Profile" ADD CONSTRAINT "Profile_accountId_fkey" FOREIGN KEY ("accountId") REFERENCES "Account"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
Reference in New Issue
Block a user