@natrave/shared-entities 8.27.0 → 8.29.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.
@@ -2,4 +2,8 @@ export declare const DecimalTransformer: {
2
2
  to: (value: number) => number;
3
3
  from: (value: string) => number;
4
4
  };
5
+ export declare const NullableDecimalTransformer: {
6
+ to: (value: number | null | undefined) => number | null;
7
+ from: (value: string | null) => number | null;
8
+ };
5
9
  //# sourceMappingURL=decimal-transformer.utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"decimal-transformer.utils.d.ts","sourceRoot":"","sources":["../../../src/common/utils/decimal-transformer.utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB;gBACjB,MAAM,KAAG,MAAM;kBAMb,MAAM,KAAG,MAAM;CAK9B,CAAC"}
1
+ {"version":3,"file":"decimal-transformer.utils.d.ts","sourceRoot":"","sources":["../../../src/common/utils/decimal-transformer.utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB;gBACjB,MAAM,KAAG,MAAM;kBAMb,MAAM,KAAG,MAAM;CAK9B,CAAC;AAMF,eAAO,MAAM,0BAA0B;gBACzB,MAAM,GAAG,IAAI,GAAG,SAAS,KAAG,MAAM,GAAG,IAAI;kBAMvC,MAAM,GAAG,IAAI,KAAG,MAAM,GAAG,IAAI;CAK5C,CAAC"}
@@ -11,6 +11,20 @@ const DecimalTransformer = {
11
11
  return isNaN(parsed) ? NaN : parsed;
12
12
  }
13
13
  };
14
+ const NullableDecimalTransformer = {
15
+ to: (value) => {
16
+ if (typeof value !== "number" || !Number.isFinite(value)) {
17
+ return null;
18
+ }
19
+ return value;
20
+ },
21
+ from: (value) => {
22
+ if (value === null || value === void 0) return null;
23
+ const parsed = parseFloat(value.trim());
24
+ return Number.isFinite(parsed) ? parsed : null;
25
+ }
26
+ };
14
27
  export {
15
- DecimalTransformer
28
+ DecimalTransformer,
29
+ NullableDecimalTransformer
16
30
  };
@@ -10,7 +10,7 @@ import { Notification, NotificationDelivery, NotificationDispatchLog, PushDevice
10
10
  import { Payment, PaymentProvider, UserPaymentProvider } from '../payments';
11
11
  import { Player, PlayerPersonalData, PlayerPosition } from '../players';
12
12
  import { PlayerTeam, Team, TeamAccessCode, TeamJoinRequest, TeamKit, TeamModality, TeamSponsor, TeamTrophy } from '../teams';
13
- import { 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, TournamentTeam, TournamentTeamInvitation, TournamentTieBreakConfig } from '../tournaments';
13
+ import { 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, TournamentTeam, TournamentTeamInvitation, TournamentTeamMemberNote, TournamentTieBreakConfig } from '../tournaments';
14
14
  import { UserDomainEvent, UserEventView } from '../user-events';
15
- 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 TournamentMatchReferee | typeof Referee | typeof RegulationExtraction | typeof Tournament | 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 TournamentTeamInvitation | 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 PlayerPosition | typeof PlayerPersonalData | typeof UserAuthProvider | typeof RefreshToken | 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 UserDomainEvent | typeof UserEventView)[];
15
+ 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 TournamentMatchReferee | typeof Referee | typeof RegulationExtraction | typeof Tournament | 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 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 PlayerPosition | typeof PlayerPersonalData | typeof UserAuthProvider | typeof RefreshToken | 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 UserDomainEvent | typeof UserEventView)[];
16
16
  //# 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,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,C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BAA+B,EAC/B,6BAA6B,EAC7B,iCAAiC,EAEjC,+BAA+B,EAE/B,cAAc,EACd,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEhE,eAAO,MAAM,iBAAiB,4rFAyG7B,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,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,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,UAAU,EACV,IAAI,EACJ,cAAc,EACd,eAAe,EACf,OAAO,EACP,YAAY,EACZ,WAAW,EACX,UAAU,EACX,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,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,EAE/B,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,8tFA0G7B,CAAC"}
@@ -101,6 +101,7 @@ import {
101
101
  TournamentRule,
102
102
  TournamentTeam,
103
103
  TournamentTeamInvitation,
104
+ TournamentTeamMemberNote,
104
105
  TournamentTieBreakConfig
105
106
  } from "../tournaments/index.js";
