@natrave/shared-entities 8.2.0 → 8.4.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.
@@ -10,6 +10,7 @@ export declare class BillingSubscription {
10
10
  status: BillingSubscriptionStatus;
11
11
  trialStartsAt: Date | null;
12
12
  trialEndsAt: Date | null;
13
+ freeMatchQuotaOverride: number | null;
13
14
  activatedAt: Date | null;
14
15
  canceledAt: Date | null;
15
16
  currentPeriodStart: Date | null;
@@ -1 +1 @@
1
- {"version":3,"file":"billing-subscription.entity.d.ts","sourceRoot":"","sources":["../../../src/billing/billing-subscriptions/billing-subscription.entity.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AAiBrF,qBAUa,mBAAmB;IAI9B,EAAE,EAAE,MAAM,CAAC;IAOX,gBAAgB,EAAE,MAAM,CAAC;IASzB,iBAAiB,EAAE,wBAAwB,CAAC;IAO5C,eAAe,EAAE,MAAM,CAAC;IASxB,MAAM,EAAE,yBAAyB,CAAC;IAQlC,aAAa,EAAE,IAAI,GAAG,IAAI,CAAC;IAQ3B,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IAQzB,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IAQzB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAC;IAQxB,kBAAkB,EAAE,IAAI,GAAG,IAAI,CAAC;IAQhC,gBAAgB,EAAE,IAAI,GAAG,IAAI,CAAC;IAO9B,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAYhB,cAAc,EAAE,cAAc,CAAC;IAM/B,KAAK,EAAE,uBAAuB,EAAE,CAAC;CAClC"}
1
+ {"version":3,"file":"billing-subscription.entity.d.ts","sourceRoot":"","sources":["../../../src/billing/billing-subscriptions/billing-subscription.entity.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AAyBrF,qBAca,mBAAmB;IAI9B,EAAE,EAAE,MAAM,CAAC;IAOX,gBAAgB,EAAE,MAAM,CAAC;IASzB,iBAAiB,EAAE,wBAAwB,CAAC;IAO5C,eAAe,EAAE,MAAM,CAAC;IASxB,MAAM,EAAE,yBAAyB,CAAC;IAQlC,aAAa,EAAE,IAAI,GAAG,IAAI,CAAC;IAQ3B,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IAQzB,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAC;IAQtC,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IAQzB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAC;IAQxB,kBAAkB,EAAE,IAAI,GAAG,IAAI,CAAC;IAQhC,gBAAgB,EAAE,IAAI,GAAG,IAAI,CAAC;IAO9B,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAYhB,cAAc,EAAE,cAAc,CAAC;IAM/B,KAAK,EAAE,uBAAuB,EAAE,CAAC;CAClC"}
@@ -9,6 +9,7 @@ var __decorateClass = (decorators, target, key, kind) => {
9
9
  return result;
10
10
  };
11
11
  import {
12
+ Check,
12
13
  Column,
13
14
  CreateDateColumn,
14
15
  Entity,
@@ -79,6 +80,14 @@ __decorateClass([
79
80
  comment: "Fim do trial. Nulo quando a assinatura n\xE3o tem trial."
80
81
  })
81
82
  ], BillingSubscription.prototype, "trialEndsAt", 2);
83
+ __decorateClass([
84
+ Column({
85
+ name: "free_match_quota_override",
86
+ type: "int",
87
+ nullable: true,
88
+ comment: "Cota de partidas gratuitas S\xD3 deste campeonato (cortesia). Nulo = usa a do plano."
89
+ })
90
+ ], BillingSubscription.prototype, "freeMatchQuotaOverride", 2);
82
91
  __decorateClass([
83
92
  Column({
84
93
  name: "activated_at",
@@ -136,6 +145,10 @@ __decorateClass([
136
145
  ], BillingSubscription.prototype, "items", 2);
137
146
  BillingSubscription = __decorateClass([
138
147
  Entity("billing_subscriptions"),
148
+ Check(
149
+ "CHK_billing_subscriptions_free_match_quota_override_non_negative",
150
+ '"free_match_quota_override" IS NULL OR "free_match_quota_override" >= 0'
151
+ ),
139
152
  Unique("UQ_billing_subscriptions_subject", ["subjectEntityType", "subjectEntityId"]),
140
153
  Index("idx_billing_subscriptions_account", ["billingAccountId"]),
141
154
  Index("idx_billing_subscriptions_subject", ["subjectEntityType", "subjectEntityId"]),
@@ -1,11 +1,12 @@
1
- import { ITournamentMatchRule } from '@natrave/tournaments-service-types';
2
1
  import { Tournament } from '../tournaments';
3
- export declare class TournamentMatchRule implements ITournamentMatchRule {
2
+ export declare class TournamentMatchRule {
4
3
  id: number;
5
4
  tournamentId: number;
6
5
  playersPerTeam: number | null;
7
6
  halfDuration: number | null;
8
7
  halftimeBreak: number | null;
8
+ substitutionsUnlimited: boolean | null;
9
+ maxSubstitutionsPerMatch: number | null;
9
10
  createdAt: Date;
10
11
  updatedAt: Date;
11
12
  tournament: Tournament;
@@ -1 +1 @@
1
- {"version":3,"file":"tournament-match-rule.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-match-rules/tournament-match-rule.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAY1E,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAO5C,qBAEa,mBAAoB,YAAW,oBAAoB;IAI9D,EAAE,EAAE,MAAM,CAAC;IAQX,YAAY,EAAE,MAAM,CAAC;IAQrB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ9B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ5B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAO7B,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAShB,UAAU,EAAE,UAAU,CAAC;CACxB"}
1
+ {"version":3,"file":"tournament-match-rule.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-match-rules/tournament-match-rule.entity.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAO5C,qBAEa,mBAAmB;IAI9B,EAAE,EAAE,MAAM,CAAC;IAQX,YAAY,EAAE,MAAM,CAAC;IAQrB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ9B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ5B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAS7B,sBAAsB,EAAE,OAAO,GAAG,IAAI,CAAC;IASvC,wBAAwB,EAAE,MAAM,GAAG,IAAI,CAAC;IAOxC,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAShB,UAAU,EAAE,UAAU,CAAC;CACxB"}
@@ -58,6 +58,22 @@ __decorateClass([
58
58
  comment: "Dura\xE7\xE3o do intervalo entre os tempos em minutos."
59
59
  })
60
60
  ], TournamentMatchRule.prototype, "halftimeBreak", 2);
61
+ __decorateClass([
62
+ Column({
63
+ type: "boolean",
64
+ name: "substitutions_unlimited",
65
+ nullable: true,
66
+ comment: "Se o organizador declarou substitui\xE7\xF5es ilimitadas. Nulo = nunca foi perguntado (o comportamento tamb\xE9m \xE9 ilimitado, mas a escolha n\xE3o foi feita)."
67
+ })
68
+ ], TournamentMatchRule.prototype, "substitutionsUnlimited", 2);
69
+ __decorateClass([
70
+ Column({
71
+ type: "int",
72
+ name: "max_substitutions_per_match",
73
+ nullable: true,
74
+ comment: "M\xE1ximo de substitui\xE7\xF5es por equipe em cada partida. Nulo quando n\xE3o h\xE1 teto (ilimitado, declarado ou n\xE3o)."
75
+ })
76
+ ], TournamentMatchRule.prototype, "maxSubstitutionsPerMatch", 2);
61
77
  __decorateClass([
62
78
  CreateDateColumn({
63
79
  name: "created_at",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natrave/shared-entities",
3
- "version": "8.2.0",
3
+ "version": "8.4.0",
4
4
  "description": "Entidades compartilhadass da NaTrave",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.js",