@natrave/shared-entities 8.42.1 → 8.43.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.
Files changed (52) hide show
  1. package/dist/database-entities/index.d.ts +2 -2
  2. package/dist/database-entities/index.d.ts.map +1 -1
  3. package/dist/database-entities/index.js +11 -1
  4. package/dist/friendlies/enums/friendly-attendance-status.enum.d.ts +5 -0
  5. package/dist/friendlies/enums/friendly-attendance-status.enum.d.ts.map +1 -0
  6. package/dist/friendlies/enums/friendly-attendance-status.enum.js +8 -0
  7. package/dist/friendlies/enums/friendly-open-challenge-status.enum.d.ts +7 -0
  8. package/dist/friendlies/enums/friendly-open-challenge-status.enum.d.ts.map +1 -0
  9. package/dist/friendlies/enums/friendly-open-challenge-status.enum.js +10 -0
  10. package/dist/friendlies/enums/friendly-schedule-kind.enum.d.ts +7 -0
  11. package/dist/friendlies/enums/friendly-schedule-kind.enum.d.ts.map +1 -0
  12. package/dist/friendlies/enums/friendly-schedule-kind.enum.js +10 -0
  13. package/dist/friendlies/friendly-board-preferences/friendly-board-preference.entity.d.ts +9 -0
  14. package/dist/friendlies/friendly-board-preferences/friendly-board-preference.entity.d.ts.map +1 -0
  15. package/dist/friendlies/friendly-board-preferences/friendly-board-preference.entity.js +66 -0
  16. package/dist/friendlies/friendly-board-preferences/index.d.ts +2 -0
  17. package/dist/friendlies/friendly-board-preferences/index.d.ts.map +1 -0
  18. package/dist/friendlies/friendly-board-preferences/index.js +4 -0
  19. package/dist/friendlies/friendly-challenges/friendly-challenge.entity.d.ts +3 -0
  20. package/dist/friendlies/friendly-challenges/friendly-challenge.entity.d.ts.map +1 -1
  21. package/dist/friendlies/friendly-challenges/friendly-challenge.entity.js +16 -0
  22. package/dist/friendlies/friendly-match-attendances/friendly-match-attendance.entity.d.ts +21 -0
  23. package/dist/friendlies/friendly-match-attendances/friendly-match-attendance.entity.d.ts.map +1 -0
  24. package/dist/friendlies/friendly-match-attendances/friendly-match-attendance.entity.js +131 -0
  25. package/dist/friendlies/friendly-match-attendances/index.d.ts +2 -0
  26. package/dist/friendlies/friendly-match-attendances/index.d.ts.map +1 -0
  27. package/dist/friendlies/friendly-match-attendances/index.js +4 -0
  28. package/dist/friendlies/friendly-match-mvps/friendly-match-mvp.entity.d.ts +12 -0
  29. package/dist/friendlies/friendly-match-mvps/friendly-match-mvp.entity.d.ts.map +1 -0
  30. package/dist/friendlies/friendly-match-mvps/friendly-match-mvp.entity.js +81 -0
  31. package/dist/friendlies/friendly-match-mvps/index.d.ts +2 -0
  32. package/dist/friendlies/friendly-match-mvps/index.d.ts.map +1 -0
  33. package/dist/friendlies/friendly-match-mvps/index.js +4 -0
  34. package/dist/friendlies/friendly-matches/friendly-match.entity.d.ts +7 -0
  35. package/dist/friendlies/friendly-matches/friendly-match.entity.d.ts.map +1 -1
  36. package/dist/friendlies/friendly-matches/friendly-match.entity.js +20 -0
  37. package/dist/friendlies/friendly-mvp-votes/friendly-mvp-vote.entity.d.ts +17 -0
  38. package/dist/friendlies/friendly-mvp-votes/friendly-mvp-vote.entity.d.ts.map +1 -0
  39. package/dist/friendlies/friendly-mvp-votes/friendly-mvp-vote.entity.js +110 -0
  40. package/dist/friendlies/friendly-mvp-votes/index.d.ts +2 -0
  41. package/dist/friendlies/friendly-mvp-votes/index.d.ts.map +1 -0
  42. package/dist/friendlies/friendly-mvp-votes/index.js +4 -0
  43. package/dist/friendlies/friendly-open-challenges/friendly-open-challenge.entity.d.ts +36 -0
  44. package/dist/friendlies/friendly-open-challenges/friendly-open-challenge.entity.d.ts.map +1 -0
  45. package/dist/friendlies/friendly-open-challenges/friendly-open-challenge.entity.js +255 -0
  46. package/dist/friendlies/friendly-open-challenges/index.d.ts +2 -0
  47. package/dist/friendlies/friendly-open-challenges/index.d.ts.map +1 -0
  48. package/dist/friendlies/friendly-open-challenges/index.js +4 -0
  49. package/dist/friendlies/index.d.ts +8 -0
  50. package/dist/friendlies/index.d.ts.map +1 -1
  51. package/dist/friendlies/index.js +11 -0
  52. package/package.json +1 -1
@@ -5,7 +5,7 @@ import { Coupon, CouponUsage } from '../coupons';
5
5
  import { Address, City, Facility, FacilityImage, FacilityOwner, Field, FieldImage } from '../facilities';
6
6
  import { FeedActivity, FeedActivityReaction, FeedActivitySubject, FeedOutbox } from '../feed';
7
7
  import { FinanceAuditEvent, FinanceEntry, FinanceEntryItem, FinanceLedger } from '../finance';
8
- import { FriendlyChallenge, FriendlyChallengeExtra, FriendlyMatch, FriendlyMatchExtra, FriendlyMatchGoal, FriendlyRequest, FriendlyScoreEvent } from '../friendlies';
8
+ import { FriendlyBoardPreference, FriendlyChallenge, FriendlyChallengeExtra, FriendlyMatch, FriendlyMatchAttendance, FriendlyMatchExtra, FriendlyMatchGoal, FriendlyMatchMvp, FriendlyMvpVote, FriendlyRequest, FriendlyScoreEvent } from '../friendlies';
9
9
  import { TeamPlayerMergeHistory } from '../history-logs';
10
10
  import { Notification, NotificationDelivery, NotificationDispatchLog, PushDeviceToken, UserNotificationPreference } from '../notifications';
11
11
  import { Payment, PaymentProvider, UserPaymentProvider } from '../payments';