106
107
  import { UserDomainEvent, UserEventView } from "../user-events/index.js";
@@ -177,6 +178,7 @@ const DATABASE_ENTITIES = [
177
178
  TournamentRegistrationRequest,
178
179
  TournamentRegulationField,
179
180
  TournamentRegulationFieldStatus,
181
+ TournamentTeamMemberNote,
180
182
  TournamentRule,
181
183
  TournamentTeam,
182
184
  TournamentTeamInvitation,
@@ -1,8 +1,7 @@
1
- import { IAddress } from '@natrave/facility-service-types';
2
1
  import { OrganizationUserBillingInfo } from '../../central-auth';
3
2
  import { BrazilianState } from '../../common/enums/brazilian-state.enum';
4
3
  import { Facility } from '../../facilities/facilities';
5
- export declare class Address implements IAddress {
4
+ export declare class Address {
6
5
  id: number;
7
6
  createdAt: Date;
8
7
  updatedAt: Date;
@@ -14,8 +13,8 @@ export declare class Address implements IAddress {
14
13
  state: BrazilianState;
15
14
  postalCode: string;
16
15
  country: string;
17
- latitude: number;
18
- longitude: number;
16
+ latitude: number | null;
17
+ longitude: number | null;
19
18
  facilities: Facility[];
20
19
  organizationUserBillingInfos: OrganizationUserBillingInfo[];
21
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"address.entity.d.ts","sourceRoot":"","sources":["../../../src/facilities/addresses/address.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAW3D,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAEzE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAWvD,qBAEa,OAAQ,YAAW,QAAQ;IAItC,EAAE,EAAE,MAAM,CAAC;IAOX,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAQhB,aAAa,EAAE,MAAM,CAAC;IAQtB,MAAM,EAAE,MAAM,CAAC;IAQf,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAO1B,YAAY,EAAE,MAAM,CAAC;IAOrB,IAAI,EAAE,MAAM,CAAC;IAOb,KAAK,EAAE,cAAc,CAAC;IAQtB,UAAU,EAAE,MAAM,CAAC;IAOnB,OAAO,EAAE,MAAM,CAAC;IAShB,QAAQ,EAAE,MAAM,CAAC;IASjB,SAAS,EAAE,MAAM,CAAC;IAUlB,UAAU,EAAE,QAAQ,EAAE,CAAC;IAMvB,4BAA4B,EAAE,2BAA2B,EAAE,CAAC;CAC7D"}
1
+ {"version":3,"file":"address.entity.d.ts","sourceRoot":"","sources":["../../../src/facilities/addresses/address.entity.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAEzE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAWvD,qBAEa,OAAO;IAIlB,EAAE,EAAE,MAAM,CAAC;IAOX,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAQhB,aAAa,EAAE,MAAM,CAAC;IAQtB,MAAM,EAAE,MAAM,CAAC;IAQf,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAO1B,YAAY,EAAE,MAAM,CAAC;IAOrB,IAAI,EAAE,MAAM,CAAC;IAOb,KAAK,EAAE,cAAc,CAAC;IAQtB,UAAU,EAAE,MAAM,CAAC;IAOnB,OAAO,EAAE,MAAM,CAAC;IAWhB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAWxB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAUzB,UAAU,EAAE,QAAQ,EAAE,CAAC;IAMvB,4BAA4B,EAAE,2BAA2B,EAAE,CAAC;CAC7D"}
@@ -19,7 +19,7 @@ import {
19
19
  } from "typeorm";
20
20
  import { OrganizationUserBillingInfo } from "../../central-auth/index.js";
21
21
  import { BrazilianState } from "../../common/enums/brazilian-state.enum.js";
22
- import { DecimalTransformer } from "../../common/utils/decimal-transformer.utils.js";
22
+ import { NullableDecimalTransformer } from "../../common/utils/decimal-transformer.utils.js";
23
23
  import { Facility } from "../../facilities/facilities/index.js";
24
24
  let Address = class {
25
25
  };
@@ -107,8 +107,9 @@ __decorateClass([
107
107
  type: "decimal",
108
108
  precision: 10,
109
109
  scale: 8,
110
- transformer: DecimalTransformer,
111
- comment: "Coordenada geogr\xE1fica de latitude."
110
+ nullable: true,
111
+ transformer: NullableDecimalTransformer,
112
+ comment: "Coordenada geogr\xE1fica de latitude. Nulo quando o local n\xE3o tem localiza\xE7\xE3o conhecida."
112
113
  })
113
114
  ], Address.prototype, "latitude", 2);
114
115
  __decorateClass([
@@ -116,8 +117,9 @@ __decorateClass([
116
117
  type: "decimal",
117
118
  precision: 11,
118
119
  scale: 8,
119
- transformer: DecimalTransformer,
120
- comment: "Coordenada geogr\xE1fica de longitude."
120
+ nullable: true,
121
+ transformer: NullableDecimalTransformer,
122
+ comment: "Coordenada geogr\xE1fica de longitude. Nulo quando o local n\xE3o tem localiza\xE7\xE3o conhecida."
121
123
  })
122
124
  ], Address.prototype, "longitude", 2);
123
125
  __decorateClass([
@@ -44,6 +44,7 @@ export * from './tournament-regulation-field-statuses';
44
44
  export * from './tournament-regulation-fields';
45
45
  export * from './tournament-rules';
46
46
  export * from './tournament-team-invitations';
47
+ export * from './tournament-team-member-notes';
47
48
  export * from './tournament-teams';
48
49
  export * from './tournament-tie-break-configs';
49
50
  export * from './tournaments';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tournaments/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC5E,YAAY,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC7F,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAC9F,OAAO,EAAE,YAAY,EAAE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iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,uCAAuC,CAAC;AACtD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AACvD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,eAAe,CAAC"}
@@ -43,6 +43,7 @@ export * from "./tournament-regulation-field-statuses/index.js";
43
43
  export * from "./tournament-regulation-fields/index.js";
44
44
  export * from "./tournament-rules/index.js";
45
45
  export * from "./tournament-team-invitations/index.js";
46
+ export * from "./tournament-team-member-notes/index.js";
46
47
  export * from "./tournament-teams/index.js";
47
48
  export * from "./tournament-tie-break-configs/index.js";
48
49
  export * from "./tournaments/index.js";
@@ -0,0 +1,2 @@
1
+ export { TOURNAMENT_TEAM_MEMBER_NOTE_MAX_LENGTH, TournamentTeamMemberNote, } from './tournament-team-member-note.entity';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-team-member-notes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sCAAsC,EACtC,wBAAwB,GACzB,MAAM,sCAAsC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import {
2
+ TOURNAMENT_TEAM_MEMBER_NOTE_MAX_LENGTH,
3
+ TournamentTeamMemberNote
4
+ } from "./tournament-team-member-note.entity.js";
5
+ export {
6
+ TOURNAMENT_TEAM_MEMBER_NOTE_MAX_LENGTH,
7
+ TournamentTeamMemberNote
8
+ };
@@ -0,0 +1,16 @@
1
+ import { PlayerTeam } from '../../teams';
2
+ import { TournamentTeam } from '../tournament-teams';
3
+ export declare const TOURNAMENT_TEAM_MEMBER_NOTE_MAX_LENGTH = 280;
4
+ export declare class TournamentTeamMemberNote {
5
+ id: number;
6
+ tournamentTeamId: number;
7
+ playerTeamId: number;
8
+ note: string;
9
+ createdByOrganizationUserId: number;
10
+ updatedByOrganizationUserId: number | null;
11
+ createdAt: Date;
12
+ updatedAt: Date;
13
+ tournamentTeam?: TournamentTeam;
14
+ playerTeam?: PlayerTeam;
15
+ }
16
+ //# sourceMappingURL=tournament-team-member-note.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tournament-team-member-note.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-team-member-notes/tournament-team-member-note.entity.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGrD,eAAO,MAAM,sCAAsC,MAAM,CAAC;AA8B1D,qBASa,wBAAwB;IAKnC,EAAE,EAAE,MAAM,CAAC;IAOX,gBAAgB,EAAE,MAAM,CAAC;IAOzB,YAAY,EAAE,MAAM,CAAC;IAMrB,IAAI,EAAE,MAAM,CAAC;IAOb,2BAA2B,EAAE,MAAM,CAAC;IAQpC,2BAA2B,EAAE,MAAM,GAAG,IAAI,CAAC;IAG3C,SAAS,EAAE,IAAI,CAAC;IAGhB,SAAS,EAAE,IAAI,CAAC;IAUhB,cAAc,CAAC,EAAE,cAAc,CAAC;IAQhC,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB"}
@@ -0,0 +1,101 @@
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 { PlayerTeam } from "../../teams/index.js";
24
+ import { TournamentTeam } from "../tournament-teams/index.js";
25
+ const TOURNAMENT_TEAM_MEMBER_NOTE_MAX_LENGTH = 280;
26
+ let TournamentTeamMemberNote = class {
27
+ };
28
+ __decorateClass([
29
+ PrimaryGeneratedColumn({
30
+ primaryKeyConstraintName: "PK_tournament_team_member_notes",
31
+ comment: "Identificador da observa\xE7\xE3o."
32
+ })
33
+ ], TournamentTeamMemberNote.prototype, "id", 2);
34
+ __decorateClass([
35
+ Column({
36
+ name: "tournament_team_id",
37
+ type: "int",
38
+ comment: "FK tournament_teams.id: o time NA CATEGORIA a que a observa\xE7\xE3o pertence."
39
+ })
40
+ ], TournamentTeamMemberNote.prototype, "tournamentTeamId", 2);
41
+ __decorateClass([
42
+ Column({
43
+ name: "player_team_id",
44
+ type: "int",
45
+ comment: "FK player_teams.id: o membro do elenco (jogador ou comiss\xE3o t\xE9cnica)."
46
+ })
47
+ ], TournamentTeamMemberNote.prototype, "playerTeamId", 2);
48
+ __decorateClass([
49
+ Column({
50
+ type: "text",
51
+ comment: `Texto livre do organizador, at\xE9 ${TOURNAMENT_TEAM_MEMBER_NOTE_MAX_LENGTH} caracteres. Interno da organiza\xE7\xE3o.`
52
+ })
53
+ ], TournamentTeamMemberNote.prototype, "note", 2);
54
+ __decorateClass([
55
+ Column({
56
+ name: "created_by_organization_user_id",
57
+ type: "int",
58
+ comment: "organization_users.id de quem escreveu."
59
+ })
60
+ ], TournamentTeamMemberNote.prototype, "createdByOrganizationUserId", 2);
61
+ __decorateClass([
62
+ Column({
63
+ name: "updated_by_organization_user_id",
64
+ type: "int",
65
+ nullable: true,
66
+ comment: "organization_users.id de quem editou o texto por \xFAltimo. Nulo se nunca editada."
67
+ })
68
+ ], TournamentTeamMemberNote.prototype, "updatedByOrganizationUserId", 2);
69
+ __decorateClass([
70
+ CreateDateColumn({ name: "created_at", type: "timestamptz" })
71
+ ], TournamentTeamMemberNote.prototype, "createdAt", 2);
72
+ __decorateClass([
73
+ UpdateDateColumn({ name: "updated_at", type: "timestamptz" })
74
+ ], TournamentTeamMemberNote.prototype, "updatedAt", 2);
75
+ __decorateClass([
76
+ ManyToOne(() => TournamentTeam, { onDelete: "CASCADE" }),
77
+ JoinColumn({
78
+ name: "tournament_team_id",
79
+ foreignKeyConstraintName: "FK_tournament_team_member_notes_tournament_team"
80
+ })
81
+ ], TournamentTeamMemberNote.prototype, "tournamentTeam", 2);
82
+ __decorateClass([
83
+ ManyToOne(() => PlayerTeam, { onDelete: "CASCADE" }),
84
+ JoinColumn({
85
+ name: "player_team_id",
86
+ foreignKeyConstraintName: "FK_tournament_team_member_notes_player_team"
87
+ })
88
+ ], TournamentTeamMemberNote.prototype, "playerTeam", 2);
89
+ TournamentTeamMemberNote = __decorateClass([
90
+ Entity("tournament_team_member_notes"),
91
+ Unique("UQ_tournament_team_member_notes_team_member", ["tournamentTeamId", "playerTeamId"]),
92
+ Index("IDX_tournament_team_member_notes_player_team", ["playerTeamId"]),
93
+ Check(
94
+ "CHK_tournament_team_member_notes_note",
95
+ `btrim("note") <> '' AND char_length("note") <= ${TOURNAMENT_TEAM_MEMBER_NOTE_MAX_LENGTH}`
96
+ )
97
+ ], TournamentTeamMemberNote);
98
+ export {
99
+ TOURNAMENT_TEAM_MEMBER_NOTE_MAX_LENGTH,
100
+ TournamentTeamMemberNote
101
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natrave/shared-entities",
3
- "version": "8.27.0",
3
+ "version": "8.29.0",
4
4
  "description": "Entidades compartilhadass da NaTrave",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.js",