@natrave/shared-entities 1.4.3 → 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,5 +1,6 @@
1
1
  import { BrazilianState } from '@natrave/tournaments-service-types';
2
- import { PlayerTeam } from '../../teams';
2
+ import { Gender } from '../../app-auth';
3
+ import { PlayerTeam, TeamModality } from '../../teams';
3
4
  import { TournamentTeam } from '../../tournaments';
4
5
  export declare class Team {
5
6
  id: number;
@@ -10,9 +11,12 @@ export declare class Team {
10
11
  neighborhood?: string;
11
12
  instagramAccount?: string;
12
13
  teamLogoUrl?: string;
14
+ gender: Gender | null;
15
+ phone: string | null;
13
16
  createdAt: Date;
14
17
  updatedAt: Date;
15
18
  tournamentTeams: TournamentTeam[];
16
19
  playerMemberships: PlayerTeam[];
20
+ teamModalities: TeamModality[];
17
21
  }
18
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,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;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"}
@@ -18,7 +18,8 @@ import {
18
18
  PrimaryGeneratedColumn,
19
19
  UpdateDateColumn
20
20
  } from "typeorm";
21
- import { PlayerTeam } from "../../teams/index.js";
21
+ import { Gender } from "../../app-auth/index.js";
22
+ import { PlayerTeam, TeamModality } from "../../teams/index.js";
22
23
  import { TournamentTeam } from "../../tournaments/index.js";
23
24
  let Team = class {
24
25
  };
@@ -46,6 +47,22 @@ __decorateClass([
46
47
  __decorateClass([
47
48
  Column({ name: "team_logo_url", type: "text", nullable: true })
48
49
  ], Team.prototype, "teamLogoUrl", 2);
50
+ __decorateClass([
51
+ Column({
52
+ type: "enum",
53
+ enum: Object.values(Gender),
54
+ nullable: true,
55
+ comment: "G\xEAnero do usu\xE1rio (masculino, feminino ou outro)."
56
+ })
57
+ ], Team.prototype, "gender", 2);
58
+ __decorateClass([
59
+ Column({
60
+ type: "varchar",
61
+ length: 20,
62
+ comment: "Telefone principal para contato.",
63
+ nullable: true
64
+ })
65
+ ], Team.prototype, "phone", 2);
49
66
  __decorateClass([
50
67
  CreateDateColumn({ name: "created_at", type: "timestamptz" })
51
68
  ], Team.prototype, "createdAt", 2);
@@ -58,6 +75,9 @@ __decorateClass([
58
75
  __decorateClass([
59
76
  OneToMany(() => PlayerTeam, (pt) => pt.team)
60
77
  ], Team.prototype, "playerMemberships", 2);
78
+ __decorateClass([
79
+ OneToMany(() => TeamModality, (tm) => tm.team)
80
+ ], Team.prototype, "teamModalities", 2);
61
81
  Team = __decorateClass([
62
82
  Entity("teams"),
63
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.3",
3
+ "version": "1.4.5",
4
4
  "description": "Entidades compartilhadass da NaTrave",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.js",