@@ -14,5 +14,5 @@ import { Promotion, PromotionAdvertiser, PromotionContact, PromotionCreative, Pr
14
14
  import { PlayerTeam, Team, TeamAccessCode, TeamFollow, TeamJoinRequest, TeamKit, TeamModality, TeamSponsor, TeamTrophy } from '../teams';
15
15
  import { CategoryBroadcastSetting, Referee, RegulationExtraction, Tournament, TournamentAllowedPhone, TournamentBillingOutbox, TournamentBracket, TournamentBracketSlot, TournamentCategoryGroup, TournamentContact, TournamentCoupon, TournamentCreationDraft, TournamentFacility, TournamentFollow, TournamentFormatConfig, TournamentGroup, TournamentGroupContact, TournamentMatch, TournamentMatchAvailability, TournamentMatchCard, TournamentMatchGoal, TournamentMatchKit, TournamentMatchObservation, TournamentMatchPlayerNumber, TournamentMatchReferee, TournamentMatchRule, TournamentMatchSchema, TournamentMatchSubstitution, TournamentMatchTimeout, TournamentPayment, TournamentPenaltyShootout, TournamentPlayer, TournamentPlayerRule, TournamentPointsAdjustment, TournamentPrizeRule, TournamentPublicationChargeRule, TournamentRegistrationRequest, TournamentRegistrationRequirement, TournamentRegulationFieldStatus, TournamentRound, TournamentTeam, TournamentTeamInvitation, TournamentTeamMemberNote, TournamentTieBreakConfig } from '../tournaments';
16
16
  import { UserDomainEvent, UserEventView } from '../user-events';
17
- export declare const DATABASE_ENTITIES: (typeof PasswordReset | typeof Notification | typeof User | typeof NotificationDelivery | typeof NotificationDispatchLog | typeof PushDeviceToken | typeof UserNotificationPreference | typeof TeamPlayerMergeHistory | typeof Team | typeof PlayerTeam | typeof Player | typeof TournamentMatchGoal | typeof TournamentTeam | typeof TournamentMatch | typeof TournamentPlayer | typeof TournamentMatchKit | typeof TournamentMatchSubstitution | typeof TournamentMatchTimeout | typeof TournamentPenaltyShootout | typeof CategoryBroadcastSetting | typeof Tournament | typeof TournamentMatchReferee | typeof Referee | typeof RegulationExtraction | typeof TournamentAllowedPhone | typeof PhoneNumber | typeof TournamentBillingOutbox | typeof TournamentGroupContact | typeof TournamentCategoryGroup | typeof Organization | typeof TournamentContact | typeof Coupon | typeof CouponUsage | typeof TournamentCoupon | typeof TournamentCreationDraft | typeof City | typeof FacilityImage | typeof Facility | typeof FacilityOwner | typeof Field | typeof FieldImage | typeof TournamentFacility | typeof TournamentFollow | typeof TournamentFormatConfig | typeof TournamentMatchObservation | typeof TournamentMatchPlayerNumber | typeof TournamentMatchRule | typeof TournamentMatchSchema | typeof TournamentMatchAvailability | typeof UserPaymentProvider | typeof PaymentProvider | typeof Payment | typeof TournamentPayment | typeof OrganizationUser | typeof TournamentPlayerRule | typeof TournamentPointsAdjustment | typeof TournamentPrizeRule | typeof TournamentPublicationChargeRule | typeof TournamentRegistrationRequest | typeof TournamentRegistrationRequirement | typeof TournamentRegulationFieldStatus | typeof TournamentRound | typeof TournamentTeamInvitation | typeof TournamentTeamMemberNote | typeof TournamentTieBreakConfig | typeof Address | typeof OrganizationUserBillingInfo | typeof TournamentGroup | typeof TournamentBracket | typeof TournamentBracketSlot | typeof TeamTrophy | typeof TournamentMatchCard | typeof TeamAccessCode | typeof TeamJoinRequest | typeof TeamKit | typeof TeamModality | typeof TeamSponsor | typeof TeamFollow | typeof PlayerPosition | typeof PlayerPersonalData | typeof UserAuthProvider | typeof RefreshToken | typeof UserLocality | typeof UserOnboardingIntent | typeof UserVerification | typeof BillingProduct | typeof BillingPlan | typeof BillingSubscriptionGrant | typeof BillingSubscription | typeof BillingSubscriptionItem | typeof BillingAccount | typeof BillingEvent | typeof BillingInvoice | typeof BillingInvoiceLineItem | typeof BillingMatchUsage | typeof BillingPayment | typeof BillingProviderWebhookEvent | typeof FeedActivityReaction | typeof FeedActivity | typeof FeedActivitySubject | typeof FeedOutbox | typeof FinanceAuditEvent | typeof FinanceEntryItem | typeof FinanceEntry | typeof FinanceLedger | typeof FriendlyMatchExtra | typeof FriendlyMatch | typeof FriendlyMatchGoal | typeof FriendlyScoreEvent | typeof FriendlyChallenge | typeof FriendlyChallengeExtra | typeof FriendlyRequest | typeof PromotionContact | typeof Promotion | typeof PromotionCreative | typeof PromotionTarget | typeof PromotionAdvertiser | typeof PromotionEvent | typeof PromotionUserState | typeof UserDomainEvent | typeof UserEventView)[];
17
+ export declare const DATABASE_ENTITIES: (typeof PasswordReset | typeof Notification | typeof User | typeof NotificationDelivery | typeof NotificationDispatchLog | typeof PushDeviceToken | typeof UserNotificationPreference | typeof TeamPlayerMergeHistory | typeof Team | typeof PlayerTeam | typeof Player | typeof TournamentMatchGoal | typeof TournamentTeam | typeof TournamentMatch | typeof TournamentPlayer | typeof TournamentMatchKit | typeof TournamentMatchSubstitution | typeof TournamentMatchTimeout | typeof TournamentPenaltyShootout | typeof CategoryBroadcastSetting | typeof Tournament | typeof TournamentMatchReferee | typeof Referee | typeof RegulationExtraction | typeof TournamentAllowedPhone | typeof PhoneNumber | typeof TournamentBillingOutbox | typeof TournamentGroupContact | typeof TournamentCategoryGroup | typeof Organization | typeof TournamentContact | typeof Coupon | typeof CouponUsage | typeof TournamentCoupon | typeof TournamentCreationDraft | typeof City | typeof FacilityImage | typeof Facility | typeof FacilityOwner | typeof Field | typeof FieldImage | typeof TournamentFacility | typeof TournamentFollow | typeof TournamentFormatConfig | typeof TournamentMatchObservation | typeof TournamentMatchPlayerNumber | typeof TournamentMatchRule | typeof TournamentMatchSchema | typeof TournamentMatchAvailability | typeof UserPaymentProvider | typeof PaymentProvider | typeof Payment | typeof TournamentPayment | typeof OrganizationUser | typeof TournamentPlayerRule | typeof TournamentPointsAdjustment | typeof TournamentPrizeRule | typeof TournamentPublicationChargeRule | typeof TournamentRegistrationRequest | typeof TournamentRegistrationRequirement | typeof TournamentRegulationFieldStatus | typeof TournamentRound | typeof TournamentTeamInvitation | typeof TournamentTeamMemberNote | typeof TournamentTieBreakConfig | typeof Address | typeof OrganizationUserBillingInfo | typeof TournamentGroup | typeof TournamentBracket | typeof TournamentBracketSlot | typeof TeamTrophy | typeof TournamentMatchCard | typeof TeamAccessCode | typeof TeamJoinRequest | typeof TeamKit | typeof TeamModality | typeof TeamSponsor | typeof TeamFollow | typeof PlayerPosition | typeof PlayerPersonalData | typeof UserAuthProvider | typeof RefreshToken | typeof UserLocality | typeof UserOnboardingIntent | typeof UserVerification | typeof BillingProduct | typeof BillingPlan | typeof BillingSubscriptionGrant | typeof BillingSubscription | typeof BillingSubscriptionItem | typeof BillingAccount | typeof BillingEvent | typeof BillingInvoice | typeof BillingInvoiceLineItem | typeof BillingMatchUsage | typeof BillingPayment | typeof BillingProviderWebhookEvent | typeof FeedActivityReaction | typeof FeedActivity | typeof FeedActivitySubject | typeof FeedOutbox | typeof FinanceAuditEvent | typeof FinanceEntryItem | typeof FinanceEntry | typeof FinanceLedger | typeof FriendlyBoardPreference | typeof FriendlyMatchAttendance | typeof FriendlyMatch | typeof FriendlyMatchExtra | typeof FriendlyMatchGoal | typeof FriendlyMatchMvp | typeof FriendlyMvpVote | typeof FriendlyScoreEvent | typeof FriendlyChallenge | typeof FriendlyChallengeExtra | typeof FriendlyRequest | typeof PromotionContact | typeof Promotion | typeof PromotionCreative | typeof PromotionTarget | typeof PromotionAdvertiser | typeof PromotionEvent | typeof PromotionUserState | typeof UserDomainEvent | typeof UserEventView)[];
18
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/database-entities/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,YAAY,EACZ,IAAI,EACJ,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,cAAc,EACd,YAAY,EACZ,cAAc,EACd,sBAAsB,EACtB,iBAAiB,EACjB,cAAc,EACd,WAAW,EACX,cAAc,EACd,2BAA2B,EAC3B,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,2BAA2B,EAC3B,WAAW,EACZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EACL,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,aAAa,EACb,aAAa,EACb,KAAK,EACL,UAAU,EACX,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC9F,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC9F,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EACL,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eAAO,MAAM,iBAAiB,mrGA4H7B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/database-entities/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,YAAY,EACZ,IAAI,EACJ,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,cAAc,EACd,YAAY,EACZ,cAAc,EACd,sBAAsB,EACtB,iBAAiB,EACjB,cAAc,EACd,WAAW,EACX,cAAc,EACd,2BAA2B,EAC3B,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,2BAA2B,EAC3B,WAAW,EACZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EACL,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,aAAa,EACb,aAAa,EACb,KAAK,EACL,UAAU,EACX,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC9F,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC9F,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,EACb,uBAAuB,EACvB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EAEf,eAAe,EACf,kBAAkB,EACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,uBAAuB,EACvB,eAAe,EACf,0BAA0B,EAC3B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACxE,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,kBAAkB,EACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,UAAU,EACV,IAAI,EACJ,cAAc,EACd,UAAU,EACV,eAAe,EACf,OAAO,EACP,YAAY,EACZ,WAAW,EACX,UAAU,EACX,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,wBAAwB,EACxB,OAAO,EACP,oBAAoB,EACpB,UAAU,EACV,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,EACjB,qBAAqB,EACrB,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,EAChB,uBAAuB,EACvB,kBAAkB,EAClB,gBAAgB,EAChB,sBAAsB,EACtB,eAAe,EACf,sBAAsB,EACtB,eAAe,EACf,2BAA2B,EAC3B,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,0BAA0B,EAC1B,2BAA2B,EAC3B,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EACrB,2BAA2B,EAC3B,sBAAsB,EACtB,iBAAiB,EACjB,yBAAyB,EACzB,gBAAgB,EAChB,oBAAoB,EACpB,0BAA0B,EAC1B,mBAAmB,EACnB,+BAA+B,EAC/B,6BAA6B,EAC7B,iCAAiC,EAEjC,+BAA+B,EAC/B,eAAe,EAEf,cAAc,EACd,wBAAwB,EACxB,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEhE,eAAO,MAAM,iBAAiB,wyGAiI7B,CAAC"}
@@ -40,11 +40,16 @@ import {
40
40
  import { FeedActivity, FeedActivityReaction, FeedActivitySubject, FeedOutbox } from "../feed/index.js";
41
41
  import { FinanceAuditEvent, FinanceEntry, FinanceEntryItem, FinanceLedger } from "../finance/index.js";
42
42
  import {
43
+ FriendlyBoardPreference,
43
44
  FriendlyChallenge,
44
45
  FriendlyChallengeExtra,
45
46
  FriendlyMatch,
47
+ FriendlyMatchAttendance,
46
48
  FriendlyMatchExtra,
47
49
  FriendlyMatchGoal,
50
+ FriendlyMatchMvp,
51
+ FriendlyMvpVote,
52
+ FriendlyOpenChallenge,
48
53
  FriendlyRequest,
49
54
  FriendlyScoreEvent
50
55
  } from "../friendlies/index.js";
@@ -250,7 +255,12 @@ const DATABASE_ENTITIES = [
250
255
  FriendlyMatchExtra,
251
256
  FriendlyMatchGoal,
252
257
  FriendlyScoreEvent,
253
- FriendlyRequest
258
+ FriendlyRequest,
259
+ FriendlyOpenChallenge,
260
+ FriendlyBoardPreference,
261
+ FriendlyMatchAttendance,
262
+ FriendlyMvpVote,
263
+ FriendlyMatchMvp
254
264
  ];
255
265
  export {
256
266
  DATABASE_ENTITIES
@@ -0,0 +1,5 @@
1
+ export declare enum FriendlyAttendanceStatus {
2
+ GOING = "going",
3
+ NOT_GOING = "not_going"
4
+ }
5
+ //# sourceMappingURL=friendly-attendance-status.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"friendly-attendance-status.enum.d.ts","sourceRoot":"","sources":["../../../src/friendlies/enums/friendly-attendance-status.enum.ts"],"names":[],"mappings":"AAGA,oBAAY,wBAAwB;IAClC,KAAK,UAAU;IACf,SAAS,cAAc;CACxB"}
@@ -0,0 +1,8 @@
1
+ var FriendlyAttendanceStatus = /* @__PURE__ */ ((FriendlyAttendanceStatus2) => {
2
+ FriendlyAttendanceStatus2["GOING"] = "going";
3
+ FriendlyAttendanceStatus2["NOT_GOING"] = "not_going";
4
+ return FriendlyAttendanceStatus2;
5
+ })(FriendlyAttendanceStatus || {});
6
+ export {
7
+ FriendlyAttendanceStatus
8
+ };
@@ -0,0 +1,7 @@
1
+ export declare enum FriendlyOpenChallengeStatus {
2
+ OPEN = "open",
3
+ ACCEPTED = "accepted",
4
+ CANCELLED = "cancelled",
5
+ EXPIRED = "expired"
6
+ }
7
+ //# sourceMappingURL=friendly-open-challenge-status.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"friendly-open-challenge-status.enum.d.ts","sourceRoot":"","sources":["../../../src/friendlies/enums/friendly-open-challenge-status.enum.ts"],"names":[],"mappings":"AAIA,oBAAY,2BAA2B;IAErC,IAAI,SAAS;IAEb,QAAQ,aAAa;IAErB,SAAS,cAAc;IAEvB,OAAO,YAAY;CACpB"}
@@ -0,0 +1,10 @@
1
+ var FriendlyOpenChallengeStatus = /* @__PURE__ */ ((FriendlyOpenChallengeStatus2) => {
2
+ FriendlyOpenChallengeStatus2["OPEN"] = "open";
3
+ FriendlyOpenChallengeStatus2["ACCEPTED"] = "accepted";
4
+ FriendlyOpenChallengeStatus2["CANCELLED"] = "cancelled";
5
+ FriendlyOpenChallengeStatus2["EXPIRED"] = "expired";
6
+ return FriendlyOpenChallengeStatus2;
7
+ })(FriendlyOpenChallengeStatus || {});
8
+ export {
9
+ FriendlyOpenChallengeStatus
10
+ };
@@ -0,0 +1,7 @@
1
+ export declare enum FriendlyScheduleKind {
2
+ DATE_TIME = "date_time",
3
+ DATE = "date",
4
+ WEEKDAY = "weekday",
5
+ OPEN = "open"
6
+ }
7
+ //# sourceMappingURL=friendly-schedule-kind.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"friendly-schedule-kind.enum.d.ts","sourceRoot":"","sources":["../../../src/friendlies/enums/friendly-schedule-kind.enum.ts"],"names":[],"mappings":"AAIA,oBAAY,oBAAoB;IAE9B,SAAS,cAAc;IAEvB,IAAI,SAAS;IAEb,OAAO,YAAY;IAEnB,IAAI,SAAS;CACd"}
@@ -0,0 +1,10 @@
1
+ var FriendlyScheduleKind = /* @__PURE__ */ ((FriendlyScheduleKind2) => {
2
+ FriendlyScheduleKind2["DATE_TIME"] = "date_time";
3
+ FriendlyScheduleKind2["DATE"] = "date";
4
+ FriendlyScheduleKind2["WEEKDAY"] = "weekday";
5
+ FriendlyScheduleKind2["OPEN"] = "open";
6
+ return FriendlyScheduleKind2;
7
+ })(FriendlyScheduleKind || {});
8
+ export {
9
+ FriendlyScheduleKind
10
+ };
@@ -0,0 +1,9 @@
1
+ import { User } from '../../app-auth';
2
+ export declare class FriendlyBoardPreference {
3
+ userId: string;
4
+ radiusKm: number;
5
+ createdAt: Date;
6
+ updatedAt: Date;
7
+ user: User;
8
+ }
9
+ //# sourceMappingURL=friendly-board-preference.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"friendly-board-preference.entity.d.ts","sourceRoot":"","sources":["../../../src/friendlies/friendly-board-preferences/friendly-board-preference.entity.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAWtC,qBAEa,uBAAuB;IAOlC,MAAM,EAAE,MAAM,CAAC;IAOf,QAAQ,EAAE,MAAM,CAAC;IAOjB,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAShB,IAAI,EAAE,IAAI,CAAC;CACZ"}
@@ -0,0 +1,66 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __decorateClass = (decorators, target, key, kind) => {
4
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
5
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
6
+ if (decorator = decorators[i])
7
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8
+ if (kind && result) __defProp(target, key, result);
9
+ return result;
10
+ };
11
+ import {
12
+ Check,
13
+ Column,
14
+ CreateDateColumn,
15
+ Entity,
16
+ JoinColumn,
17
+ OneToOne,
18
+ PrimaryColumn,
19
+ UpdateDateColumn
20
+ } from "typeorm";
21
+ import { User } from "../../app-auth/index.js";
22
+ let FriendlyBoardPreference = class {
23
+ };
24
+ __decorateClass([
25
+ PrimaryColumn({
26
+ name: "user_id",
27
+ type: "uuid",
28
+ primaryKeyConstraintName: "PK_friendly_board_preferences",
29
+ comment: "FK users.id. A pessoa; o raio \xE9 dela, n\xE3o do time."
30
+ })
31
+ ], FriendlyBoardPreference.prototype, "userId", 2);
32
+ __decorateClass([
33
+ Column({
34
+ name: "radius_km",
35
+ type: "smallint",
36
+ comment: "Raio do mural em km, de 5 a 200. Sem linha, o app usa 25."
37
+ })
38
+ ], FriendlyBoardPreference.prototype, "radiusKm", 2);
39
+ __decorateClass([
40
+ CreateDateColumn({
41
+ name: "created_at",
42
+ type: "timestamptz",
43
+ comment: "Data/hora em que a pessoa escolheu um raio pela primeira vez."
44
+ })
45
+ ], FriendlyBoardPreference.prototype, "createdAt", 2);
46
+ __decorateClass([
47
+ UpdateDateColumn({
48
+ name: "updated_at",
49
+ type: "timestamptz",
50
+ comment: "Data/hora da \xFAltima atualiza\xE7\xE3o."
51
+ })
52
+ ], FriendlyBoardPreference.prototype, "updatedAt", 2);
53
+ __decorateClass([
54
+ OneToOne(() => User, { onDelete: "CASCADE" }),
55
+ JoinColumn({
56
+ name: "user_id",
57
+ foreignKeyConstraintName: "FK_friendly_board_preferences_user"
58
+ })
59
+ ], FriendlyBoardPreference.prototype, "user", 2);
60
+ FriendlyBoardPreference = __decorateClass([
61
+ Entity("friendly_board_preferences"),
62
+ Check("CHK_friendly_board_preferences_radius", `"radius_km" BETWEEN 5 AND 200`)
63
+ ], FriendlyBoardPreference);
64
+ export {
65
+ FriendlyBoardPreference
66
+ };
@@ -0,0 +1,2 @@
1
+ export { FriendlyBoardPreference } from './friendly-board-preference.entity';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/friendlies/friendly-board-preferences/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { FriendlyBoardPreference } from "./friendly-board-preference.entity.js";
2
+ export {
3
+ FriendlyBoardPreference
4
+ };
@@ -6,6 +6,7 @@ import { FriendlyChallengeStatus } from '../enums/friendly-challenge-status.enum
6
6
  import { FriendlyDeclineReason } from '../enums/friendly-decline-reason.enum';
7
7
  import { FriendlyChallengeExtra } from '../friendly-challenge-extras/friendly-challenge-extra.entity';
8
8
  import { FriendlyMatch } from '../friendly-matches/friendly-match.entity';
9
+ import { FriendlyOpenChallenge } from '../friendly-open-challenges/friendly-open-challenge.entity';
9
10
  export declare class FriendlyChallenge {
10
11
  id: number;
11
12
  challengerTeamId: number;
@@ -22,6 +23,7 @@ export declare class FriendlyChallenge {
22
23
  declineReason: FriendlyDeclineReason | null;
23
24
  closedByUserId: string | null;
24
25
  closedAt: Date | null;
26
+ friendlyOpenChallengeId: number | null;
25
27
  createdAt: Date;
26
28
  updatedAt: Date;
27
29
  challengerTeam: Team;
@@ -30,6 +32,7 @@ export declare class FriendlyChallenge {
30
32
  createdByUser: User;
31
33
  respondedByUser: User | null;
32
34
  closedByUser: User | null;
35
+ openChallenge: FriendlyOpenChallenge | null;
33
36
  extras: FriendlyChallengeExtra[];
34
37
  match: FriendlyMatch | null;
35
38
  }
@@ -1 +1 @@
1
- {"version":3,"file":"friendly-challenge.entity.d.ts","sourceRoot":"","sources":["../../../src/friendlies/friendly-challenges/friendly-challenge.entity.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,6CAA6C,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AACzE,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC9E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,IAAI,CAAC;IAO1B,aAAa,EAAE,IAAI,CAAC;IAOpB,eAAe,EAAE,IAAI,GAAG,IAAI,CAAC;IAO7B,YAAY,EAAE,IAAI,GAAG,IAAI,CAAC;IAO1B,aAAa,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAG5C,MAAM,EAAE,sBAAsB,EAAE,CAAC;IAGjC,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;CAC7B"}
@@ -29,6 +29,7 @@ import { FriendlyChallengeStatus } from "../enums/friendly-challenge-status.enum
29
29
  import { FriendlyDeclineReason } from "../enums/friendly-decline-reason.enum.js";
30
30
  import { FriendlyChallengeExtra } from "../friendly-challenge-extras/friendly-challenge-extra.entity.js";
31
31
  import { FriendlyMatch } from "../friendly-matches/friendly-match.entity.js";
32
+ import { FriendlyOpenChallenge } from "../friendly-open-challenges/friendly-open-challenge.entity.js";
32
33
  const STATUSES = Object.values(FriendlyChallengeStatus).map((status) => `'${status}'`).join(", ");
33
34
  const MODALITIES = Object.values(Modality).map((modality) => `'${modality}'`).join(", ");
34
35
  const DECLINE_REASONS = Object.values(FriendlyDeclineReason).map((reason) => `'${reason}'`).join(", ");
@@ -148,6 +149,14 @@ __decorateClass([
148
149
  comment: "Data/hora do cancelamento ou da expira\xE7\xE3o. Preenchida exatamente em cancelled e expired."
149
150
  })
150
151
  ], FriendlyChallenge.prototype, "closedAt", 2);
152
+ __decorateClass([
153
+ Column({
154
+ name: "friendly_open_challenge_id",
155
+ type: "int",
156
+ nullable: true,
157
+ comment: "FK friendly_open_challenges.id. O desafio aberto do mural de que o amistoso nasceu. Nulo no desafio direto."
158
+ })
159
+ ], FriendlyChallenge.prototype, "friendlyOpenChallengeId", 2);
151
160
  __decorateClass([
152
161
  CreateDateColumn({
153
162
  name: "created_at",
@@ -204,6 +213,13 @@ __decorateClass([
204
213
  foreignKeyConstraintName: "FK_friendly_challenges_closed_by_user"
205
214
  })
206
215
  ], FriendlyChallenge.prototype, "closedByUser", 2);
216
+ __decorateClass([
217
+ ManyToOne(() => FriendlyOpenChallenge, { onDelete: "RESTRICT" }),
218
+ JoinColumn({
219
+ name: "friendly_open_challenge_id",
220
+ foreignKeyConstraintName: "FK_friendly_challenges_open_challenge"
221
+ })
222
+ ], FriendlyChallenge.prototype, "openChallenge", 2);
207
223
  __decorateClass([
208
224
  OneToMany(() => FriendlyChallengeExtra, (extra) => extra.challenge)
209
225
  ], FriendlyChallenge.prototype, "extras", 2);
@@ -0,0 +1,21 @@
1
+ import { User } from '../../app-auth';
2
+ import { PlayerTeam } from '../../teams/player-team/player-team.entity';
3
+ import { Team } from '../../teams/teams/team.entity';
4
+ import { FriendlyAttendanceStatus } from '../enums/friendly-attendance-status.enum';
5
+ import { FriendlyMatch } from '../friendly-matches/friendly-match.entity';
6
+ export declare class FriendlyMatchAttendance {
7
+ id: number;
8
+ friendlyMatchId: number;
9
+ teamId: number;
10
+ playerTeamId: number;
11
+ status: FriendlyAttendanceStatus;
12
+ respondedByUserId: string | null;
13
+ respondedAt: Date;
14
+ createdAt: Date;
15
+ updatedAt: Date;
16
+ match: FriendlyMatch;
17
+ team: Team;
18
+ playerTeam: PlayerTeam;
19
+ respondedByUser: User | null;
20
+ }
21
+ //# sourceMappingURL=friendly-match-attendance.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"friendly-match-attendance.entity.d.ts","sourceRoot":"","sources":["../../../src/friendlies/friendly-match-attendances/friendly-match-attendance.entity.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAmB1E,qBAIa,uBAAuB;IAKlC,EAAE,EAAE,MAAM,CAAC;IAOX,eAAe,EAAE,MAAM,CAAC;IAOxB,MAAM,EAAE,MAAM,CAAC;IAOf,YAAY,EAAE,MAAM,CAAC;IAOrB,MAAM,EAAE,wBAAwB,CAAC;IASjC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAQjC,WAAW,EAAE,IAAI,CAAC;IAOlB,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAShB,KAAK,EAAE,aAAa,CAAC;IAOrB,IAAI,EAAE,IAAI,CAAC;IAOX,UAAU,EAAE,UAAU,CAAC;IAOvB,eAAe,EAAE,IAAI,GAAG,IAAI,CAAC;CAC9B"}
@@ -0,0 +1,131 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __decorateClass = (decorators, target, key, kind) => {
4
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
5
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
6
+ if (decorator = decorators[i])
7
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8
+ if (kind && result) __defProp(target, key, result);
9
+ return result;
10
+ };
11
+ import {
12
+ Check,
13
+ Column,
14
+ CreateDateColumn,
15
+ Entity,
16
+ Index,
17
+ JoinColumn,
18
+ ManyToOne,
19
+ PrimaryGeneratedColumn,
20
+ Unique,
21
+ UpdateDateColumn
22
+ } from "typeorm";
23
+ import { User } from "../../app-auth/index.js";
24
+ import { PlayerTeam } from "../../teams/player-team/player-team.entity.js";
25
+ import { Team } from "../../teams/teams/team.entity.js";
26
+ import { FriendlyAttendanceStatus } from "../enums/friendly-attendance-status.enum.js";
27
+ import { FriendlyMatch } from "../friendly-matches/friendly-match.entity.js";
28
+ const STATUSES = Object.values(FriendlyAttendanceStatus).map((status) => `'${status}'`).join(", ");
29
+ let FriendlyMatchAttendance = class {
30
+ };
31
+ __decorateClass([
32
+ PrimaryGeneratedColumn({
33
+ primaryKeyConstraintName: "PK_friendly_match_attendances",
34
+ comment: "Identificador \xFAnico da resposta."
35
+ })
36
+ ], FriendlyMatchAttendance.prototype, "id", 2);
37
+ __decorateClass([
38
+ Column({
39
+ name: "friendly_match_id",
40
+ type: "int",
41
+ comment: "FK friendly_matches.id."
42
+ })
43
+ ], FriendlyMatchAttendance.prototype, "friendlyMatchId", 2);
44
+ __decorateClass([
45
+ Column({
46
+ name: "team_id",
47
+ type: "int",
48
+ comment: "FK teams.id. O lado do jogador na partida."
49
+ })
50
+ ], FriendlyMatchAttendance.prototype, "teamId", 2);
51
+ __decorateClass([
52
+ Column({
53
+ name: "player_team_id",
54
+ type: "int",
55
+ comment: "FK player_teams.id. O v\xEDnculo do jogador com o time."
56
+ })
57
+ ], FriendlyMatchAttendance.prototype, "playerTeamId", 2);
58
+ __decorateClass([
59
+ Column({
60
+ type: "varchar",
61
+ length: 16,
62
+ comment: 'going (Vou) | not_going (N\xE3o vou). Sem linha \xE9 "sem resposta".'
63
+ })
64
+ ], FriendlyMatchAttendance.prototype, "status", 2);
65
+ __decorateClass([
66
+ Column({
67
+ name: "responded_by_user_id",
68
+ type: "uuid",
69
+ nullable: true,
70
+ comment: "FK users.id. Quem respondeu: o pr\xF3prio jogador ou o representante, por quem n\xE3o tem conta."
71
+ })
72
+ ], FriendlyMatchAttendance.prototype, "respondedByUserId", 2);
73
+ __decorateClass([
74
+ Column({
75
+ name: "responded_at",
76
+ type: "timestamptz",
77
+ default: () => "now()",
78
+ comment: "Data/hora da \xFAltima resposta."
79
+ })
80
+ ], FriendlyMatchAttendance.prototype, "respondedAt", 2);
81
+ __decorateClass([
82
+ CreateDateColumn({
83
+ name: "created_at",
84
+ type: "timestamptz",
85
+ comment: "Data/hora da primeira resposta."
86
+ })
87
+ ], FriendlyMatchAttendance.prototype, "createdAt", 2);
88
+ __decorateClass([
89
+ UpdateDateColumn({
90
+ name: "updated_at",
91
+ type: "timestamptz",
92
+ comment: "Data/hora da \xFAltima atualiza\xE7\xE3o."
93
+ })
94
+ ], FriendlyMatchAttendance.prototype, "updatedAt", 2);
95
+ __decorateClass([
96
+ ManyToOne(() => FriendlyMatch, (match) => match.attendances, { onDelete: "CASCADE" }),
97
+ JoinColumn({
98
+ name: "friendly_match_id",
99
+ foreignKeyConstraintName: "FK_friendly_match_attendances_match"
100
+ })
101
+ ], FriendlyMatchAttendance.prototype, "match", 2);
102
+ __decorateClass([
103
+ ManyToOne(() => Team, { onDelete: "RESTRICT" }),
104
+ JoinColumn({
105
+ name: "team_id",
106
+ foreignKeyConstraintName: "FK_friendly_match_attendances_team"
107
+ })
108
+ ], FriendlyMatchAttendance.prototype, "team", 2);
109
+ __decorateClass([
110
+ ManyToOne(() => PlayerTeam, { onDelete: "CASCADE" }),
111
+ JoinColumn({
112
+ name: "player_team_id",
113
+ foreignKeyConstraintName: "FK_friendly_match_attendances_player_team"
114
+ })
115
+ ], FriendlyMatchAttendance.prototype, "playerTeam", 2);
116
+ __decorateClass([
117
+ ManyToOne(() => User, { onDelete: "SET NULL" }),
118
+ JoinColumn({
119
+ name: "responded_by_user_id",
120
+ foreignKeyConstraintName: "FK_friendly_match_attendances_responded_by_user"
121
+ })
122
+ ], FriendlyMatchAttendance.prototype, "respondedByUser", 2);
123
+ FriendlyMatchAttendance = __decorateClass([
124
+ Entity("friendly_match_attendances"),
125
+ Unique("UQ_friendly_match_attendances_player", ["friendlyMatchId", "playerTeamId"]),
126
+ Index("IDX_friendly_match_attendances_team", ["friendlyMatchId", "teamId", "status"]),
127
+ Check("CHK_friendly_match_attendances_status", `"status" IN (${STATUSES})`)
128
+ ], FriendlyMatchAttendance);
129
+ export {
130
+ FriendlyMatchAttendance
131
+ };
@@ -0,0 +1,2 @@
1
+ export { FriendlyMatchAttendance } from './friendly-match-attendance.entity';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/friendlies/friendly-match-attendances/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { FriendlyMatchAttendance } from "./friendly-match-attendance.entity.js";
2
+ export {
3
+ FriendlyMatchAttendance
4
+ };
@@ -0,0 +1,12 @@
1
+ import { PlayerTeam } from '../../teams/player-team/player-team.entity';
2
+ import { FriendlyMatch } from '../friendly-matches/friendly-match.entity';
3
+ export declare class FriendlyMatchMvp {
4
+ id: number;
5
+ friendlyMatchId: number;
6
+ playerTeamId: number;
7
+ votes: number;
8
+ closedAt: Date;
9
+ match: FriendlyMatch;
10
+ playerTeam: PlayerTeam;
11
+ }
12
+ //# sourceMappingURL=friendly-match-mvp.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"friendly-match-mvp.entity.d.ts","sourceRoot":"","sources":["../../../src/friendlies/friendly-match-mvps/friendly-match-mvp.entity.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAa1E,qBAIa,gBAAgB;IAK3B,EAAE,EAAE,MAAM,CAAC;IAOX,eAAe,EAAE,MAAM,CAAC;IAOxB,YAAY,EAAE,MAAM,CAAC;IAMrB,KAAK,EAAE,MAAM,CAAC;IAQd,QAAQ,EAAE,IAAI,CAAC;IASf,KAAK,EAAE,aAAa,CAAC;IAOrB,UAAU,EAAE,UAAU,CAAC;CACxB"}
@@ -0,0 +1,81 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __decorateClass = (decorators, target, key, kind) => {
4
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
5
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
6
+ if (decorator = decorators[i])
7
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8
+ if (kind && result) __defProp(target, key, result);
9
+ return result;
10
+ };
11
+ import {
12
+ Check,
13
+ Column,
14
+ Entity,
15
+ Index,
16
+ JoinColumn,
17
+ ManyToOne,
18
+ PrimaryGeneratedColumn,
19
+ Unique
20
+ } from "typeorm";
21
+ import { PlayerTeam } from "../../teams/player-team/player-team.entity.js";
22
+ import { FriendlyMatch } from "../friendly-matches/friendly-match.entity.js";
23
+ let FriendlyMatchMvp = class {
24
+ };
25
+ __decorateClass([
26
+ PrimaryGeneratedColumn({
27
+ primaryKeyConstraintName: "PK_friendly_match_mvps",
28
+ comment: "Identificador \xFAnico do resultado."
29
+ })
30
+ ], FriendlyMatchMvp.prototype, "id", 2);
31
+ __decorateClass([
32
+ Column({
33
+ name: "friendly_match_id",
34
+ type: "int",
35
+ comment: "FK friendly_matches.id."
36
+ })
37
+ ], FriendlyMatchMvp.prototype, "friendlyMatchId", 2);
38
+ __decorateClass([
39
+ Column({
40
+ name: "player_team_id",
41
+ type: "int",
42
+ comment: "FK player_teams.id. O craque do jogo; mais de uma linha na mesma partida \xE9 empate."
43
+ })
44
+ ], FriendlyMatchMvp.prototype, "playerTeamId", 2);
45
+ __decorateClass([
46
+ Column({
47
+ type: "smallint",
48
+ comment: "Quantos votos levou quando a vota\xE7\xE3o fechou."
49
+ })
50
+ ], FriendlyMatchMvp.prototype, "votes", 2);
51
+ __decorateClass([
52
+ Column({
53
+ name: "closed_at",
54
+ type: "timestamptz",
55
+ default: () => "now()",
56
+ comment: "Quando a rotina fechou a vota\xE7\xE3o e gravou o resultado."
57
+ })
58
+ ], FriendlyMatchMvp.prototype, "closedAt", 2);
59
+ __decorateClass([
60
+ ManyToOne(() => FriendlyMatch, (match) => match.mvps, { onDelete: "CASCADE" }),
61
+ JoinColumn({
62
+ name: "friendly_match_id",
63
+ foreignKeyConstraintName: "FK_friendly_match_mvps_match"
64
+ })
65
+ ], FriendlyMatchMvp.prototype, "match", 2);
66
+ __decorateClass([
67
+ ManyToOne(() => PlayerTeam, { onDelete: "CASCADE" }),
68
+ JoinColumn({
69
+ name: "player_team_id",
70
+ foreignKeyConstraintName: "FK_friendly_match_mvps_player_team"
71
+ })
72
+ ], FriendlyMatchMvp.prototype, "playerTeam", 2);
73
+ FriendlyMatchMvp = __decorateClass([
74
+ Entity("friendly_match_mvps"),
75
+ Unique("UQ_friendly_match_mvps_player", ["friendlyMatchId", "playerTeamId"]),
76
+ Index("IDX_friendly_match_mvps_player", ["playerTeamId"]),
77
+ Check("CHK_friendly_match_mvps_votes", `"votes" >= 1`)
78
+ ], FriendlyMatchMvp);
79
+ export {
80
+ FriendlyMatchMvp
81
+ };
@@ -0,0 +1,2 @@
1
+ export { FriendlyMatchMvp } from './friendly-match-mvp.entity';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/friendlies/friendly-match-mvps/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { FriendlyMatchMvp } from "./friendly-match-mvp.entity.js";
2
+ export {
3
+ FriendlyMatchMvp
4
+ };
@@ -5,8 +5,11 @@ import { Team } from '../../teams/teams/team.entity';
5
5
  import { FriendlyMatchStatus } from '../enums/friendly-match-status.enum';
6
6
  import { FriendlyScoreStatus } from '../enums/friendly-score-status.enum';
7
7
  import { FriendlyChallenge } from '../friendly-challenges/friendly-challenge.entity';
8
+ import { FriendlyMatchAttendance } from '../friendly-match-attendances/friendly-match-attendance.entity';
8
9
  import { FriendlyMatchExtra } from '../friendly-match-extras/friendly-match-extra.entity';
9
10
  import { FriendlyMatchGoal } from '../friendly-match-goals/friendly-match-goal.entity';
11
+ import { FriendlyMatchMvp } from '../friendly-match-mvps/friendly-match-mvp.entity';
12
+ import { FriendlyMvpVote } from '../friendly-mvp-votes/friendly-mvp-vote.entity';
10
13
  import { FriendlyScoreEvent } from '../friendly-score-events/friendly-score-event.entity';
11
14
  export declare class FriendlyMatch {
12
15
  id: number;
@@ -26,6 +29,7 @@ export declare class FriendlyMatch {
26
29
  scoreConfirmedByUserId: string | null;
27
30
  cancelledByUserId: string | null;
28
31
  cancelledAt: Date | null;
32
+ mvpClosedAt: Date | null;
29
33
  createdAt: Date;
30
34
  updatedAt: Date;
31
35
  challenge: FriendlyChallenge;
@@ -39,5 +43,8 @@ export declare class FriendlyMatch {
39
43
  extras: FriendlyMatchExtra[];
40
44
  goals: FriendlyMatchGoal[];
41
45
  scoreEvents: FriendlyScoreEvent[];
46
+ attendances: FriendlyMatchAttendance[];
47
+ mvpVotes: FriendlyMvpVote[];
48
+ mvps: FriendlyMatchMvp[];
42
49
  }
43
50
  //# sourceMappingURL=friendly-match.entity.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"friendly-match.entity.d.ts","sourceRoot":"","sources":["../../../src/friendlies/friendly-matches/friendly-match.entity.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,6CAA6C,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AACzE,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sDAAsD,CAAC;AAC1F,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AACvF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sDAAsD,CAAC;AA8B1F,qBA4Ba,aAAa;IAKxB,EAAE,EAAE,MAAM,CAAC;IAOX,mBAAmB,EAAE,MAAM,CAAC;IAO5B,gBAAgB,EAAE,MAAM,CAAC;IAOzB,cAAc,EAAE,MAAM,CAAC;IAOvB,QAAQ,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AW,EAAE,IAAI,GAAG,IAAI,CAAC;IAOzB,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAShB,SAAS,EAAE,iBAAiB,CAAC;IAO7B,cAAc,EAAE,IAAI,CAAC;IAOrB,YAAY,EAAE,IAAI,CAAC;IAQnB,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IAO1B,wBAAwB,EAAE,IAAI,CAAC;IAO/B,sBAAsB,EAAE,IAAI,CAAC;IAO7B,oBAAoB,EAAE,IAAI,GAAG,IAAI,CAAC;IAOlC,eAAe,EAAE,IAAI,GAAG,IAAI,CAAC;IAG7B,MAAM,EAAE,kBAAkB,EAAE,CAAC;IAG7B,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAG3B,WAAW,EAAE,kBAAkB,EAAE,CAAC;IAGlC,WAAW,EAAE,uBAAuB,EAAE,CAAC;IAGvC,QAAQ,EAAE,eAAe,EAAE,CAAC;IAG5B,IAAI,EAAE,gBAAgB,EAAE,CAAC;CAC1B"}
@@ -28,8 +28,11 @@ import { Team } from "../../teams/teams/team.entity.js";
28
28
  import { FriendlyMatchStatus } from "../enums/friendly-match-status.enum.js";
29
29
  import { FriendlyScoreStatus } from "../enums/friendly-score-status.enum.js";
30
30
  import { FriendlyChallenge } from "../friendly-challenges/friendly-challenge.entity.js";
31
+ import { FriendlyMatchAttendance } from "../friendly-match-attendances/friendly-match-attendance.entity.js";
31
32
  import { FriendlyMatchExtra } from "../friendly-match-extras/friendly-match-extra.entity.js";
32
33
  import { FriendlyMatchGoal } from "../friendly-match-goals/friendly-match-goal.entity.js";
34
+ import { FriendlyMatchMvp } from "../friendly-match-mvps/friendly-match-mvp.entity.js";
35
+ import { FriendlyMvpVote } from "../friendly-mvp-votes/friendly-mvp-vote.entity.js";
33
36
  import { FriendlyScoreEvent } from "../friendly-score-events/friendly-score-event.entity.js";
34
37
  const STATUSES = Object.values(FriendlyMatchStatus).map((status) => `'${status}'`).join(", ");
35
38
  const SCORE_STATUSES = Object.values(FriendlyScoreStatus).map((status) => `'${status}'`).join(", ");
@@ -165,6 +168,14 @@ __decorateClass([
165
168
  comment: "Data/hora do cancelamento. Preenchida exatamente em cancelled."
166
169
  })
167
170
  ], FriendlyMatch.prototype, "cancelledAt", 2);
171
+ __decorateClass([
172
+ Column({
173
+ name: "mvp_closed_at",
174
+ type: "timestamptz",
175
+ nullable: true,
176
+ comment: "Quando a vota\xE7\xE3o do craque fechou (com ou sem votos). Nulo enquanto n\xE3o abriu ou segue aberta."
177
+ })
178
+ ], FriendlyMatch.prototype, "mvpClosedAt", 2);
168
179
  __decorateClass([
169
180
  CreateDateColumn({
170
181
  name: "created_at",
@@ -244,6 +255,15 @@ __decorateClass([
244
255
  __decorateClass([
245
256
  OneToMany(() => FriendlyScoreEvent, (event) => event.match)
246
257
  ], FriendlyMatch.prototype, "scoreEvents", 2);
258
+ __decorateClass([
259
+ OneToMany(() => FriendlyMatchAttendance, (attendance) => attendance.match)
260
+ ], FriendlyMatch.prototype, "attendances", 2);
261
+ __decorateClass([
262
+ OneToMany(() => FriendlyMvpVote, (vote) => vote.match)
263
+ ], FriendlyMatch.prototype, "mvpVotes", 2);
264
+ __decorateClass([
265
+ OneToMany(() => FriendlyMatchMvp, (mvp) => mvp.match)
266
+ ], FriendlyMatch.prototype, "mvps", 2);
247
267
  FriendlyMatch = __decorateClass([
248
268
  Entity("friendly_matches"),
249
269
  Index("UQ_friendly_matches_challenge", ["friendlyChallengeId"], { unique: true }),
@@ -0,0 +1,17 @@
1
+ import { User } from '../../app-auth';
2
+ import { PlayerTeam } from '../../teams/player-team/player-team.entity';
3
+ import { FriendlyMatch } from '../friendly-matches/friendly-match.entity';
4
+ export declare class FriendlyMvpVote {
5
+ id: number;
6
+ friendlyMatchId: number;
7
+ voterUserId: string;
8
+ voterPlayerTeamId: number;
9
+ votedPlayerTeamId: number;
10
+ createdAt: Date;
11
+ updatedAt: Date;
12
+ match: FriendlyMatch;
13
+ voterUser: User;
14
+ voterPlayerTeam: PlayerTeam;
15
+ votedPlayerTeam: PlayerTeam;
16
+ }
17
+ //# sourceMappingURL=friendly-mvp-vote.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"friendly-mvp-vote.entity.d.ts","sourceRoot":"","sources":["../../../src/friendlies/friendly-mvp-votes/friendly-mvp-vote.entity.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAc1E,qBAGa,eAAe;IAK1B,EAAE,EAAE,MAAM,CAAC;IAOX,eAAe,EAAE,MAAM,CAAC;IAOxB,WAAW,EAAE,MAAM,CAAC;IAOpB,iBAAiB,EAAE,MAAM,CAAC;IAO1B,iBAAiB,EAAE,MAAM,CAAC;IAO1B,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAShB,KAAK,EAAE,aAAa,CAAC;IAOrB,SAAS,EAAE,IAAI,CAAC;IAOhB,eAAe,EAAE,UAAU,CAAC;IAO5B,eAAe,EAAE,UAAU,CAAC;CAC7B"}
@@ -0,0 +1,110 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __decorateClass = (decorators, target, key, kind) => {
4
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
5
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
6
+ if (decorator = decorators[i])
7
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8
+ if (kind && result) __defProp(target, key, result);
9
+ return result;
10
+ };
11
+ import {
12
+ Check,
13
+ Column,
14
+ CreateDateColumn,
15
+ Entity,
16
+ JoinColumn,
17
+ ManyToOne,
18
+ PrimaryGeneratedColumn,
19
+ Unique,
20
+ UpdateDateColumn
21
+ } from "typeorm";
22
+ import { User } from "../../app-auth/index.js";
23
+ import { PlayerTeam } from "../../teams/player-team/player-team.entity.js";
24
+ import { FriendlyMatch } from "../friendly-matches/friendly-match.entity.js";
25
+ let FriendlyMvpVote = class {
26
+ };
27
+ __decorateClass([
28
+ PrimaryGeneratedColumn({
29
+ primaryKeyConstraintName: "PK_friendly_mvp_votes",
30
+ comment: "Identificador \xFAnico do voto."
31
+ })
32
+ ], FriendlyMvpVote.prototype, "id", 2);
33
+ __decorateClass([
34
+ Column({
35
+ name: "friendly_match_id",
36
+ type: "int",
37
+ comment: "FK friendly_matches.id."
38
+ })
39
+ ], FriendlyMvpVote.prototype, "friendlyMatchId", 2);
40
+ __decorateClass([
41
+ Column({
42
+ name: "voter_user_id",
43
+ type: "uuid",
44
+ comment: "FK users.id. Quem votou; um voto por pessoa e partida, troc\xE1vel na janela."
45
+ })
46
+ ], FriendlyMvpVote.prototype, "voterUserId", 2);
47
+ __decorateClass([
48
+ Column({
49
+ name: "voter_player_team_id",
50
+ type: "int",
51
+ comment: 'FK player_teams.id. O v\xEDnculo de quem votou, que disse "Vou".'
52
+ })
53
+ ], FriendlyMvpVote.prototype, "voterPlayerTeamId", 2);
54
+ __decorateClass([
55
+ Column({
56
+ name: "voted_player_team_id",
57
+ type: "int",
58
+ comment: "FK player_teams.id. O jogador votado, de qualquer um dos dois times."
59
+ })
60
+ ], FriendlyMvpVote.prototype, "votedPlayerTeamId", 2);
61
+ __decorateClass([
62
+ CreateDateColumn({
63
+ name: "created_at",
64
+ type: "timestamptz",
65
+ comment: "Data/hora do primeiro voto."
66
+ })
67
+ ], FriendlyMvpVote.prototype, "createdAt", 2);
68
+ __decorateClass([
69
+ UpdateDateColumn({
70
+ name: "updated_at",
71
+ type: "timestamptz",
72
+ comment: "Data/hora da \xFAltima troca de voto."
73
+ })
74
+ ], FriendlyMvpVote.prototype, "updatedAt", 2);
75
+ __decorateClass([
76
+ ManyToOne(() => FriendlyMatch, (match) => match.mvpVotes, { onDelete: "CASCADE" }),
77
+ JoinColumn({
78
+ name: "friendly_match_id",
79
+ foreignKeyConstraintName: "FK_friendly_mvp_votes_match"
80
+ })
81
+ ], FriendlyMvpVote.prototype, "match", 2);
82
+ __decorateClass([
83
+ ManyToOne(() => User, { onDelete: "CASCADE" }),
84
+ JoinColumn({
85
+ name: "voter_user_id",
86
+ foreignKeyConstraintName: "FK_friendly_mvp_votes_voter_user"
87
+ })
88
+ ], FriendlyMvpVote.prototype, "voterUser", 2);
89
+ __decorateClass([
90
+ ManyToOne(() => PlayerTeam, { onDelete: "CASCADE" }),
91
+ JoinColumn({
92
+ name: "voter_player_team_id",
93
+ foreignKeyConstraintName: "FK_friendly_mvp_votes_voter_player_team"
94
+ })
95
+ ], FriendlyMvpVote.prototype, "voterPlayerTeam", 2);
96
+ __decorateClass([
97
+ ManyToOne(() => PlayerTeam, { onDelete: "CASCADE" }),
98
+ JoinColumn({
99
+ name: "voted_player_team_id",
100
+ foreignKeyConstraintName: "FK_friendly_mvp_votes_voted_player_team"
101
+ })
102
+ ], FriendlyMvpVote.prototype, "votedPlayerTeam", 2);
103
+ FriendlyMvpVote = __decorateClass([
104
+ Entity("friendly_mvp_votes"),
105
+ Unique("UQ_friendly_mvp_votes_voter", ["friendlyMatchId", "voterUserId"]),
106
+ Check("CHK_friendly_mvp_votes_not_self", `"voter_player_team_id" <> "voted_player_team_id"`)
107
+ ], FriendlyMvpVote);
108
+ export {
109
+ FriendlyMvpVote
110
+ };
@@ -0,0 +1,2 @@
1
+ export { FriendlyMvpVote } from './friendly-mvp-vote.entity';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/friendlies/friendly-mvp-votes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { FriendlyMvpVote } from "./friendly-mvp-vote.entity.js";
2
+ export {
3
+ FriendlyMvpVote
4
+ };
@@ -0,0 +1,36 @@
1
+ import { User } from '../../app-auth';
2
+ import { Facility } from '../../facilities/facilities/facility.entity';
3
+ import { Modality } from '../../teams/team-modality/enums/modality.enum';
4
+ import { Team } from '../../teams/teams/team.entity';
5
+ import { FriendlyOpenChallengeStatus } from '../enums/friendly-open-challenge-status.enum';
6
+ import { FriendlyScheduleKind } from '../enums/friendly-schedule-kind.enum';
7
+ import { FriendlyChallenge } from '../friendly-challenges/friendly-challenge.entity';
8
+ export declare class FriendlyOpenChallenge {
9
+ id: number;
10
+ teamId: number;
11
+ modality: Modality;
12
+ status: FriendlyOpenChallengeStatus;
13
+ scheduleKind: FriendlyScheduleKind;
14
+ matchDate: string | null;
15
+ matchTime: string | null;
16
+ weekday: number | null;
17
+ facilityId: number | null;
18
+ expiresAt: Date;
19
+ createdByUserId: string;
20
+ acceptedFriendlyChallengeId: number | null;
21
+ acceptedByTeamId: number | null;
22
+ acceptedByUserId: string | null;
23
+ acceptedAt: Date | null;
24
+ closedByUserId: string | null;
25
+ closedAt: Date | null;
26
+ createdAt: Date;
27
+ updatedAt: Date;
28
+ team: Team;
29
+ facility: Facility | null;
30
+ createdByUser: User;
31
+ acceptedChallenge: FriendlyChallenge | null;
32
+ acceptedByTeam: Team | null;
33
+ acceptedByUser: User | null;
34
+ closedByUser: User | null;
35
+ }
36
+ //# sourceMappingURL=friendly-open-challenge.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"friendly-open-challenge.entity.d.ts","sourceRoot":"","sources":["../../../src/friendlies/friendly-open-challenges/friendly-open-challenge.entity.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,6CAA6C,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AACzE,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAE,2BAA2B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 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __decorateClass = (decorators, target, key, kind) => {
4
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
5
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
6
+ if (decorator = decorators[i])
7
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8
+ if (kind && result) __defProp(target, key, result);
9
+ return result;
10
+ };
11
+ import {
12
+ Check,
13
+ Column,
14
+ CreateDateColumn,
15
+ Entity,
16
+ Index,
17
+ JoinColumn,
18
+ ManyToOne,
19
+ PrimaryGeneratedColumn,
20
+ UpdateDateColumn
21
+ } from "typeorm";
22
+ import { User } from "../../app-auth/index.js";
23
+ import { Facility } from "../../facilities/facilities/facility.entity.js";
24
+ import { Modality } from "../../teams/team-modality/enums/modality.enum.js";
25
+ import { Team } from "../../teams/teams/team.entity.js";
26
+ import { FriendlyOpenChallengeStatus } from "../enums/friendly-open-challenge-status.enum.js";
27
+ import { FriendlyScheduleKind } from "../enums/friendly-schedule-kind.enum.js";
28
+ import { FriendlyChallenge } from "../friendly-challenges/friendly-challenge.entity.js";
29
+ const STATUSES = Object.values(FriendlyOpenChallengeStatus).map((status) => `'${status}'`).join(", ");
30
+ const MODALITIES = Object.values(Modality).map((modality) => `'${modality}'`).join(", ");
31
+ const SCHEDULE_KINDS = Object.values(FriendlyScheduleKind).map((kind) => `'${kind}'`).join(", ");
32
+ let FriendlyOpenChallenge = class {
33
+ };
34
+ __decorateClass([
35
+ PrimaryGeneratedColumn({
36
+ primaryKeyConstraintName: "PK_friendly_open_challenges",
37
+ comment: "Identificador \xFAnico do desafio aberto (o item do mural)."
38
+ })
39
+ ], FriendlyOpenChallenge.prototype, "id", 2);
40
+ __decorateClass([
41
+ Column({
42
+ name: "team_id",
43
+ type: "int",
44
+ comment: "FK teams.id. Time que publicou e espera um advers\xE1rio."
45
+ })
46
+ ], FriendlyOpenChallenge.prototype, "teamId", 2);
47
+ __decorateClass([
48
+ Column({
49
+ type: "varchar",
50
+ length: 16,
51
+ comment: "Modalidade do jogo, com os valores de team_modalities.modality."
52
+ })
53
+ ], FriendlyOpenChallenge.prototype, "modality", 2);
54
+ __decorateClass([
55
+ Column({
56
+ type: "varchar",
57
+ length: 16,
58
+ default: FriendlyOpenChallengeStatus.OPEN,
59
+ comment: "open | accepted | cancelled | expired."
60
+ })
61
+ ], FriendlyOpenChallenge.prototype, "status", 2);
62
+ __decorateClass([
63
+ Column({
64
+ name: "schedule_kind",
65
+ type: "varchar",
66
+ length: 16,
67
+ comment: "date_time (data e hor\xE1rio) | date (s\xF3 data) | weekday (s\xF3 dia da semana) | open (tudo a combinar)."
68
+ })
69
+ ], FriendlyOpenChallenge.prototype, "scheduleKind", 2);
70
+ __decorateClass([
71
+ Column({
72
+ name: "match_date",
73
+ type: "date",
74
+ nullable: true,
75
+ comment: "Data proposta. S\xF3 em date_time e date."
76
+ })
77
+ ], FriendlyOpenChallenge.prototype, "matchDate", 2);
78
+ __decorateClass([
79
+ Column({
80
+ name: "match_time",
81
+ type: "time",
82
+ nullable: true,
83
+ comment: "Hor\xE1rio proposto (HH:MM:SS). S\xF3 em date_time."
84
+ })
85
+ ], FriendlyOpenChallenge.prototype, "matchTime", 2);
86
+ __decorateClass([
87
+ Column({
88
+ type: "smallint",
89
+ nullable: true,
90
+ comment: "Dia da semana proposto, 0 domingo a 6 s\xE1bado. S\xF3 em weekday."
91
+ })
92
+ ], FriendlyOpenChallenge.prototype, "weekday", 2);
93
+ __decorateClass([
94
+ Column({
95
+ name: "facility_id",
96
+ type: "int",
97
+ nullable: true,
98
+ comment: 'FK facilities.id. Local proposto; nulo \xE9 "a combinar".'
99
+ })
100
+ ], FriendlyOpenChallenge.prototype, "facilityId", 2);
101
+ __decorateClass([
102
+ Column({
103
+ name: "expires_at",
104
+ type: "timestamptz",
105
+ comment: "Quando sai do mural sem aceite: data e hor\xE1rio propostos em America/Sao_Paulo (00:00 sem hor\xE1rio); sem data, created_at + 7 dias."
106
+ })
107
+ ], FriendlyOpenChallenge.prototype, "expiresAt", 2);
108
+ __decorateClass([
109
+ Column({
110
+ name: "created_by_user_id",
111
+ type: "uuid",
112
+ comment: "FK users.id. Quem publicou; no amistoso que nasce, quem lan\xE7a o placar."
113
+ })
114
+ ], FriendlyOpenChallenge.prototype, "createdByUserId", 2);
115
+ __decorateClass([
116
+ Column({
117
+ name: "accepted_friendly_challenge_id",
118
+ type: "int",
119
+ nullable: true,
120
+ comment: "FK friendly_challenges.id. O amistoso que nasceu do aceite (j\xE1 accepted, com a partida)."
121
+ })
122
+ ], FriendlyOpenChallenge.prototype, "acceptedFriendlyChallengeId", 2);
123
+ __decorateClass([
124
+ Column({
125
+ name: "accepted_by_team_id",
126
+ type: "int",
127
+ nullable: true,
128
+ comment: "FK teams.id. O primeiro time que aceitou."
129
+ })
130
+ ], FriendlyOpenChallenge.prototype, "acceptedByTeamId", 2);
131
+ __decorateClass([
132
+ Column({
133
+ name: "accepted_by_user_id",
134
+ type: "uuid",
135
+ nullable: true,
136
+ comment: "FK users.id. Quem aceitou; no amistoso, quem responde o placar."
137
+ })
138
+ ], FriendlyOpenChallenge.prototype, "acceptedByUserId", 2);
139
+ __decorateClass([
140
+ Column({
141
+ name: "accepted_at",
142
+ type: "timestamptz",
143
+ nullable: true,
144
+ comment: "Data/hora do aceite. Preenchida exatamente em accepted."
145
+ })
146
+ ], FriendlyOpenChallenge.prototype, "acceptedAt", 2);
147
+ __decorateClass([
148
+ Column({
149
+ name: "closed_by_user_id",
150
+ type: "uuid",
151
+ nullable: true,
152
+ comment: "FK users.id. Quem cancelou. Nulo quando a rotina expirou."
153
+ })
154
+ ], FriendlyOpenChallenge.prototype, "closedByUserId", 2);
155
+ __decorateClass([
156
+ Column({
157
+ name: "closed_at",
158
+ type: "timestamptz",
159
+ nullable: true,
160
+ comment: "Data/hora do cancelamento ou da expira\xE7\xE3o."
161
+ })
162
+ ], FriendlyOpenChallenge.prototype, "closedAt", 2);
163
+ __decorateClass([
164
+ CreateDateColumn({
165
+ name: "created_at",
166
+ type: "timestamptz",
167
+ comment: "Data/hora da publica\xE7\xE3o no mural."
168
+ })
169
+ ], FriendlyOpenChallenge.prototype, "createdAt", 2);
170
+ __decorateClass([
171
+ UpdateDateColumn({
172
+ name: "updated_at",
173
+ type: "timestamptz",
174
+ comment: "Data/hora da \xFAltima atualiza\xE7\xE3o."
175
+ })
176
+ ], FriendlyOpenChallenge.prototype, "updatedAt", 2);
177
+ __decorateClass([
178
+ ManyToOne(() => Team, { onDelete: "RESTRICT" }),
179
+ JoinColumn({
180
+ name: "team_id",
181
+ foreignKeyConstraintName: "FK_friendly_open_challenges_team"
182
+ })
183
+ ], FriendlyOpenChallenge.prototype, "team", 2);
184
+ __decorateClass([
185
+ ManyToOne(() => Facility, { onDelete: "SET NULL" }),
186
+ JoinColumn({
187
+ name: "facility_id",
188
+ foreignKeyConstraintName: "FK_friendly_open_challenges_facility"
189
+ })
190
+ ], FriendlyOpenChallenge.prototype, "facility", 2);
191
+ __decorateClass([
192
+ ManyToOne(() => User, { onDelete: "RESTRICT" }),
193
+ JoinColumn({
194
+ name: "created_by_user_id",
195
+ foreignKeyConstraintName: "FK_friendly_open_challenges_created_by_user"
196
+ })
197
+ ], FriendlyOpenChallenge.prototype, "createdByUser", 2);
198
+ __decorateClass([
199
+ ManyToOne(() => FriendlyChallenge, { onDelete: "RESTRICT" }),
200
+ JoinColumn({
201
+ name: "accepted_friendly_challenge_id",
202
+ foreignKeyConstraintName: "FK_friendly_open_challenges_accepted_challenge"
203
+ })
204
+ ], FriendlyOpenChallenge.prototype, "acceptedChallenge", 2);
205
+ __decorateClass([
206
+ ManyToOne(() => Team, { onDelete: "RESTRICT" }),
207
+ JoinColumn({
208
+ name: "accepted_by_team_id",
209
+ foreignKeyConstraintName: "FK_friendly_open_challenges_accepted_by_team"
210
+ })
211
+ ], FriendlyOpenChallenge.prototype, "acceptedByTeam", 2);
212
+ __decorateClass([
213
+ ManyToOne(() => User, { onDelete: "RESTRICT" }),
214
+ JoinColumn({
215
+ name: "accepted_by_user_id",
216
+ foreignKeyConstraintName: "FK_friendly_open_challenges_accepted_by_user"
217
+ })
218
+ ], FriendlyOpenChallenge.prototype, "acceptedByUser", 2);
219
+ __decorateClass([
220
+ ManyToOne(() => User, { onDelete: "RESTRICT" }),
221
+ JoinColumn({
222
+ name: "closed_by_user_id",
223
+ foreignKeyConstraintName: "FK_friendly_open_challenges_closed_by_user"
224
+ })
225
+ ], FriendlyOpenChallenge.prototype, "closedByUser", 2);
226
+ FriendlyOpenChallenge = __decorateClass([
227
+ Entity("friendly_open_challenges"),
228
+ Index("IDX_friendly_open_challenges_team_status", ["teamId", "status"]),
229
+ Index("IDX_friendly_open_challenges_open", ["expiresAt"], {
230
+ where: `"status" = 'open'`
231
+ }),
232
+ Check("CHK_friendly_open_challenges_status", `"status" IN (${STATUSES})`),
233
+ Check("CHK_friendly_open_challenges_modality", `"modality" IN (${MODALITIES})`),
234
+ Check("CHK_friendly_open_challenges_schedule_kind", `"schedule_kind" IN (${SCHEDULE_KINDS})`),
235
+ Check(
236
+ "CHK_friendly_open_challenges_schedule",
237
+ `("schedule_kind" = 'date_time' AND "match_date" IS NOT NULL AND "match_time" IS NOT NULL AND "weekday" IS NULL) OR ("schedule_kind" = 'date' AND "match_date" IS NOT NULL AND "match_time" IS NULL AND "weekday" IS NULL) OR ("schedule_kind" = 'weekday' AND "match_date" IS NULL AND "match_time" IS NULL AND "weekday" IS NOT NULL) OR ("schedule_kind" = 'open' AND "match_date" IS NULL AND "match_time" IS NULL AND "weekday" IS NULL)`
238
+ ),
239
+ Check("CHK_friendly_open_challenges_weekday", `"weekday" IS NULL OR "weekday" BETWEEN 0 AND 6`),
240
+ Check(
241
+ "CHK_friendly_open_challenges_accepted",
242
+ `("status" = 'accepted') = ("accepted_at" IS NOT NULL AND "accepted_by_user_id" IS NOT NULL AND "accepted_by_team_id" IS NOT NULL AND "accepted_friendly_challenge_id" IS NOT NULL)`
243
+ ),
244
+ Check(
245
+ "CHK_friendly_open_challenges_closed",
246
+ `("status" IN ('cancelled', 'expired')) = ("closed_at" IS NOT NULL)`
247
+ ),
248
+ Check(
249
+ "CHK_friendly_open_challenges_distinct_teams",
250
+ `"accepted_by_team_id" IS NULL OR "accepted_by_team_id" <> "team_id"`
251
+ )
252
+ ], FriendlyOpenChallenge);
253
+ export {
254
+ FriendlyOpenChallenge
255
+ };
@@ -0,0 +1,2 @@
1
+ export { FriendlyOpenChallenge } from './friendly-open-challenge.entity';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/friendlies/friendly-open-challenges/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { FriendlyOpenChallenge } from "./friendly-open-challenge.entity.js";
2
+ export {
3
+ FriendlyOpenChallenge
4
+ };
@@ -1,15 +1,23 @@
1
+ export { FriendlyAttendanceStatus } from './enums/friendly-attendance-status.enum';
1
2
  export { FriendlyChallengeStatus } from './enums/friendly-challenge-status.enum';
2
3
  export { FriendlyDeclineReason } from './enums/friendly-decline-reason.enum';
3
4
  export { FriendlyMatchStatus } from './enums/friendly-match-status.enum';
5
+ export { FriendlyOpenChallengeStatus } from './enums/friendly-open-challenge-status.enum';
4
6
  export { FriendlyResource } from './enums/friendly-resource.enum';
5
7
  export { FriendlyResponsible } from './enums/friendly-responsible.enum';
8
+ export { FriendlyScheduleKind } from './enums/friendly-schedule-kind.enum';
6
9
  export { FriendlyScoreEventType } from './enums/friendly-score-event-type.enum';
7
10
  export { FriendlyScoreStatus } from './enums/friendly-score-status.enum';
11
+ export * from './friendly-board-preferences';
8
12
  export * from './friendly-challenge-extras';
9
13
  export * from './friendly-challenges';
14
+ export * from './friendly-match-attendances';
10
15
  export * from './friendly-match-extras';
11
16
  export * from './friendly-match-goals';
17
+ export * from './friendly-match-mvps';
12
18
  export * from './friendly-matches';
19
+ export * from './friendly-mvp-votes';
20
+ export * from './friendly-open-challenges';
13
21
  export * from './friendly-requests';
14
22
  export * from './friendly-score-events';
15
23
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/friendlies/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/friendlies/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,2BAA2B,EAAE,MAAM,6CAA6C,CAAC;AAC1F,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC"}
@@ -1,23 +1,34 @@
1
+ import { FriendlyAttendanceStatus } from "./enums/friendly-attendance-status.enum.js";
1
2
  import { FriendlyChallengeStatus } from "./enums/friendly-challenge-status.enum.js";
2
3
  import { FriendlyDeclineReason } from "./enums/friendly-decline-reason.enum.js";
3
4
  import { FriendlyMatchStatus } from "./enums/friendly-match-status.enum.js";
5
+ import { FriendlyOpenChallengeStatus } from "./enums/friendly-open-challenge-status.enum.js";
4
6
  import { FriendlyResource } from "./enums/friendly-resource.enum.js";
5
7
  import { FriendlyResponsible } from "./enums/friendly-responsible.enum.js";
8
+ import { FriendlyScheduleKind } from "./enums/friendly-schedule-kind.enum.js";
6
9
  import { FriendlyScoreEventType } from "./enums/friendly-score-event-type.enum.js";
7
10
  import { FriendlyScoreStatus } from "./enums/friendly-score-status.enum.js";
11
+ export * from "./friendly-board-preferences/index.js";
8
12
  export * from "./friendly-challenge-extras/index.js";
9
13
  export * from "./friendly-challenges/index.js";
14
+ export * from "./friendly-match-attendances/index.js";
10
15
  export * from "./friendly-match-extras/index.js";
11
16
  export * from "./friendly-match-goals/index.js";
17
+ export * from "./friendly-match-mvps/index.js";
12
18
  export * from "./friendly-matches/index.js";
19
+ export * from "./friendly-mvp-votes/index.js";
20
+ export * from "./friendly-open-challenges/index.js";
13
21
  export * from "./friendly-requests/index.js";
14
22
  export * from "./friendly-score-events/index.js";
15
23
  export {
24
+ FriendlyAttendanceStatus,
16
25
  FriendlyChallengeStatus,
17
26
  FriendlyDeclineReason,
18
27
  FriendlyMatchStatus,
28
+ FriendlyOpenChallengeStatus,
19
29
  FriendlyResource,
20
30
  FriendlyResponsible,
31
+ FriendlyScheduleKind,
21
32
  FriendlyScoreEventType,
22
33
  FriendlyScoreStatus
23
34
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natrave/shared-entities",
3
- "version": "8.42.1",
3
+ "version": "8.43.0",
4
4
  "description": "Entidades compartilhadass da NaTrave",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.js",