@danielcok17/prisma-db 1.13.4 → 1.13.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/prisma/app.prisma
CHANGED
|
@@ -54,7 +54,7 @@ model User {
|
|
|
54
54
|
applicationText String? // Text žiadosti o prihlásenie
|
|
55
55
|
// ✨ STRIPE FIELDS (B2C - len pre individuálnych používateľov)
|
|
56
56
|
subscriptionTier SubscriptionTier @default(FREE) // Aktuálny subscription tier (cache)
|
|
57
|
-
messageCount Int @default(
|
|
57
|
+
messageCount Int @default(4) // Free tier default
|
|
58
58
|
messageCountResetAt DateTime? // Kedy sa má resetovať message count
|
|
59
59
|
adminGrantExpiresAt DateTime? // Kedy admin grant expiruje
|
|
60
60
|
// ✨ COMPANY FIELDS (pre SZČO - samostatne zárobkovo činná osoba)
|
|
@@ -164,7 +164,7 @@ model Organization {
|
|
|
164
164
|
// Subscription (B2B)
|
|
165
165
|
subscriptionTier SubscriptionTier @default(FREE) // Tier organizácie (cache)
|
|
166
166
|
messageCount Int @default(0) // Spoločný pool správ pre všetkých členov
|
|
167
|
-
messageLimit Int @default(
|
|
167
|
+
messageLimit Int @default(4) // Free tier default
|
|
168
168
|
messageCountResetAt DateTime? // Kedy sa má resetovať pool
|
|
169
169
|
adminGrantExpiresAt DateTime? // Kedy admin grant expiruje
|
|
170
170
|
|
|
@@ -813,7 +813,7 @@ enum CustomerType {
|
|
|
813
813
|
|
|
814
814
|
// Stripe: Tier predplatného
|
|
815
815
|
enum SubscriptionTier {
|
|
816
|
-
FREE // Free tier (
|
|
816
|
+
FREE // Free tier (4 messages/month)
|
|
817
817
|
LAWYER // Lawyer tier (1000 messages/month, €29/month, 1 user)
|
|
818
818
|
LAWYER_PRO // Lawyer Pro tier (3000 messages/month, €49/month, 1 user) - RECOMMENDED
|
|
819
819
|
LAW_FIRM // Law Firm tier (10000 messages/month, €129/month, up to 5 users)
|
package/prisma/migrations/20260307120000_add_phone_occupation_preferred_language/migration.sql
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
-- Add LEGAL_OPINION to ReferenceType enum (if not exists)
|
|
2
|
+
DO $$
|
|
3
|
+
BEGIN
|
|
4
|
+
IF NOT EXISTS (
|
|
5
|
+
SELECT 1 FROM pg_enum
|
|
6
|
+
WHERE enumtypid = (SELECT oid FROM pg_type WHERE typname = 'ReferenceType')
|
|
7
|
+
AND enumlabel = 'LEGAL_OPINION'
|
|
8
|
+
) THEN
|
|
9
|
+
ALTER TYPE "ReferenceType" ADD VALUE 'LEGAL_OPINION';
|
|
10
|
+
END IF;
|
|
11
|
+
END
|
|
12
|
+
$$;
|
|
13
|
+
|
|
14
|
+
-- AlterTable: Add new profile fields to User (if not exist)
|
|
15
|
+
ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "phone" TEXT;
|
|
16
|
+
ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "occupation" TEXT;
|
|
17
|
+
ALTER TABLE "User" ADD COLUMN IF NOT EXISTS "preferredLanguage" TEXT DEFAULT 'sk';
|