Merge pull request #18 from judsonjuniorr/v2-is-on-whatsapp-cache

V2 is on whatsapp cache
This commit is contained in:
Judson Junior
2024-08-30 10:38:55 -03:00
committed by GitHub
8 changed files with 191 additions and 7 deletions

View File

@@ -0,0 +1,14 @@
-- CreateTable
CREATE TABLE "is_on_whatsapp" (
"id" TEXT NOT NULL,
"remote_jid" VARCHAR(100) NOT NULL,
"name" TEXT,
"jid_options" TEXT NOT NULL,
"created_at" TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated_at" TIMESTAMP NOT NULL,
CONSTRAINT "is_on_whatsapp_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "is_on_whatsapp_remote_jid_key" ON "is_on_whatsapp"("remote_jid");

View File

@@ -0,0 +1,8 @@
/*
Warnings:
- You are about to drop the column `name` on the `is_on_whatsapp` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE "is_on_whatsapp" DROP COLUMN "name";

View File

@@ -673,3 +673,13 @@ model FlowiseSetting {
@@map("flowise_settings")
}
model IsOnWhatsapp {
id String @id @default(cuid())
remoteJid String @unique @map("remote_jid") @db.VarChar(100)
jidOptions String @map("jid_options")
createdAt DateTime @default(now()) @map("created_at") @db.Timestamp
updatedAt DateTime @updatedAt @map("updated_at") @db.Timestamp
@@map("is_on_whatsapp")
}