@bash-app/bash-common 30.122.1 → 30.122.2
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 +1 -1
- package/prisma/schema.prisma +111 -8
package/package.json
CHANGED
package/prisma/schema.prisma
CHANGED
|
@@ -702,6 +702,10 @@ model BashEvent {
|
|
|
702
702
|
interests IdeaInterest[]
|
|
703
703
|
configurations IdeaConfiguration[]
|
|
704
704
|
|
|
705
|
+
// Claiming Relations
|
|
706
|
+
claimRequests ClaimRequest[]
|
|
707
|
+
scrapedMetadata ScrapedEventMetadata?
|
|
708
|
+
|
|
705
709
|
// Analytics Relations
|
|
706
710
|
analyticsPredictions AnalyticsPrediction[]
|
|
707
711
|
|
|
@@ -1506,14 +1510,20 @@ model User {
|
|
|
1506
1510
|
vendorBookingRequestsAsHost VendorBookingRequest[] @relation("VendorBookingHost")
|
|
1507
1511
|
volunteerService VolunteerService[]
|
|
1508
1512
|
reviewedAmbashadorApps AmbashadorApplication[] @relation("AmbashadorReviewer")
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1513
|
+
|
|
1514
|
+
// Claiming Relations
|
|
1515
|
+
claimRequests ClaimRequest[] @relation("EventClaims")
|
|
1516
|
+
reviewedClaims ClaimRequest[] @relation("ClaimReviews")
|
|
1517
|
+
claimBan UserClaimBan?
|
|
1518
|
+
bannedUsers UserClaimBan[] @relation("BannedBy")
|
|
1519
|
+
ambashadorApplications AmbashadorApplication[]
|
|
1520
|
+
pushNotificationTokens PushNotificationToken[]
|
|
1521
|
+
redeemedVouchers Voucher[]
|
|
1522
|
+
bashEventPromoCodesIUsed BashEventPromoCode[] @relation("BashEventPromoCodeToUser")
|
|
1523
|
+
ticketTiersWaitListsIveJoined TicketTier[] @relation("TicketTierToUser")
|
|
1524
|
+
scoutReferralsMade ScoutReferral[] @relation("ScoutReferrer")
|
|
1525
|
+
aiRecommendationLogs AIRecommendationLog[]
|
|
1526
|
+
scoutReferralsReceived ScoutReferral[] @relation("ScoutReferred")
|
|
1517
1527
|
|
|
1518
1528
|
// Service Category Requests
|
|
1519
1529
|
serviceCategoryRequests ServiceCategoryRequest[]
|
|
@@ -3757,6 +3767,10 @@ enum BashStatus {
|
|
|
3757
3767
|
Finished
|
|
3758
3768
|
Rejected
|
|
3759
3769
|
Cancelled
|
|
3770
|
+
Unclaimed // Scraped event awaiting claim
|
|
3771
|
+
ClaimPending // Claim requested, under review
|
|
3772
|
+
Claimed // Claimed by organizer, needs completion
|
|
3773
|
+
Archived // Unclaimed after expiration
|
|
3760
3774
|
}
|
|
3761
3775
|
|
|
3762
3776
|
enum TransferRequestStatus {
|
|
@@ -3767,6 +3781,13 @@ enum TransferRequestStatus {
|
|
|
3767
3781
|
Expired
|
|
3768
3782
|
}
|
|
3769
3783
|
|
|
3784
|
+
enum ClaimRequestStatus {
|
|
3785
|
+
Pending
|
|
3786
|
+
Approved
|
|
3787
|
+
Rejected
|
|
3788
|
+
Expired
|
|
3789
|
+
}
|
|
3790
|
+
|
|
3770
3791
|
enum ConnectionStatus {
|
|
3771
3792
|
Pending
|
|
3772
3793
|
Accepted
|
|
@@ -6026,3 +6047,85 @@ enum PredictionSource {
|
|
|
6026
6047
|
RULE_BASED
|
|
6027
6048
|
AI_ENHANCED
|
|
6028
6049
|
}
|
|
6050
|
+
|
|
6051
|
+
// Event Claiming System Models
|
|
6052
|
+
|
|
6053
|
+
model ClaimRequest {
|
|
6054
|
+
id String @id @default(cuid())
|
|
6055
|
+
bashEventId String
|
|
6056
|
+
claimantUserId String
|
|
6057
|
+
claimReason String? @db.Text
|
|
6058
|
+
verificationMethod String?
|
|
6059
|
+
verificationData Json?
|
|
6060
|
+
status ClaimRequestStatus @default(Pending)
|
|
6061
|
+
submittedAt DateTime @default(now())
|
|
6062
|
+
reviewedAt DateTime?
|
|
6063
|
+
reviewedBy String?
|
|
6064
|
+
rejectionReason String? @db.Text
|
|
6065
|
+
|
|
6066
|
+
// Counter-claim support
|
|
6067
|
+
isCounterClaim Boolean @default(false)
|
|
6068
|
+
counterToClaimId String?
|
|
6069
|
+
counterToClaim ClaimRequest? @relation("CounterClaims", fields: [counterToClaimId], references: [id])
|
|
6070
|
+
counterClaims ClaimRequest[] @relation("CounterClaims")
|
|
6071
|
+
|
|
6072
|
+
// Dispute window
|
|
6073
|
+
disputeWindowExpiresAt DateTime?
|
|
6074
|
+
|
|
6075
|
+
bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
6076
|
+
claimant User @relation("EventClaims", fields: [claimantUserId], references: [id], onDelete: Cascade)
|
|
6077
|
+
reviewer User? @relation("ClaimReviews", fields: [reviewedBy], references: [id])
|
|
6078
|
+
|
|
6079
|
+
@@unique([bashEventId, claimantUserId])
|
|
6080
|
+
@@index([bashEventId])
|
|
6081
|
+
@@index([claimantUserId])
|
|
6082
|
+
@@index([status])
|
|
6083
|
+
@@index([counterToClaimId])
|
|
6084
|
+
}
|
|
6085
|
+
|
|
6086
|
+
model ScrapedEventMetadata {
|
|
6087
|
+
id String @id @default(cuid())
|
|
6088
|
+
bashEventId String @unique
|
|
6089
|
+
scrapedFrom String
|
|
6090
|
+
scrapedAt DateTime @default(now())
|
|
6091
|
+
sourceUrl String?
|
|
6092
|
+
|
|
6093
|
+
// Quality scoring
|
|
6094
|
+
qualityCriteria Json
|
|
6095
|
+
qualityScore Int
|
|
6096
|
+
|
|
6097
|
+
// Claiming hints
|
|
6098
|
+
potentialClaimantEmail String?
|
|
6099
|
+
potentialClaimantPhone String?
|
|
6100
|
+
potentialClaimantSocial String?
|
|
6101
|
+
|
|
6102
|
+
// Engagement tracking
|
|
6103
|
+
viewCount Int @default(0)
|
|
6104
|
+
claimAttempts Int @default(0)
|
|
6105
|
+
|
|
6106
|
+
// Archival
|
|
6107
|
+
autoArchiveAt DateTime?
|
|
6108
|
+
|
|
6109
|
+
createdAt DateTime @default(now())
|
|
6110
|
+
updatedAt DateTime @updatedAt
|
|
6111
|
+
|
|
6112
|
+
bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
6113
|
+
|
|
6114
|
+
@@index([scrapedFrom])
|
|
6115
|
+
@@index([qualityScore])
|
|
6116
|
+
@@index([autoArchiveAt])
|
|
6117
|
+
}
|
|
6118
|
+
|
|
6119
|
+
model UserClaimBan {
|
|
6120
|
+
id String @id @default(cuid())
|
|
6121
|
+
userId String @unique
|
|
6122
|
+
reason String @db.Text
|
|
6123
|
+
bannedAt DateTime @default(now())
|
|
6124
|
+
bannedBy String
|
|
6125
|
+
expiresAt DateTime?
|
|
6126
|
+
|
|
6127
|
+
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
6128
|
+
banner User @relation("BannedBy", fields: [bannedBy], references: [id])
|
|
6129
|
+
|
|
6130
|
+
@@index([userId])
|
|
6131
|
+
}
|