/*
  Warnings:

  - The values [admin] on the enum `userType` will be removed. If these variants are still used in the database, this will fail.

*/
-- AlterEnum
BEGIN;
CREATE TYPE "userType_new" AS ENUM ('buyer', 'seller', 'buyer_team', 'seller_team');
ALTER TABLE "tbl_user" ALTER COLUMN "type" TYPE "userType_new" USING ("type"::text::"userType_new");
ALTER TYPE "userType" RENAME TO "userType_old";
ALTER TYPE "userType_new" RENAME TO "userType";
DROP TYPE "userType_old";
COMMIT;

-- CreateTable
CREATE TABLE "tbl_admin" (
    "id" BIGSERIAL NOT NULL,
    "first_name" VARCHAR(256),
    "last_name" VARCHAR(256),
    "email" VARCHAR(256),
    "password" VARCHAR(256),
    "token" TEXT,
    "forgot_token" TEXT,
    "forgot_token_expiry" TIMESTAMP(0),
    "is_online" BOOLEAN DEFAULT false,
    "is_active" BOOLEAN DEFAULT true,
    "is_delete" BOOLEAN DEFAULT false,
    "logined_at" TIMESTAMP(3),
    "forgoted_at" TIMESTAMP(3),
    "deleted_at" TIMESTAMP(3),
    "inserted_at" TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP,
    "updated_at" TIMESTAMP(3),

    CONSTRAINT "tbl_admin_pkey" PRIMARY KEY ("id")
);
