@natrave/shared-entities 1.4.4 → 1.4.5

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.
@@ -1,3 +1,4 @@
1
1
  export * from './player-team';
2
2
  export * from './teams';
3
+ export * from './team-modality';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/teams/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/teams/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export * from "./player-team/index.js";
2
2
  export * from "./teams/index.js";
3
+ export * from "./team-modality/index.js";
@@ -0,0 +1,8 @@
1
+ export declare enum Modality {
2
+ FUTSAL = "futsal",
3
+ SOCIETY = "society",
4
+ ELEVEN_A_SIDE = "11_a_side",
5
+ BEACH = "beach",
6
+ FUT7 = "fut7"
7
+ }
8
+ //# sourceMappingURL=modality.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modality.enum.d.ts","sourceRoot":"","sources":["../../../../src/teams/team-modality/enums/modality.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IAClB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,aAAa,cAAc;IAC3B,KAAK,UAAU;IACf,IAAI,SAAS;CACd"}
@@ -0,0 +1,11 @@
1
+ var Modality = /* @__PURE__ */ ((Modality2) => {
2
+ Modality2["FUTSAL"] = "futsal";
3
+ Modality2["SOCIETY"] = "society";
4
+ Modality2["ELEVEN_A_SIDE"] = "11_a_side";
5
+ Modality2["BEACH"] = "beach";
6
+ Modality2["FUT7"] = "fut7";
7
+ return Modality2;
8
+ })(Modality || {});
9
+ export {
10
+ Modality
11
+ };
@@ -0,0 +1,3 @@
1
+ export { TeamModality } from './team-modality.entity';
2
+ export { Modality } from './enums/modality.enum';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/teams/team-modality/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { TeamModality } from "./team-modality.entity.js";
2
+ import { Modality } from "./enums/modality.enum.js";
3
+ export {
4
+ Modality,
5
+ TeamModality
6
+ };
@@ -0,0 +1,11 @@
1
+ import { Team } from '../teams';
2
+ import { Modality } from './enums/modality.enum';
3
+ export declare class TeamModality {
4
+ id: number;
5
+ teamId: number;
6
+ modality: Modality;
7
+ createdAt: Date;
8
+ updatedAt: Date;
9
+ team: Team;
10
+ }
11
+ //# sourceMappingURL=team-modality.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"team-modality.entity.d.ts","sourceRoot":"","sources":["../../../src/teams/team-modality/team-modality.entity.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,qBAGa,YAAY;IAIvB,EAAE,EAAE,MAAM,CAAC;IAGX,MAAM,EAAE,MAAM,CAAC;IAOf,QAAQ,EAAE,QAAQ,CAAC;IAGnB,SAAS,EAAE,IAAI,CAAC;IAGhB,SAAS,EAAE,IAAI,CAAC;IAIhB,IAAI,EAAE,IAAI,CAAC;CACZ"}
@@ -0,0 +1,58 @@
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
+ Unique,
20
+ UpdateDateColumn
21
+ } from "typeorm";
22
+ import { Team } from "../teams/index.js";
23
+ import { Modality } from "./enums/modality.enum.js";
24
+ let TeamModality = class {
25
+ };
26
+ __decorateClass([
27
+ PrimaryGeneratedColumn({
28
+ comment: "Identificador \xFAnico do v\xEDnculo time\u2013modalidade."
29
+ })
30
+ ], TeamModality.prototype, "id", 2);
31
+ __decorateClass([
32
+ Column({ name: "team_id", type: "int", comment: "Identificador do time." })
33
+ ], TeamModality.prototype, "teamId", 2);
34
+ __decorateClass([
35
+ Column({
36
+ type: "enum",
37
+ enum: Object.values(Modality),
38
+ comment: "Modalidade associada ao time."
39
+ })
40
+ ], TeamModality.prototype, "modality", 2);
41
+ __decorateClass([
42
+ CreateDateColumn({ name: "created_at", type: "timestamptz" })
43
+ ], TeamModality.prototype, "createdAt", 2);
44
+ __decorateClass([
45
+ UpdateDateColumn({ name: "updated_at", type: "timestamptz" })
46
+ ], TeamModality.prototype, "updatedAt", 2);
47
+ __decorateClass([
48
+ ManyToOne(() => Team, (team) => team.teamModalities, { onDelete: "CASCADE" }),
49
+ JoinColumn({ name: "team_id" })
50
+ ], TeamModality.prototype, "team", 2);
51
+ TeamModality = __decorateClass([
52
+ Entity("team_modalities"),
53
+ Unique("team_modality_unique", ["teamId", "modality"]),
54
+ Index("IDX_team_modality_team_id", ["teamId"])
55
+ ], TeamModality);
56
+ export {
57
+ TeamModality
58
+ };
@@ -1,6 +1,6 @@
1
1
  import { BrazilianState } from '@natrave/tournaments-service-types';
