@bash-app/bash-common 29.59.0 → 29.61.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bash-app/bash-common",
3
- "version": "29.59.0",
3
+ "version": "29.61.0",
4
4
  "description": "Common data and scripts to use on the frontend and backend",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -750,18 +750,19 @@ enum PrizeType {
750
750
 
751
751
  model Review {
752
752
  id String @id @default(cuid())
753
- rating Int
754
- creatorId String
753
+ rating Int // Star rating, required
754
+ creatorId String // ID of the user who created the review
755
755
  creator User @relation(fields: [creatorId], references: [id], onDelete: Cascade)
756
- bashEventId String
756
+ bashEventId String // ID of the bash event being reviewed
757
757
  bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
758
- comments BashComment[]
759
- createdAt DateTime @default(now()) // Add this for timestamps
760
- updatedAt DateTime @updatedAt
758
+ comments BashComment[] // Optional comments tied to the review
759
+ createdAt DateTime @default(now()) // Timestamp for when the review was created
760
+ updatedAt DateTime @updatedAt // Auto-updated timestamp for edits
761
761
 
762
- @@unique([creatorId, bashEventId])
762
+ @@unique([creatorId, bashEventId]) // Prevent duplicate reviews for the same bash by a user
763
763
  }
764
764
 
765
+
765
766
  model GoogleReview {
766
767
  id String @id @default(cuid())
767
768
  author_name String?
@@ -880,8 +881,6 @@ model User {
880
881
  competitions Competition[]
881
882
  competitionSponsorships CompetitionSponsor[]
882
883
  competitionPrizes Prize[]
883
- userRatingGiven UserRatingGiven[]
884
- userRating UserRating[]
885
884
  hostRating Float?
886
885
  totalRatings Int?
887
886
  magicLink String?
@@ -1607,23 +1606,6 @@ model UserLink {
1607
1606
  userId String
1608
1607
  }
1609
1608
 
1610
- model UserRating {
1611
- id String @id @default(cuid())
1612
- rating Int
1613
- comment String?
1614
- givenBy UserRatingGiven @relation(fields: [userRatingGivenId], references: [id], onDelete: Cascade)
1615
- userRatingGivenId String
1616
- givenTo User @relation(fields: [userId], references: [id], onDelete: Cascade)
1617
- userId String
1618
- }
1619
-
1620
- model UserRatingGiven {
1621
- id String @id @default(cuid())
1622
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
1623
- userId String
1624
- UserRating UserRating[]
1625
- }
1626
-
1627
1609
  enum UserStatus {
1628
1610
  Active
1629
1611
  Inactive
@@ -50,7 +50,6 @@ import {
50
50
  SocialMediaProfile,
51
51
  SocialMediaPlatform,
52
52
  ServiceSubscriptionCounts,
53
- UserRating,
54
53
  } from "@prisma/client";
55
54
  import { SERVICE_LINK_DATA_TO_INCLUDE, UnionFromArray } from "./definitions";
56
55
 
@@ -100,7 +99,6 @@ export const FRONT_END_USER_DATA_TO_SELECT = {
100
99
  documentIDId: true,
101
100
  // documentID: true,
102
101
  reviews: true,
103
- userRating: true,
104
102
  contacts: true,
105
103
  accepted: true,
106
104
  boughtTicket: true,
@@ -611,7 +609,6 @@ export interface UserExt extends User {
611
609
  createdServices?: ServiceExt[];
612
610
  password?: string;
613
611
  otp?: string;
614
- userRating?: UserRating[];
615
612
  }
616
613
 
617
614
  export const USER_DATA_SELECT_REVIEWS_COMMENTS = {