-- CreateTable
CREATE TABLE "tbl_notification_for_user" (
    "id" BIGSERIAL NOT NULL,
    "user_id" BIGINT,
    "title" TEXT,
    "message" TEXT,
    "image" TEXT,
    "notification_tag" TEXT,
    "action_id" TEXT,
    "is_read" BOOLEAN DEFAULT true,
    "inserted_at" TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP,
    "updated_at" TIMESTAMP(3),

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

-- CreateIndex
CREATE INDEX "tbl_notification_for_user_user_id_title_message_image_notif_idx" ON "tbl_notification_for_user"("user_id", "title", "message", "image", "notification_tag", "action_id", "is_read");

-- AddForeignKey
ALTER TABLE "tbl_notification_for_user" ADD CONSTRAINT "tbl_notification_for_user_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "tbl_user"("id") ON DELETE SET NULL ON UPDATE CASCADE;
