Update:PROFILE API's and create get users api's with pagination
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
-- CreateEnum
|
||||
CREATE TYPE "ShopStatus" AS ENUM ('ACTIVE', 'SUSPENDED', 'DELETED');
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "Profile" ADD COLUMN "status" "ShopStatus" NOT NULL DEFAULT 'ACTIVE';
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "Users" (
|
||||
"id" TEXT NOT NULL,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
CONSTRAINT "Users_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
@@ -0,0 +1,2 @@
|
||||
-- AlterEnum
|
||||
ALTER TYPE "ShopStatus" ADD VALUE 'INACTIVE';
|
||||
@@ -1,14 +1,19 @@
|
||||
enum ShopStatus {
|
||||
ACTIVE
|
||||
SUSPENDED
|
||||
DELETED
|
||||
INACTIVE
|
||||
}
|
||||
|
||||
model Profile {
|
||||
id String @id @default(uuid())
|
||||
accountId String @unique
|
||||
account Account @relation(fields: [accountId], references: [id], onDelete: Cascade)
|
||||
id String @id @default(uuid())
|
||||
accountId String @unique
|
||||
account Account @relation(fields: [accountId], references: [id], onDelete: Cascade)
|
||||
shopName String
|
||||
shopLogo String?
|
||||
contactNumber String?
|
||||
shopAddress String?
|
||||
shopMapLocation String?
|
||||
shopCategory String?
|
||||
|
||||
status ShopStatus @default(ACTIVE)
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
|
||||
model Users {
|
||||
id String @id @default(uuid())
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user