@natrave/shared-entities 1.2.39 → 1.2.41

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 (28) hide show
  1. package/dist/central-auth/organizations/organization.entity.d.ts +1 -1
  2. package/dist/central-auth/organizations/organization.entity.d.ts.map +1 -1
  3. package/dist/central-auth/organizations/organization.entity.js +1 -1
  4. package/dist/coupons/coupon-usages/coupon-usage.entity.d.ts +1 -1
  5. package/dist/coupons/coupon-usages/coupon-usage.entity.d.ts.map +1 -1
  6. package/dist/coupons/coupon-usages/coupon-usage.entity.js +1 -1
  7. package/dist/coupons/coupons/coupon.entity.d.ts +2 -2
  8. package/dist/coupons/coupons/coupon.entity.d.ts.map +1 -1
  9. package/dist/coupons/coupons/coupon.entity.js +2 -2
  10. package/dist/facilities/addresses/address.entity.d.ts +1 -1
  11. package/dist/facilities/addresses/address.entity.d.ts.map +1 -1
  12. package/dist/facilities/addresses/address.entity.js +1 -1
  13. package/dist/notifications/email-templates/email-template.entity.d.ts +3 -3
  14. package/dist/notifications/email-templates/email-template.entity.d.ts.map +1 -1
  15. package/dist/notifications/email-templates/email-template.entity.js +24 -15
  16. package/dist/tournaments/index.d.ts +1 -0
  17. package/dist/tournaments/index.d.ts.map +1 -1
  18. package/dist/tournaments/index.js +1 -0
  19. package/dist/tournaments/tournament-match-rules/index.d.ts +2 -0
  20. package/dist/tournaments/tournament-match-rules/index.d.ts.map +1 -0
  21. package/dist/tournaments/tournament-match-rules/index.js +4 -0
  22. package/dist/tournaments/tournament-match-rules/tournament-match-rule.entity.d.ts +13 -0
  23. package/dist/tournaments/tournament-match-rules/tournament-match-rule.entity.d.ts.map +1 -0
  24. package/dist/tournaments/tournament-match-rules/tournament-match-rule.entity.js +87 -0
  25. package/dist/tournaments/tournaments/tournament.entity.d.ts +3 -1
  26. package/dist/tournaments/tournaments/tournament.entity.d.ts.map +1 -1
  27. package/dist/tournaments/tournaments/tournament.entity.js +5 -1
  28. package/package.json +11 -10
@@ -1,6 +1,6 @@
1
1
  import { IOrganization, OrganizationStatus, OrganizationType } from '@natrave/auth-service-types';
2
2
  import { Tournament } from '../../tournaments';
