@bash-app/bash-common 30.157.0 → 30.158.0
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
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
-- Add allowAutoJoin to EventGroup: when true, anyone can join instantly; when false (default), join requests require owner approval.
|
|
2
|
+
-- Idempotent — safe to run multiple times.
|
|
3
|
+
|
|
4
|
+
DO $$ BEGIN
|
|
5
|
+
|
|
6
|
+
IF NOT EXISTS (
|
|
7
|
+
SELECT 1 FROM information_schema.columns
|
|
8
|
+
WHERE table_name = 'EventGroup' AND column_name = 'allowAutoJoin'
|
|
9
|
+
) THEN
|
|
10
|
+
ALTER TABLE "EventGroup"
|
|
11
|
+
ADD COLUMN "allowAutoJoin" BOOLEAN NOT NULL DEFAULT false;
|
|
12
|
+
RAISE NOTICE 'Added EventGroup.allowAutoJoin';
|
|
13
|
+
ELSE
|
|
14
|
+
RAISE NOTICE 'EventGroup.allowAutoJoin already exists — skipping';
|
|
15
|
+
END IF;
|
|
16
|
+
|
|
17
|
+
END $$;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
-- Add NotGoing and Maybe to GroupMemberStatus enum (aligns with Invitation RSVP: rejectedDate, maybeDate).
|
|
2
|
+
-- Run once. If values already exist, this will error — safe to ignore on re-run.
|
|
3
|
+
|
|
4
|
+
ALTER TYPE "GroupMemberStatus" ADD VALUE IF NOT EXISTS 'NotGoing';
|
|
5
|
+
ALTER TYPE "GroupMemberStatus" ADD VALUE IF NOT EXISTS 'Maybe';
|
package/prisma/schema.prisma
CHANGED
|
@@ -6877,22 +6877,25 @@ enum GroupVisibility {
|
|
|
6877
6877
|
}
|
|
6878
6878
|
|
|
6879
6879
|
enum GroupMemberStatus {
|
|
6880
|
-
Going // Ticket purchased
|
|
6880
|
+
Going // Ticket purchased / attending
|
|
6881
6881
|
WantsToGo // Interested, no ticket yet
|
|
6882
|
+
Maybe // Maybe attending (aligns with Invitation maybeDate)
|
|
6883
|
+
NotGoing // Not attending (aligns with Invitation rejectedDate)
|
|
6882
6884
|
Invited // Invited by owner, not yet responded
|
|
6883
6885
|
}
|
|
6884
6886
|
|
|
6885
6887
|
// A group of attendees for a specific event
|
|
6886
6888
|
model EventGroup {
|
|
6887
|
-
id
|
|
6888
|
-
bashEventId
|
|
6889
|
-
ownerId
|
|
6890
|
-
name
|
|
6891
|
-
maxMembers
|
|
6892
|
-
visibility
|
|
6893
|
-
|
|
6894
|
-
|
|
6895
|
-
|
|
6889
|
+
id String @id @default(cuid())
|
|
6890
|
+
bashEventId String
|
|
6891
|
+
ownerId String
|
|
6892
|
+
name String? // e.g. "Steve's Birthday Group", "Weber State Crew"
|
|
6893
|
+
maxMembers Int? // null = unlimited
|
|
6894
|
+
visibility GroupVisibility @default(Private)
|
|
6895
|
+
allowAutoJoin Boolean @default(false) // When true, anyone can join instantly; when false, requests require approval
|
|
6896
|
+
promoterId String? // Optional: links to event promoter for display context
|
|
6897
|
+
createdAt DateTime @default(now())
|
|
6898
|
+
updatedAt DateTime @updatedAt
|
|
6896
6899
|
|
|
6897
6900
|
bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
6898
6901
|
owner User @relation("OwnedGroups", fields: [ownerId], references: [id], onDelete: Cascade)
|