[TSM.ID].[11031972] PXE : Platform X Ecosystem I [118 Module -LIVE-]

This commit is contained in:
TSM.ID
2026-05-25 03:50:05 +07:00
commit e820143b3c
673 changed files with 101320 additions and 0 deletions
@@ -0,0 +1,18 @@
CREATE TABLE "tenants" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"name" text NOT NULL,
"is_active" boolean DEFAULT true,
"created_at" timestamp DEFAULT now() NOT NULL
);
--> statement-breakpoint
CREATE TABLE "users" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"tenant_id" uuid NOT NULL,
"email" text NOT NULL,
"password_hash" text NOT NULL,
"role" text DEFAULT 'user' NOT NULL,
"created_at" timestamp DEFAULT now() NOT NULL,
CONSTRAINT "users_email_unique" UNIQUE("email")
);
--> statement-breakpoint
ALTER TABLE "users" ADD CONSTRAINT "users_tenant_id_tenants_id_fk" FOREIGN KEY ("tenant_id") REFERENCES "public"."tenants"("id") ON DELETE no action ON UPDATE no action;
@@ -0,0 +1,78 @@
CREATE TABLE "chat_broadcasts" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"tenant_id" uuid,
"sender_name" text NOT NULL,
"content" text NOT NULL,
"targets" text NOT NULL,
"scheduled_at" timestamp NOT NULL,
"is_sent" boolean DEFAULT false NOT NULL,
"created_at" timestamp DEFAULT now() NOT NULL
);
--> statement-breakpoint
CREATE TABLE "chat_statuses" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"tenant_id" uuid,
"sender" text NOT NULL,
"content" text NOT NULL,
"visibility" text DEFAULT 'tenant' NOT NULL,
"expires_at" timestamp NOT NULL,
"created_at" timestamp DEFAULT now() NOT NULL
);
--> statement-breakpoint
CREATE TABLE "guest_invites" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"room" text NOT NULL,
"host_id" text NOT NULL,
"pin" text NOT NULL,
"is_used" boolean DEFAULT false NOT NULL,
"created_at" timestamp DEFAULT now() NOT NULL
);
--> statement-breakpoint
CREATE TABLE "messages" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"room" text NOT NULL,
"sender" text NOT NULL,
"content" text NOT NULL,
"status" text DEFAULT 'sent' NOT NULL,
"is_edited" boolean DEFAULT false NOT NULL,
"created_at" timestamp DEFAULT now() NOT NULL
);
--> statement-breakpoint
CREATE TABLE "quantum_logs" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"actor" text NOT NULL,
"action" text NOT NULL,
"target_id" text NOT NULL,
"ip_address" text,
"user_agent" text,
"nano_timestamp" timestamp DEFAULT now() NOT NULL
);
--> statement-breakpoint
CREATE TABLE "saas_packages" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"name" text NOT NULL,
"price" text NOT NULL,
"features" text DEFAULT '["chat", "vc"]' NOT NULL,
"is_hidden" boolean DEFAULT false NOT NULL,
"is_active" boolean DEFAULT true NOT NULL,
"created_at" timestamp DEFAULT now() NOT NULL
);
--> statement-breakpoint
CREATE TABLE "system_features" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"module" text DEFAULT 'IAM' NOT NULL,
"key" text NOT NULL,
"name" text NOT NULL,
"description" text,
"default_state" text DEFAULT 'UPSELL' NOT NULL,
"created_at" timestamp DEFAULT now() NOT NULL,
CONSTRAINT "system_features_key_unique" UNIQUE("key")
);
--> statement-breakpoint
ALTER TABLE "tenants" ADD COLUMN "licenses" text DEFAULT '["chat", "vc"]' NOT NULL;--> statement-breakpoint
ALTER TABLE "tenants" ADD COLUMN "allow_cross_group" boolean DEFAULT false NOT NULL;--> statement-breakpoint
ALTER TABLE "tenants" ADD COLUMN "brand_color" text DEFAULT '#00ff88';--> statement-breakpoint
ALTER TABLE "tenants" ADD COLUMN "platform_name" text DEFAULT 'JUMPA.ID';--> statement-breakpoint
ALTER TABLE "users" ADD COLUMN "licenses" text;--> statement-breakpoint
ALTER TABLE "chat_broadcasts" ADD CONSTRAINT "chat_broadcasts_tenant_id_tenants_id_fk" FOREIGN KEY ("tenant_id") REFERENCES "public"."tenants"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "chat_statuses" ADD CONSTRAINT "chat_statuses_tenant_id_tenants_id_fk" FOREIGN KEY ("tenant_id") REFERENCES "public"."tenants"("id") ON DELETE no action ON UPDATE no action;
@@ -0,0 +1,13 @@
ALTER TABLE "saas_packages" ALTER COLUMN "features" SET DEFAULT '[]';--> statement-breakpoint
ALTER TABLE "tenants" ALTER COLUMN "licenses" SET DEFAULT '{}';--> statement-breakpoint
ALTER TABLE "tenants" ALTER COLUMN "brand_color" SET DEFAULT '#0b5cff';--> statement-breakpoint
ALTER TABLE "tenants" ADD COLUMN "package_id" uuid;--> statement-breakpoint
ALTER TABLE "tenants" ADD COLUMN "license_number" text;--> statement-breakpoint
ALTER TABLE "tenants" ADD COLUMN "media_engine_strategy" text DEFAULT 'XCU_GLOBAL_MESH' NOT NULL;--> statement-breakpoint
ALTER TABLE "tenants" ADD COLUMN "chat_engine_strategy" text DEFAULT 'XTM_GLOBAL_MESH' NOT NULL;--> statement-breakpoint
ALTER TABLE "tenants" ADD COLUMN "byok_enabled" boolean DEFAULT false NOT NULL;--> statement-breakpoint
ALTER TABLE "tenants" ADD COLUMN "byok_key" text;--> statement-breakpoint
ALTER TABLE "users" ADD COLUMN "byok_enabled" boolean DEFAULT false NOT NULL;--> statement-breakpoint
ALTER TABLE "users" ADD COLUMN "byok_key" text;--> statement-breakpoint
ALTER TABLE "tenants" ADD CONSTRAINT "tenants_package_id_saas_packages_id_fk" FOREIGN KEY ("package_id") REFERENCES "public"."saas_packages"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "tenants" ADD CONSTRAINT "tenants_license_number_unique" UNIQUE("license_number");
@@ -0,0 +1,30 @@
CREATE TABLE "live_kill_switches" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"tenant_id" uuid,
"target_type" text NOT NULL,
"target_id" text NOT NULL,
"reason" text,
"issued_by" text NOT NULL,
"expires_at" timestamp,
"created_at" timestamp DEFAULT now() NOT NULL
);
--> statement-breakpoint
CREATE TABLE "network_telemetry" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"tenant_id" uuid,
"user_id" uuid,
"endpoint" text NOT NULL,
"method" text NOT NULL,
"response_time_ms" text NOT NULL,
"status_code" text NOT NULL,
"ip_address" text NOT NULL,
"geo_region" text,
"traffic_bytes" text NOT NULL,
"timestamp" timestamp DEFAULT now() NOT NULL
);
--> statement-breakpoint
ALTER TABLE "quantum_logs" ADD COLUMN "tenant_id" uuid;--> statement-breakpoint
ALTER TABLE "live_kill_switches" ADD CONSTRAINT "live_kill_switches_tenant_id_tenants_id_fk" FOREIGN KEY ("tenant_id") REFERENCES "public"."tenants"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "network_telemetry" ADD CONSTRAINT "network_telemetry_tenant_id_tenants_id_fk" FOREIGN KEY ("tenant_id") REFERENCES "public"."tenants"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "network_telemetry" ADD CONSTRAINT "network_telemetry_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "quantum_logs" ADD CONSTRAINT "quantum_logs_tenant_id_tenants_id_fk" FOREIGN KEY ("tenant_id") REFERENCES "public"."tenants"("id") ON DELETE no action ON UPDATE no action;
@@ -0,0 +1,9 @@
-- [TSM.ID].[11031972] — All Rights Reserved. Proprietary & Confidential.
-- Migration: Tambahkan fitur Guest Access ke system_features
-- Jalankan: psql -U <user> -d <db> -f add_guest_features.sql
INSERT INTO system_features (module, key, name, description, default_state)
VALUES
('XCU', 'jvc.guest_access', 'Guest Access (Zoom-Like)', 'Mengizinkan tamu masuk tanpa login. Tamu mendapat JWT terbatas (tanpa host controls, tanpa recording, tanpa screen share).', 'UPSELL'),
('XCU', 'jvc.guest_duration_hours', 'Guest Session Duration (Jam)', 'Durasi sesi tamu dalam jam. Default: 2 jam. Range: 0.5 - 24 jam. Admin/Host dapat mengatur. Isi angka: 0.5, 1, 2, 4, 8, 12, 24.', 'UPSELL')
ON CONFLICT (key) DO NOTHING;
@@ -0,0 +1,133 @@
{
"id": "29c790f8-345c-4375-bf76-01b60c0ca281",
"prevId": "00000000-0000-0000-0000-000000000000",
"version": "7",
"dialect": "postgresql",
"tables": {
"public.tenants": {
"name": "tenants",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"is_active": {
"name": "is_active",
"type": "boolean",
"primaryKey": false,
"notNull": false,
"default": true
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.users": {
"name": "users",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"tenant_id": {
"name": "tenant_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"email": {
"name": "email",
"type": "text",
"primaryKey": false,
"notNull": true
},
"password_hash": {
"name": "password_hash",
"type": "text",
"primaryKey": false,
"notNull": true
},
"role": {
"name": "role",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'user'"
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"users_tenant_id_tenants_id_fk": {
"name": "users_tenant_id_tenants_id_fk",
"tableFrom": "users",
"tableTo": "tenants",
"columnsFrom": [
"tenant_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"users_email_unique": {
"name": "users_email_unique",
"nullsNotDistinct": false,
"columns": [
"email"
]
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
}
},
"enums": {},
"schemas": {},
"sequences": {},
"roles": {},
"policies": {},
"views": {},
"_meta": {
"columns": {},
"schemas": {},
"tables": {}
}
}
@@ -0,0 +1,612 @@
{
"id": "402dc7db-3276-4a83-8efb-f16a769d5b64",
"prevId": "29c790f8-345c-4375-bf76-01b60c0ca281",
"version": "7",
"dialect": "postgresql",
"tables": {
"public.chat_broadcasts": {
"name": "chat_broadcasts",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"tenant_id": {
"name": "tenant_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"sender_name": {
"name": "sender_name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"content": {
"name": "content",
"type": "text",
"primaryKey": false,
"notNull": true
},
"targets": {
"name": "targets",
"type": "text",
"primaryKey": false,
"notNull": true
},
"scheduled_at": {
"name": "scheduled_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true
},
"is_sent": {
"name": "is_sent",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"chat_broadcasts_tenant_id_tenants_id_fk": {
"name": "chat_broadcasts_tenant_id_tenants_id_fk",
"tableFrom": "chat_broadcasts",
"tableTo": "tenants",
"columnsFrom": [
"tenant_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.chat_statuses": {
"name": "chat_statuses",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"tenant_id": {
"name": "tenant_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"sender": {
"name": "sender",
"type": "text",
"primaryKey": false,
"notNull": true
},
"content": {
"name": "content",
"type": "text",
"primaryKey": false,
"notNull": true
},
"visibility": {
"name": "visibility",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'tenant'"
},
"expires_at": {
"name": "expires_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"chat_statuses_tenant_id_tenants_id_fk": {
"name": "chat_statuses_tenant_id_tenants_id_fk",
"tableFrom": "chat_statuses",
"tableTo": "tenants",
"columnsFrom": [
"tenant_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.guest_invites": {
"name": "guest_invites",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"room": {
"name": "room",
"type": "text",
"primaryKey": false,
"notNull": true
},
"host_id": {
"name": "host_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"pin": {
"name": "pin",
"type": "text",
"primaryKey": false,
"notNull": true
},
"is_used": {
"name": "is_used",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.messages": {
"name": "messages",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"room": {
"name": "room",
"type": "text",
"primaryKey": false,
"notNull": true
},
"sender": {
"name": "sender",
"type": "text",
"primaryKey": false,
"notNull": true
},
"content": {
"name": "content",
"type": "text",
"primaryKey": false,
"notNull": true
},
"status": {
"name": "status",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'sent'"
},
"is_edited": {
"name": "is_edited",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.quantum_logs": {
"name": "quantum_logs",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"actor": {
"name": "actor",
"type": "text",
"primaryKey": false,
"notNull": true
},
"action": {
"name": "action",
"type": "text",
"primaryKey": false,
"notNull": true
},
"target_id": {
"name": "target_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"ip_address": {
"name": "ip_address",
"type": "text",
"primaryKey": false,
"notNull": false
},
"user_agent": {
"name": "user_agent",
"type": "text",
"primaryKey": false,
"notNull": false
},
"nano_timestamp": {
"name": "nano_timestamp",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.saas_packages": {
"name": "saas_packages",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"price": {
"name": "price",
"type": "text",
"primaryKey": false,
"notNull": true
},
"features": {
"name": "features",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'[\"chat\", \"vc\"]'"
},
"is_hidden": {
"name": "is_hidden",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"is_active": {
"name": "is_active",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": true
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.system_features": {
"name": "system_features",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"module": {
"name": "module",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'IAM'"
},
"key": {
"name": "key",
"type": "text",
"primaryKey": false,
"notNull": true
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"description": {
"name": "description",
"type": "text",
"primaryKey": false,
"notNull": false
},
"default_state": {
"name": "default_state",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'UPSELL'"
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"system_features_key_unique": {
"name": "system_features_key_unique",
"nullsNotDistinct": false,
"columns": [
"key"
]
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.tenants": {
"name": "tenants",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"is_active": {
"name": "is_active",
"type": "boolean",
"primaryKey": false,
"notNull": false,
"default": true
},
"licenses": {
"name": "licenses",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'[\"chat\", \"vc\"]'"
},
"allow_cross_group": {
"name": "allow_cross_group",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"brand_color": {
"name": "brand_color",
"type": "text",
"primaryKey": false,
"notNull": false,
"default": "'#00ff88'"
},
"platform_name": {
"name": "platform_name",
"type": "text",
"primaryKey": false,
"notNull": false,
"default": "'JUMPA.ID'"
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.users": {
"name": "users",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"tenant_id": {
"name": "tenant_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"email": {
"name": "email",
"type": "text",
"primaryKey": false,
"notNull": true
},
"password_hash": {
"name": "password_hash",
"type": "text",
"primaryKey": false,
"notNull": true
},
"role": {
"name": "role",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'user'"
},
"licenses": {
"name": "licenses",
"type": "text",
"primaryKey": false,
"notNull": false
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"users_tenant_id_tenants_id_fk": {
"name": "users_tenant_id_tenants_id_fk",
"tableFrom": "users",
"tableTo": "tenants",
"columnsFrom": [
"tenant_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"users_email_unique": {
"name": "users_email_unique",
"nullsNotDistinct": false,
"columns": [
"email"
]
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
}
},
"enums": {},
"schemas": {},
"sequences": {},
"roles": {},
"policies": {},
"views": {},
"_meta": {
"columns": {},
"schemas": {},
"tables": {}
}
}
@@ -0,0 +1,686 @@
{
"id": "f12500b5-9962-46e2-bcca-521c363dd234",
"prevId": "402dc7db-3276-4a83-8efb-f16a769d5b64",
"version": "7",
"dialect": "postgresql",
"tables": {
"public.chat_broadcasts": {
"name": "chat_broadcasts",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"tenant_id": {
"name": "tenant_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"sender_name": {
"name": "sender_name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"content": {
"name": "content",
"type": "text",
"primaryKey": false,
"notNull": true
},
"targets": {
"name": "targets",
"type": "text",
"primaryKey": false,
"notNull": true
},
"scheduled_at": {
"name": "scheduled_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true
},
"is_sent": {
"name": "is_sent",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"chat_broadcasts_tenant_id_tenants_id_fk": {
"name": "chat_broadcasts_tenant_id_tenants_id_fk",
"tableFrom": "chat_broadcasts",
"tableTo": "tenants",
"columnsFrom": [
"tenant_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.chat_statuses": {
"name": "chat_statuses",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"tenant_id": {
"name": "tenant_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"sender": {
"name": "sender",
"type": "text",
"primaryKey": false,
"notNull": true
},
"content": {
"name": "content",
"type": "text",
"primaryKey": false,
"notNull": true
},
"visibility": {
"name": "visibility",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'tenant'"
},
"expires_at": {
"name": "expires_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"chat_statuses_tenant_id_tenants_id_fk": {
"name": "chat_statuses_tenant_id_tenants_id_fk",
"tableFrom": "chat_statuses",
"tableTo": "tenants",
"columnsFrom": [
"tenant_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.guest_invites": {
"name": "guest_invites",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"room": {
"name": "room",
"type": "text",
"primaryKey": false,
"notNull": true
},
"host_id": {
"name": "host_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"pin": {
"name": "pin",
"type": "text",
"primaryKey": false,
"notNull": true
},
"is_used": {
"name": "is_used",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.messages": {
"name": "messages",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"room": {
"name": "room",
"type": "text",
"primaryKey": false,
"notNull": true
},
"sender": {
"name": "sender",
"type": "text",
"primaryKey": false,
"notNull": true
},
"content": {
"name": "content",
"type": "text",
"primaryKey": false,
"notNull": true
},
"status": {
"name": "status",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'sent'"
},
"is_edited": {
"name": "is_edited",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.quantum_logs": {
"name": "quantum_logs",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"actor": {
"name": "actor",
"type": "text",
"primaryKey": false,
"notNull": true
},
"action": {
"name": "action",
"type": "text",
"primaryKey": false,
"notNull": true
},
"target_id": {
"name": "target_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"ip_address": {
"name": "ip_address",
"type": "text",
"primaryKey": false,
"notNull": false
},
"user_agent": {
"name": "user_agent",
"type": "text",
"primaryKey": false,
"notNull": false
},
"nano_timestamp": {
"name": "nano_timestamp",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.saas_packages": {
"name": "saas_packages",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"price": {
"name": "price",
"type": "text",
"primaryKey": false,
"notNull": true
},
"features": {
"name": "features",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'[]'"
},
"is_hidden": {
"name": "is_hidden",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"is_active": {
"name": "is_active",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": true
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.system_features": {
"name": "system_features",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"module": {
"name": "module",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'IAM'"
},
"key": {
"name": "key",
"type": "text",
"primaryKey": false,
"notNull": true
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"description": {
"name": "description",
"type": "text",
"primaryKey": false,
"notNull": false
},
"default_state": {
"name": "default_state",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'UPSELL'"
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"system_features_key_unique": {
"name": "system_features_key_unique",
"nullsNotDistinct": false,
"columns": [
"key"
]
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.tenants": {
"name": "tenants",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"is_active": {
"name": "is_active",
"type": "boolean",
"primaryKey": false,
"notNull": false,
"default": true
},
"package_id": {
"name": "package_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"licenses": {
"name": "licenses",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'{}'"
},
"license_number": {
"name": "license_number",
"type": "text",
"primaryKey": false,
"notNull": false
},
"allow_cross_group": {
"name": "allow_cross_group",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"brand_color": {
"name": "brand_color",
"type": "text",
"primaryKey": false,
"notNull": false,
"default": "'#0b5cff'"
},
"platform_name": {
"name": "platform_name",
"type": "text",
"primaryKey": false,
"notNull": false,
"default": "'JUMPA.ID'"
},
"media_engine_strategy": {
"name": "media_engine_strategy",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'XCU_GLOBAL_MESH'"
},
"chat_engine_strategy": {
"name": "chat_engine_strategy",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'XTM_GLOBAL_MESH'"
},
"byok_enabled": {
"name": "byok_enabled",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"byok_key": {
"name": "byok_key",
"type": "text",
"primaryKey": false,
"notNull": false
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"tenants_package_id_saas_packages_id_fk": {
"name": "tenants_package_id_saas_packages_id_fk",
"tableFrom": "tenants",
"tableTo": "saas_packages",
"columnsFrom": [
"package_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"tenants_license_number_unique": {
"name": "tenants_license_number_unique",
"nullsNotDistinct": false,
"columns": [
"license_number"
]
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.users": {
"name": "users",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"tenant_id": {
"name": "tenant_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"email": {
"name": "email",
"type": "text",
"primaryKey": false,
"notNull": true
},
"password_hash": {
"name": "password_hash",
"type": "text",
"primaryKey": false,
"notNull": true
},
"role": {
"name": "role",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'user'"
},
"licenses": {
"name": "licenses",
"type": "text",
"primaryKey": false,
"notNull": false
},
"byok_enabled": {
"name": "byok_enabled",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"byok_key": {
"name": "byok_key",
"type": "text",
"primaryKey": false,
"notNull": false
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"users_tenant_id_tenants_id_fk": {
"name": "users_tenant_id_tenants_id_fk",
"tableFrom": "users",
"tableTo": "tenants",
"columnsFrom": [
"tenant_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"users_email_unique": {
"name": "users_email_unique",
"nullsNotDistinct": false,
"columns": [
"email"
]
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
}
},
"enums": {},
"schemas": {},
"sequences": {},
"roles": {},
"policies": {},
"views": {},
"_meta": {
"columns": {},
"schemas": {},
"tables": {}
}
}
@@ -0,0 +1,891 @@
{
"id": "1c45018a-8bb7-4a78-84dd-519805b83f61",
"prevId": "f12500b5-9962-46e2-bcca-521c363dd234",
"version": "7",
"dialect": "postgresql",
"tables": {
"public.chat_broadcasts": {
"name": "chat_broadcasts",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"tenant_id": {
"name": "tenant_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"sender_name": {
"name": "sender_name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"content": {
"name": "content",
"type": "text",
"primaryKey": false,
"notNull": true
},
"targets": {
"name": "targets",
"type": "text",
"primaryKey": false,
"notNull": true
},
"scheduled_at": {
"name": "scheduled_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true
},
"is_sent": {
"name": "is_sent",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"chat_broadcasts_tenant_id_tenants_id_fk": {
"name": "chat_broadcasts_tenant_id_tenants_id_fk",
"tableFrom": "chat_broadcasts",
"tableTo": "tenants",
"columnsFrom": [
"tenant_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.chat_statuses": {
"name": "chat_statuses",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"tenant_id": {
"name": "tenant_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"sender": {
"name": "sender",
"type": "text",
"primaryKey": false,
"notNull": true
},
"content": {
"name": "content",
"type": "text",
"primaryKey": false,
"notNull": true
},
"visibility": {
"name": "visibility",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'tenant'"
},
"expires_at": {
"name": "expires_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"chat_statuses_tenant_id_tenants_id_fk": {
"name": "chat_statuses_tenant_id_tenants_id_fk",
"tableFrom": "chat_statuses",
"tableTo": "tenants",
"columnsFrom": [
"tenant_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.guest_invites": {
"name": "guest_invites",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"room": {
"name": "room",
"type": "text",
"primaryKey": false,
"notNull": true
},
"host_id": {
"name": "host_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"pin": {
"name": "pin",
"type": "text",
"primaryKey": false,
"notNull": true
},
"is_used": {
"name": "is_used",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.live_kill_switches": {
"name": "live_kill_switches",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"tenant_id": {
"name": "tenant_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"target_type": {
"name": "target_type",
"type": "text",
"primaryKey": false,
"notNull": true
},
"target_id": {
"name": "target_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"reason": {
"name": "reason",
"type": "text",
"primaryKey": false,
"notNull": false
},
"issued_by": {
"name": "issued_by",
"type": "text",
"primaryKey": false,
"notNull": true
},
"expires_at": {
"name": "expires_at",
"type": "timestamp",
"primaryKey": false,
"notNull": false
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"live_kill_switches_tenant_id_tenants_id_fk": {
"name": "live_kill_switches_tenant_id_tenants_id_fk",
"tableFrom": "live_kill_switches",
"tableTo": "tenants",
"columnsFrom": [
"tenant_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.messages": {
"name": "messages",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"room": {
"name": "room",
"type": "text",
"primaryKey": false,
"notNull": true
},
"sender": {
"name": "sender",
"type": "text",
"primaryKey": false,
"notNull": true
},
"content": {
"name": "content",
"type": "text",
"primaryKey": false,
"notNull": true
},
"status": {
"name": "status",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'sent'"
},
"is_edited": {
"name": "is_edited",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.network_telemetry": {
"name": "network_telemetry",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"tenant_id": {
"name": "tenant_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"user_id": {
"name": "user_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"endpoint": {
"name": "endpoint",
"type": "text",
"primaryKey": false,
"notNull": true
},
"method": {
"name": "method",
"type": "text",
"primaryKey": false,
"notNull": true
},
"response_time_ms": {
"name": "response_time_ms",
"type": "text",
"primaryKey": false,
"notNull": true
},
"status_code": {
"name": "status_code",
"type": "text",
"primaryKey": false,
"notNull": true
},
"ip_address": {
"name": "ip_address",
"type": "text",
"primaryKey": false,
"notNull": true
},
"geo_region": {
"name": "geo_region",
"type": "text",
"primaryKey": false,
"notNull": false
},
"traffic_bytes": {
"name": "traffic_bytes",
"type": "text",
"primaryKey": false,
"notNull": true
},
"timestamp": {
"name": "timestamp",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"network_telemetry_tenant_id_tenants_id_fk": {
"name": "network_telemetry_tenant_id_tenants_id_fk",
"tableFrom": "network_telemetry",
"tableTo": "tenants",
"columnsFrom": [
"tenant_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"network_telemetry_user_id_users_id_fk": {
"name": "network_telemetry_user_id_users_id_fk",
"tableFrom": "network_telemetry",
"tableTo": "users",
"columnsFrom": [
"user_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.quantum_logs": {
"name": "quantum_logs",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"tenant_id": {
"name": "tenant_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"actor": {
"name": "actor",
"type": "text",
"primaryKey": false,
"notNull": true
},
"action": {
"name": "action",
"type": "text",
"primaryKey": false,
"notNull": true
},
"target_id": {
"name": "target_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"ip_address": {
"name": "ip_address",
"type": "text",
"primaryKey": false,
"notNull": false
},
"user_agent": {
"name": "user_agent",
"type": "text",
"primaryKey": false,
"notNull": false
},
"nano_timestamp": {
"name": "nano_timestamp",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"quantum_logs_tenant_id_tenants_id_fk": {
"name": "quantum_logs_tenant_id_tenants_id_fk",
"tableFrom": "quantum_logs",
"tableTo": "tenants",
"columnsFrom": [
"tenant_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.saas_packages": {
"name": "saas_packages",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"price": {
"name": "price",
"type": "text",
"primaryKey": false,
"notNull": true
},
"features": {
"name": "features",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'[]'"
},
"is_hidden": {
"name": "is_hidden",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"is_active": {
"name": "is_active",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": true
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.system_features": {
"name": "system_features",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"module": {
"name": "module",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'IAM'"
},
"key": {
"name": "key",
"type": "text",
"primaryKey": false,
"notNull": true
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"description": {
"name": "description",
"type": "text",
"primaryKey": false,
"notNull": false
},
"default_state": {
"name": "default_state",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'UPSELL'"
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"system_features_key_unique": {
"name": "system_features_key_unique",
"nullsNotDistinct": false,
"columns": [
"key"
]
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.tenants": {
"name": "tenants",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"is_active": {
"name": "is_active",
"type": "boolean",
"primaryKey": false,
"notNull": false,
"default": true
},
"package_id": {
"name": "package_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"licenses": {
"name": "licenses",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'{}'"
},
"license_number": {
"name": "license_number",
"type": "text",
"primaryKey": false,
"notNull": false
},
"allow_cross_group": {
"name": "allow_cross_group",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"brand_color": {
"name": "brand_color",
"type": "text",
"primaryKey": false,
"notNull": false,
"default": "'#0b5cff'"
},
"platform_name": {
"name": "platform_name",
"type": "text",
"primaryKey": false,
"notNull": false,
"default": "'JUMPA.ID'"
},
"media_engine_strategy": {
"name": "media_engine_strategy",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'XCU_GLOBAL_MESH'"
},
"chat_engine_strategy": {
"name": "chat_engine_strategy",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'XTM_GLOBAL_MESH'"
},
"byok_enabled": {
"name": "byok_enabled",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"byok_key": {
"name": "byok_key",
"type": "text",
"primaryKey": false,
"notNull": false
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"tenants_package_id_saas_packages_id_fk": {
"name": "tenants_package_id_saas_packages_id_fk",
"tableFrom": "tenants",
"tableTo": "saas_packages",
"columnsFrom": [
"package_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"tenants_license_number_unique": {
"name": "tenants_license_number_unique",
"nullsNotDistinct": false,
"columns": [
"license_number"
]
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.users": {
"name": "users",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"tenant_id": {
"name": "tenant_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"email": {
"name": "email",
"type": "text",
"primaryKey": false,
"notNull": true
},
"password_hash": {
"name": "password_hash",
"type": "text",
"primaryKey": false,
"notNull": true
},
"role": {
"name": "role",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'user'"
},
"licenses": {
"name": "licenses",
"type": "text",
"primaryKey": false,
"notNull": false
},
"byok_enabled": {
"name": "byok_enabled",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"byok_key": {
"name": "byok_key",
"type": "text",
"primaryKey": false,
"notNull": false
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"users_tenant_id_tenants_id_fk": {
"name": "users_tenant_id_tenants_id_fk",
"tableFrom": "users",
"tableTo": "tenants",
"columnsFrom": [
"tenant_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"users_email_unique": {
"name": "users_email_unique",
"nullsNotDistinct": false,
"columns": [
"email"
]
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
}
},
"enums": {},
"schemas": {},
"sequences": {},
"roles": {},
"policies": {},
"views": {},
"_meta": {
"columns": {},
"schemas": {},
"tables": {}
}
}
@@ -0,0 +1,34 @@
{
"version": "7",
"dialect": "postgresql",
"entries": [
{
"idx": 0,
"version": "7",
"when": 1777728588999,
"tag": "0000_curvy_demogoblin",
"breakpoints": true
},
{
"idx": 1,
"version": "7",
"when": 1777843063884,
"tag": "0001_busy_puff_adder",
"breakpoints": true
},
{
"idx": 2,
"version": "7",
"when": 1778689401748,
"tag": "0002_closed_stark_industries",
"breakpoints": true
},
{
"idx": 3,
"version": "7",
"when": 1778738273469,
"tag": "0003_amusing_stepford_cuckoos",
"breakpoints": true
}
]
}