3
- import { OrganizationUser } from '../organization-users/organization-user.entity';
3
+ import { OrganizationUser } from '../organization-users';
4
4
  export declare class Organization implements IOrganization {
5
5
  id: number;
6
6
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"organization.entity.d.ts","sourceRoot":"","sources":["../../../src/central-auth/organizations/organization.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAYlG,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAUlF,qBAUa,YAAa,YAAW,aAAa;IAEhD,EAAE,EAAE,MAAM,CAAC;IAOX,IAAI,EAAE,MAAM,CAAC;IAQb,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAGxB,KAAK,EAAE,MAAM,CAAC;IAGd,KAAK,EAAE,MAAM,CAAC;IAOd,IAAI,EAAE,gBAAgB,CAAC;IAOvB,MAAM,EAAE,kBAAkB,CAAC;IAU3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAO1B,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAQhB,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAM1B,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B"}
1
+ {"version":3,"file":"organization.entity.d.ts","sourceRoot":"","sources":["../../../src/central-auth/organizations/organization.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAYlG,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAUzD,qBAUa,YAAa,YAAW,aAAa;IAEhD,EAAE,EAAE,MAAM,CAAC;IAOX,IAAI,EAAE,MAAM,CAAC;IAQb,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAGxB,KAAK,EAAE,MAAM,CAAC;IAGd,KAAK,EAAE,MAAM,CAAC;IAOd,IAAI,EAAE,gBAAgB,CAAC;IAOvB,MAAM,EAAE,kBAAkB,CAAC;IAU3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAO1B,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAQhB,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAM1B,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B"}
@@ -20,7 +20,7 @@ import {
20
20
  UpdateDateColumn
21
21
  } from "typeorm";
22
22
  import { Tournament } from "../../tournaments/index.js";
23
- import { OrganizationUser } from "../organization-users/organization-user.entity.js";
23
+ import { OrganizationUser } from "../organization-users/index.js";
24
24
  let Organization = class {
25
25
  };
26
26
  __decorateClass([
@@ -1,4 +1,4 @@
1
- import { Coupon } from '../coupons/coupon.entity';
1
+ import { Coupon } from '../coupons';
2
2
  import { CouponTargetType } from './enums/target-type.enum';
3
3
  export declare class CouponUsage {
4
4
  id: number;
@@ -1 +1 @@
1
- {"version":3,"file":"coupon-usage.entity.d.ts","sourceRoot":"","sources":["../../../src/coupons/coupon-usages/coupon-usage.entity.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAW5D,qBACa,WAAW;IAEtB,EAAE,EAAE,MAAM,CAAC;IAGX,QAAQ,EAAE,MAAM,CAAC;IAQjB,UAAU,EAAE,gBAAgB,CAAC;IAO7B,QAAQ,EAAE,MAAM,CAAC;IAOjB,SAAS,EAAE,IAAI,CAAC;IAQhB,MAAM,EAAE,MAAM,CAAC;CAChB"}
1
+ {"version":3,"file":"coupon-usage.entity.d.ts","sourceRoot":"","sources":["../../../src/coupons/coupon-usages/coupon-usage.entity.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAW5D,qBACa,WAAW;IAEtB,EAAE,EAAE,MAAM,CAAC;IAGX,QAAQ,EAAE,MAAM,CAAC;IAQjB,UAAU,EAAE,gBAAgB,CAAC;IAO7B,QAAQ,EAAE,MAAM,CAAC;IAOjB,SAAS,EAAE,IAAI,CAAC;IAQhB,MAAM,EAAE,MAAM,CAAC;CAChB"}
@@ -16,7 +16,7 @@ import {
16
16
  ManyToOne,
17
17
  PrimaryGeneratedColumn
18
18
  } from "typeorm";
19
- import { Coupon } from "../coupons/coupon.entity.js";
19
+ import { Coupon } from "../coupons/index.js";
20
20
  import { CouponTargetType } from "./enums/target-type.enum.js";
21
21
  let CouponUsage = class {
22
22
  };
@@ -1,5 +1,5 @@
1
- import { TournamentCoupon } from '../../tournaments/tournament-coupons/tournament-coupon.entity';
2
- import { CouponUsage } from '../coupon-usages/coupon-usage.entity';
1
+ import { TournamentCoupon } from '../../tournaments/tournament-coupons';
2
+ import { CouponUsage } from '../coupon-usages';
3
3
  import { CouponDiscountType } from './enums/coupon-discount-type.enum';
4
4
  export declare class Coupon {
5
5
  id: number;
@@ -1 +1 @@
1
- {"version":3,"file":"coupon.entity.d.ts","sourceRoot":"","sources":["../../../src/coupons/coupons/coupon.entity.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+DAA+D,CAAC;AACjG,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAEnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAWvE,qBAGa,MAAM;IAEjB,EAAE,EAAE,MAAM,CAAC;IAGX,IAAI,EAAE,MAAM,CAAC;IAQb,WAAW,CAAC,EAAE,MAAM,CAAC;IAQrB,YAAY,EAAE,kBAAkB,CAAC;IAMjC,aAAa,EAAE,MAAM,CAAC;IAOtB,SAAS,EAAE,IAAI,CAAC;IAGhB,UAAU,EAAE,IAAI,CAAC;IAQjB,UAAU,CAAC,EAAE,MAAM,CAAC;IAQpB,QAAQ,EAAE,OAAO,CAAC;IAOlB,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAKhB,YAAY,EAAE,WAAW,EAAE,CAAC;IAG5B,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;CACvC"}
1
+ {"version":3,"file":"coupon.entity.d.ts","sourceRoot":"","sources":["../../../src/coupons/coupons/coupon.entity.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAWvE,qBAGa,MAAM;IAEjB,EAAE,EAAE,MAAM,CAAC;IAGX,IAAI,EAAE,MAAM,CAAC;IAQb,WAAW,CAAC,EAAE,MAAM,CAAC;IAQrB,YAAY,EAAE,kBAAkB,CAAC;IAMjC,aAAa,EAAE,MAAM,CAAC;IAOtB,SAAS,EAAE,IAAI,CAAC;IAGhB,UAAU,EAAE,IAAI,CAAC;IAQjB,UAAU,CAAC,EAAE,MAAM,CAAC;IAQpB,QAAQ,EAAE,OAAO,CAAC;IAOlB,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAKhB,YAAY,EAAE,WAAW,EAAE,CAAC;IAG5B,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;CACvC"}
@@ -18,8 +18,8 @@ import {
18
18
  Unique,
19
19
  UpdateDateColumn
20
20
  } from "typeorm";
21
- import { TournamentCoupon } from "../../tournaments/tournament-coupons/tournament-coupon.entity.js";
22
- import { CouponUsage } from "../coupon-usages/coupon-usage.entity.js";
21
+ import { TournamentCoupon } from "../../tournaments/tournament-coupons/index.js";
22
+ import { CouponUsage } from "../coupon-usages/index.js";
23
23
  import { CouponDiscountType } from "./enums/coupon-discount-type.enum.js";
24
24
  let Coupon = class {
25
25
  };
@@ -1,4 +1,4 @@
1
- import { Facility } from '../../facilities/facilities/facility.entity';
1
+ import { Facility } from '../../facilities/facilities';
2
2
  export declare class Address {
3
3
  id: number;
4
4
  createdAt: Date;
@@ -1 +1 @@
1
- {"version":3,"file":"address.entity.d.ts","sourceRoot":"","sources":["../../../src/facilities/addresses/address.entity.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,QAAQ,EAAE,MAAM,6CAA6C,CAAC;AAWvE,qBACa,OAAO;IAIlB,EAAE,EAAE,MAAM,CAAC;IAOX,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAQhB,aAAa,EAAE,MAAM,CAAC;IAOtB,MAAM,EAAE,MAAM,CAAC;IAQf,UAAU,CAAC,EAAE,MAAM,CAAC;IAOpB,YAAY,EAAE,MAAM,CAAC;IAOrB,IAAI,EAAE,MAAM,CAAC;IAOb,KAAK,EAAE,MAAM,CAAC;IAQd,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;CACxB"}
1
+ {"version":3,"file":"address.entity.d.ts","sourceRoot":"","sources":["../../../src/facilities/addresses/address.entity.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAWvD,qBACa,OAAO;IAIlB,EAAE,EAAE,MAAM,CAAC;IAOX,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAQhB,aAAa,EAAE,MAAM,CAAC;IAOtB,MAAM,EAAE,MAAM,CAAC;IAQf,UAAU,CAAC,EAAE,MAAM,CAAC;IAOpB,YAAY,EAAE,MAAM,CAAC;IAOrB,IAAI,EAAE,MAAM,CAAC;IAOb,KAAK,EAAE,MAAM,CAAC;IAQd,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;CACxB"}
@@ -17,7 +17,7 @@ import {
17
17
  UpdateDateColumn
18
18
  } from "typeorm";
19
19
  import { DecimalTransformer } from "../../common/utils/decimal-transformer.utils.js";
20
- import { Facility } from "../../facilities/facilities/facility.entity.js";
20
+ import { Facility } from "../../facilities/facilities/index.js";
21
21
  let Address = class {
22
22
  };
23
23
  __decorateClass([
@@ -1,11 +1,11 @@
1
- export declare class EmailTemplate {
1
+ import { EmailTemplateName, IEmailTemplate } from '@natrave/notification-service-types';
2
+ export declare class EmailTemplate implements IEmailTemplate {
2
3
  id: string;
3
4
  createdAt: Date;
4
5
  updatedAt: Date;
5
- name: string;
6
+ name: EmailTemplateName;
6
7
  subject: string;
7
8
  body: string;
8
9
  isActive: boolean;
9
- normalizeName(): void;
10
10
  }
11
11
  //# sourceMappingURL=email-template.entity.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"email-template.entity.d.ts","sourceRoot":"","sources":["../../../src/notifications/email-templates/email-template.entity.ts"],"names":[],"mappings":"AAYA,qBAGa,aAAa;IAExB,EAAE,EAAE,MAAM,CAAC;IAGX,SAAS,EAAE,IAAI,CAAC;IAGhB,SAAS,EAAE,IAAI,CAAC;IAGhB,IAAI,EAAE,MAAM,CAAC;IAGb,OAAO,EAAE,MAAM,CAAC;IAGhB,IAAI,EAAE,MAAM,CAAC;IAGb,QAAQ,EAAE,OAAO,CAAC;IAIlB,aAAa,IAAI,IAAI;CAGtB"}
1
+ {"version":3,"file":"email-template.entity.d.ts","sourceRoot":"","sources":["../../../src/notifications/email-templates/email-template.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAWxF,qBAGa,aAAc,YAAW,cAAc;IAElD,EAAE,EAAE,MAAM,CAAC;IAOX,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAOhB,IAAI,EAAE,iBAAiB,CAAC;IAGxB,OAAO,EAAE,MAAM,CAAC;IAGhB,IAAI,EAAE,MAAM,CAAC;IAQb,QAAQ,EAAE,OAAO,CAAC;CACnB"}
@@ -8,9 +8,8 @@ var __decorateClass = (decorators, target, key, kind) => {
8
8
  if (kind && result) __defProp(target, key, result);
9
9
  return result;
10
10
  };
11
+ import { EmailTemplateName } from "@natrave/notification-service-types";
11
12
  import {
12
- BeforeInsert,
13
- BeforeUpdate,
14
13
  Column,
15
14
  CreateDateColumn,
16
15
  Entity,
@@ -20,35 +19,45 @@ import {
20
19
  UpdateDateColumn
21
20
  } from "typeorm";
22
21
  let EmailTemplate = class {
23
- normalizeName() {
24
- this.name = this.name.trim();
25
- }
26
22
  };
27
23
  __decorateClass([
28
24
  PrimaryGeneratedColumn("uuid")
29
25
  ], EmailTemplate.prototype, "id", 2);
30
26
  __decorateClass([
31
- CreateDateColumn({ name: "created_at", type: "timestamptz" })
27
+ CreateDateColumn({
28
+ name: "created_at",
29
+ type: "timestamptz",
30
+ comment: "Data de cria\xE7\xE3o do template."
31
+ })
32
32
  ], EmailTemplate.prototype, "createdAt", 2);
33
33
  __decorateClass([
34
- UpdateDateColumn({ name: "updated_at", type: "timestamptz" })
34
+ UpdateDateColumn({
35
+ name: "updated_at",
36
+ type: "timestamptz",
37
+ comment: "Data de atualiza\xE7\xE3o do template."
38
+ })
35
39
  ], EmailTemplate.prototype, "updatedAt", 2);
36
40
  __decorateClass([
37
- Column({ type: "varchar", length: 255 })
41
+ Column({
42
+ type: "enum",
43
+ enum: EmailTemplateName,
44
+ comment: "Nome do template de e-mail."
45
+ })
38
46
  ], EmailTemplate.prototype, "name", 2);
39
47
  __decorateClass([
40
- Column({ type: "varchar", length: 255 })
48
+ Column({ type: "varchar", length: 255, comment: "Assunto do e-mail." })
41
49
  ], EmailTemplate.prototype, "subject", 2);
42
50
  __decorateClass([
43
- Column({ type: "text" })
51
+ Column({ type: "text", comment: "Corpo do e-mail." })
44
52
  ], EmailTemplate.prototype, "body", 2);
45
53
  __decorateClass([
46
- Column({ name: "is_active", type: "boolean", default: true })
54
+ Column({
55
+ name: "is_active",
56
+ type: "boolean",
57
+ default: true,
58
+ comment: "Indica se o template est\xE1 ativo ou n\xE3o."
59
+ })
47
60
  ], EmailTemplate.prototype, "isActive", 2);
48
- __decorateClass([
49
- BeforeInsert(),
50
- BeforeUpdate()
51
- ], EmailTemplate.prototype, "normalizeName", 1);
52
61
  EmailTemplate = __decorateClass([
53
62
  Entity("email_templates"),
54
63
  Unique(["name"]),
@@ -5,6 +5,7 @@ export * from './tournament-format-configs';
5
5
  export * from './tournament-groups';
6
6
  export * from './tournament-match-cards';
7
7
  export * from './tournament-match-goals';
8
+ export * from './tournament-match-rules';
8
9
  export * from './tournament-match-schemas';
9
10
  export * from './tournament-matches';
10
11
  export * from './tournament-matches-availability';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tournaments/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,mCAAmC,CAAC;AAClD,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tournaments/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,mCAAmC,CAAC;AAClD,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC"}
@@ -5,6 +5,7 @@ export * from "./tournament-format-configs/index.js";
5
5
  export * from "./tournament-groups/index.js";
6
6
  export * from "./tournament-match-cards/index.js";
7
7
  export * from "./tournament-match-goals/index.js";
8
+ export * from "./tournament-match-rules/index.js";
8
9
  export * from "./tournament-match-schemas/index.js";
9
10
  export * from "./tournament-matches/index.js";
10
11
  export * from "./tournament-matches-availability/index.js";
@@ -0,0 +1,2 @@
1
+ export { TournamentMatchRule } from './tournament-match-rule.entity';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-match-rules/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { TournamentMatchRule } from "./tournament-match-rule.entity.js";
2
+ export {
3
+ TournamentMatchRule
4
+ };
@@ -0,0 +1,13 @@
1
+ import { ITournamentMatchRule } from '@natrave/tournaments-service-types';
2
+ import { Tournament } from '../tournaments';
3
+ export declare class TournamentMatchRule implements ITournamentMatchRule {
4
+ id: number;
5
+ tournamentId: number;
6
+ playersPerTeam: number | null;
7
+ halfDuration: number | null;
8
+ halftimeBreak: number | null;
9
+ createdAt: Date;
10
+ updatedAt: Date;
11
+ tournament: Tournament;
12
+ }
13
+ //# sourceMappingURL=tournament-match-rule.entity.d.ts.map
@@ -0,0 +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;IAOX,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"}
@@ -0,0 +1,87 @@
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
+ Column,
13
+ CreateDateColumn,
14
+ Entity,
15
+ Index,
16
+ JoinColumn,
17
+ ManyToOne,
18
+ PrimaryGeneratedColumn,
19
+ UpdateDateColumn
20
+ } from "typeorm";
21
+ import { Tournament } from "../tournaments/index.js";
22
+ let TournamentMatchRule = class {
23
+ };
24
+ __decorateClass([
25
+ PrimaryGeneratedColumn({
26
+ comment: "Identificador \xFAnico das regras de partidas."
27
+ })
28
+ ], TournamentMatchRule.prototype, "id", 2);
29
+ __decorateClass([
30
+ Column({
31
+ name: "tournament_id",
32
+ type: "int",
33
+ comment: "Identificador do torneio associado a essas regras de partidas."
34
+ })
35
+ ], TournamentMatchRule.prototype, "tournamentId", 2);
36
+ __decorateClass([
37
+ Column({
38
+ type: "int",
39
+ name: "players_per_team",
40
+ nullable: true,
41
+ comment: "Quantidade de jogadores por equipe."
42
+ })
43
+ ], TournamentMatchRule.prototype, "playersPerTeam", 2);
44
+ __decorateClass([
45
+ Column({
46
+ type: "int",
47
+ name: "half_duration",
48
+ nullable: true,
49
+ comment: "Dura\xE7\xE3o de cada tempo em minutos."
50
+ })
51
+ ], TournamentMatchRule.prototype, "halfDuration", 2);
52
+ __decorateClass([
53
+ Column({
54
+ type: "int",
55
+ name: "halftime_break",
56
+ nullable: true,
57
+ comment: "Dura\xE7\xE3o do intervalo entre os tempos em minutos."
58
+ })
59
+ ], TournamentMatchRule.prototype, "halftimeBreak", 2);
60
+ __decorateClass([
61
+ CreateDateColumn({
62
+ name: "created_at",
63
+ type: "timestamptz",
64
+ comment: "Data de cria\xE7\xE3o das regras."
65
+ })
66
+ ], TournamentMatchRule.prototype, "createdAt", 2);
67
+ __decorateClass([
68
+ UpdateDateColumn({
69
+ name: "updated_at",
70
+ type: "timestamptz",
71
+ comment: "Data da \xFAltima atualiza\xE7\xE3o das regras."
72
+ })
73
+ ], TournamentMatchRule.prototype, "updatedAt", 2);
74
+ __decorateClass([
75
+ ManyToOne(() => Tournament, (tournament) => tournament.matchRules, {
76
+ onDelete: "CASCADE",
77
+ onUpdate: "CASCADE"
78
+ }),
79
+ JoinColumn({ name: "tournament_id" })
80
+ ], TournamentMatchRule.prototype, "tournament", 2);
81
+ TournamentMatchRule = __decorateClass([
82
+ Entity("tournament_match_rules"),
83
+ Index(["name"])
84
+ ], TournamentMatchRule);
85
+ export {
86
+ TournamentMatchRule
87
+ };
@@ -1,10 +1,11 @@
1
1
  import { BrazilianState, ITournament, TournamentGender, TournamentModality, TournamentStatus } from '@natrave/tournaments-service-types';
2
2
  import { Organization } from '../../central-auth';
3
- import { TournamentBracket } from '../tournament-brackets/tournament-bracket.entity';
3
+ import { TournamentBracket } from '../tournament-brackets';
4
4
  import { TournamentCoupon } from '../tournament-coupons';
5
5
  import { TournamentFacility } from '../tournament-facilities';
6
6
  import { TournamentFormatConfig } from '../tournament-format-configs';
7
7
  import { TournamentGroup } from '../tournament-groups';
8
+ import { TournamentMatchRule } from '../tournament-match-rules';
8
9
  import { TournamentMatchSchema } from '../tournament-match-schemas';
9
10
  import { TournamentMatch } from '../tournament-matches';
10
11
  import { TournamentMatchAvailability } from '../tournament-matches-availability';
@@ -46,5 +47,6 @@ export declare class Tournament implements ITournament {
46
47
  coupons: TournamentCoupon[];
47
48
  matchAvailabilities: TournamentMatchAvailability[];
48
49
  brackets: TournamentBracket[];
50
+ matchRules: TournamentMatchRule[];
49
51
  }
50
52
  //# sourceMappingURL=tournament.entity.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tournament.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournaments/tournament.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,oCAAoC,CAAC;AAa5C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,E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cAAc,EAAE,CAAC;IAGxB,MAAM,EAAE,eAAe,EAAE,CAAC;IAG1B,IAAI,EAAE,cAAc,CAAC;IAGrB,UAAU,EAAE,oBAAoB,CAAC;IAGjC,MAAM,EAAE,sBAAsB,CAAC;IAG/B,UAAU,EAAE,mBAAmB,EAAE,CAAC;IAGlC,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAG9B,OAAO,EAAE,eAAe,EAAE,CAAC;IAG3B,oBAAoB,EAAE,kBAAkB,EAAE,CAAC;IAG3C,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAG5B,mBAAmB,EAAE,2BAA2B,EAAE,CAAC;IAGnD,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAG9B,UAAU,EAAE,mBAAmB,EAAE,CAAC;CACnC"}
@@ -26,11 +26,12 @@ import {
26
26
  UpdateDateColumn
27
27
  } from "typeorm";
28
28
  import { Organization } from "../../central-auth/index.js";
29
- import { TournamentBracket } from "../tournament-brackets/tournament-bracket.entity.js";
29
+ import { TournamentBracket } from "../tournament-brackets/index.js";
30
30
  import { TournamentCoupon } from "../tournament-coupons/index.js";
31
31
  import { TournamentFacility } from "../tournament-facilities/index.js";
32
32
  import { TournamentFormatConfig } from "../tournament-format-configs/index.js";
33
33
  import { TournamentGroup } from "../tournament-groups/index.js";
34
+ import { TournamentMatchRule } from "../tournament-match-rules/index.js";
34
35
  import { TournamentMatchSchema } from "../tournament-match-schemas/index.js";
35
36
  import { TournamentMatch } from "../tournament-matches/index.js";
36
37
  import { TournamentMatchAvailability } from "../tournament-matches-availability/index.js";
@@ -217,6 +218,9 @@ __decorateClass([
217
218
  __decorateClass([
218
219
  OneToMany(() => TournamentBracket, (bracket) => bracket.tournament)
219
220
  ], Tournament.prototype, "brackets", 2);
221
+ __decorateClass([
222
+ OneToMany(() => TournamentMatchRule, (matchRule) => matchRule.tournament)
223
+ ], Tournament.prototype, "matchRules", 2);
220
224
  Tournament = __decorateClass([
221
225
  Entity("tournaments")
222
226
  ], Tournament);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natrave/shared-entities",
3
- "version": "1.2.39",
3
+ "version": "1.2.41",
4
4
  "description": "Entidades compartilhadass da NaTrave",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.js",
@@ -25,28 +25,29 @@
25
25
  "license": "MIT",
26
26
  "private": false,
27
27
  "devDependencies": {
28
- "@changesets/cli": "^2.29.2",
28
+ "@changesets/cli": "^2.29.3",
29
29
  "@eslint/js": "^9.26.0",
30
- "@typescript-eslint/eslint-plugin": "^8.31.1",
31
- "@typescript-eslint/parser": "^8.31.1",
32
- "esbuild": "^0.25.3",
30
+ "@typescript-eslint/eslint-plugin": "^8.32.0",
31
+ "@typescript-eslint/parser": "^8.32.0",
32
+ "esbuild": "^0.25.4",
33
33
  "eslint": "^9.26.0",
34
- "eslint-config-prettier": "^10.1.2",
34
+ "eslint-config-prettier": "^10.1.5",
35
35
  "eslint-import-resolver-typescript": "^4.3.4",
36
36
  "eslint-plugin-import": "^2.31.0",
37
- "eslint-plugin-prettier": "^5.3.1",
37
+ "eslint-plugin-prettier": "^5.4.0",
38
38
  "eslint-plugin-unused-imports": "^4.1.4",
39
39
  "glob": "^11.0.2",
40
40
  "husky": "^9.1.7",
41
- "lint-staged": "^15.5.1",
41
+ "lint-staged": "^16.0.0",
42
42
  "prettier": "^3.5.3",
43
43
  "ts-node": "^10.9.2"
44
44
  },
45
45
  "dependencies": {
46
46
  "@natrave/auth-service-types": "^1.1.61",
47
- "@natrave/tournaments-service-types": "^1.1.63",
47
+ "@natrave/notification-service-types": "^1.1.65",
48
+ "@natrave/tournaments-service-types": "^1.1.68",
48
49
  "reflect-metadata": "^0.2.2",
49
- "typeorm": "^0.3.22"
50
+ "typeorm": "^0.3.23"
50
51
  },
51
52
  "scripts": {
52
53
  "build:types": "tsc --emitDeclarationOnly",