feat: add License Prisma model + migration

This commit is contained in:
toanhoang
2026-08-02 08:54:53 -04:00
parent 9e08c3f994
commit 96088421ba
2 changed files with 46 additions and 0 deletions
@@ -0,0 +1,16 @@
-- CreateEnum
CREATE TYPE "LicenseType" AS ENUM ('perpetual', 'subscription');
-- CreateTable
CREATE TABLE "licenses" (
"id" UUID NOT NULL,
"name" TEXT NOT NULL,
"vendor" TEXT NOT NULL,
"seats_total" INTEGER NOT NULL,
"seats_used" INTEGER NOT NULL DEFAULT 0,
"expiry_date" DATE,
"license_type" "LicenseType" NOT NULL,
"created_at" TIMESTAMPTZ(6) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "licenses_pkey" PRIMARY KEY ("id")
);