2
2
  import { Gender } from '../../app-auth';
3
- import { PlayerTeam } from '../../teams';
3
+ import { PlayerTeam, TeamModality } from '../../teams';
4
4
  import { TournamentTeam } from '../../tournaments';
5
5
  export declare class Team {
6
6
  id: number;
@@ -17,5 +17,6 @@ export declare class Team {
17
17
  updatedAt: Date;
18
18
  tournamentTeams: TournamentTeam[];
19
19
  playerMemberships: PlayerTeam[];
20
+ teamModalities: TeamModality[];
20
21
  }
21
22
  //# sourceMappingURL=team.entity.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"team.entity.d.ts","sourceRoot":"","sources":["../../../src/teams/teams/team.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAWpE,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,qBAEa,IAAI;IAEf,EAAE,EAAE,MAAM,CAAC;IAGX,IAAI,EAAE,MAAM,CAAC;IAGb,YAAY,EAAE,MAAM,CAAC;IAGrB,IAAI,EAAE,MAAM,CAAC;IAGb,KAAK,EAAE,cAAc,CAAC;IAGtB,YAAY,CAAC,EAAE,MAAM,CAAC;IAGtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAG1B,WAAW,CAAC,EAAE,MAAM,CAAC;IAQrB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAQtB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAGrB,SAAS,EAAE,IAAI,CAAC;IAGhB,SAAS,EAAE,IAAI,CAAC;IAGhB,eAAe,EAAE,cAAc,EAAE,CAAC;IAGlC,iBAAiB,EAAE,UAAU,EAAE,CAAC;CACjC"}
1
+ {"version":3,"file":"team.entity.d.ts","sourceRoot":"","sources":["../../../src/teams/teams/team.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAWpE,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,qBAEa,IAAI;IAEf,EAAE,EAAE,MAAM,CAAC;IAGX,IAAI,EAAE,MAAM,CAAC;IAGb,YAAY,EAAE,MAAM,CAAC;IAGrB,IAAI,EAAE,MAAM,CAAC;IAGb,KAAK,EAAE,cAAc,CAAC;IAGtB,YAAY,CAAC,EAAE,MAAM,CAAC;IAGtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAG1B,WAAW,CAAC,EAAE,MAAM,CAAC;IAQrB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAQtB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAGrB,SAAS,EAAE,IAAI,CAAC;IAGhB,SAAS,EAAE,IAAI,CAAC;IAGhB,eAAe,EAAE,cAAc,EAAE,CAAC;IAGlC,iBAAiB,EAAE,UAAU,EAAE,CAAC;IAGhC,cAAc,EAAE,YAAY,EAAE,CAAC;CAChC"}
@@ -19,7 +19,7 @@ import {
19
19
  UpdateDateColumn
20
20
  } from "typeorm";
21
21
  import { Gender } from "../../app-auth/index.js";
22
- import { PlayerTeam } from "../../teams/index.js";
22
+ import { PlayerTeam, TeamModality } from "../../teams/index.js";
23
23
  import { TournamentTeam } from "../../tournaments/index.js";
24
24
  let Team = class {
25
25
  };
@@ -75,6 +75,9 @@ __decorateClass([
75
75
  __decorateClass([
76
76
  OneToMany(() => PlayerTeam, (pt) => pt.team)
77
77
  ], Team.prototype, "playerMemberships", 2);
78
+ __decorateClass([
79
+ OneToMany(() => TeamModality, (tm) => tm.team)
80
+ ], Team.prototype, "teamModalities", 2);
78
81
  Team = __decorateClass([
79
82
  Entity("teams"),
80
83
  Index("UQ_team_name", ["name"], { unique: true })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natrave/shared-entities",
3
- "version": "1.4.4",
3
+ "version": "1.4.5",
4
4
  "description": "Entidades compartilhadass da NaTrave",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.js",