@natrave/shared-entities 1.4.55 → 1.4.57

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.
@@ -29,7 +29,7 @@ import {
29
29
  TournamentRule,
30
30
  TournamentTeam,
31
31
  TournamentTeamContactAttempt
32
- } from "../tournaments";
32
+ } from "../tournaments/index.js";
33
33
  const DATABASE_ENTITIES = [
34
34
  Address,
35
35
  Coupon,
@@ -12,6 +12,7 @@ export declare class Team {
12
12
  teamLogoUrl?: string;
13
13
  gender: TournamentGender | null;
14
14
  phone: string | null;
15
+ deletedAt: Date | null;
15
16
  createdAt: Date;
16
17
  updatedAt: Date;
17
18
  tournamentTeams: TournamentTeam[];
@@ -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,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAWtF,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAC;AAEjF,qBAMa,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,gBAAgB,GAAG,IAAI,CAAC;IAQhC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAGrB,SAAS,EAAE,IAAI,CAAC;IAGhB,SAAS,EAAE,IAAI,CAAC;IAGhB,eAAe,EAAE,cAAc,EAAE,CAAC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6 +12,7 @@ import { BrazilianState, TournamentGender } from "@natrave/tournaments-service-t
12
12
  import {
13
13
  Column,
14
14
  CreateDateColumn,
15
+ DeleteDateColumn,
15
16
  Entity,
16
17
  Index,
17
18
  OneToMany,
@@ -21,6 +22,9 @@ import {
21
22
  import { PlayerTeam, TeamJoinRequest, TeamModality, TeamTrophy } from "../../teams/index.js";
22
23
  import { TournamentTeam, TournamentTeamContactAttempt } from "../../tournaments/index.js";
23
24
  let Team = class {
25
+ constructor() {
26
+ this.deletedAt = null;
27
+ }
24
28
  };
25
29
  __decorateClass([
26
30
  PrimaryGeneratedColumn()
@@ -62,6 +66,14 @@ __decorateClass([
62
66
  nullable: true
63
67
  })
64
68
  ], Team.prototype, "phone", 2);
69
+ __decorateClass([
70
+ DeleteDateColumn({
71
+ name: "deleted_at",
72
+ type: "timestamptz",
73
+ nullable: true,
74
+ comment: "Data de exclus\xE3o (soft delete) do time."
75
+ })
76
+ ], Team.prototype, "deletedAt", 2);
65
77
  __decorateClass([
66
78
  CreateDateColumn({ name: "created_at", type: "timestamptz" })
67
79
  ], Team.prototype, "createdAt", 2);
@@ -92,7 +104,8 @@ Team = __decorateClass([
92
104
  Index("IDX_team_city", ["city"]),
93
105
  Index("IDX_team_state", ["state"]),
94
106
  Index("IDX_team_created_at", ["createdAt"]),
95
- Index("IDX_team_id_created_at", ["id", "createdAt"])
107
+ Index("IDX_team_id_created_at", ["id", "createdAt"]),
108
+ Index("idx_teams_not_deleted", { where: '"deleted_at" IS NULL' })
96
109
  ], Team);
97
110
  export {
98
111
  Team
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natrave/shared-entities",
3
- "version": "1.4.55",
3
+ "version": "1.4.57",
4
4
  "description": "Entidades compartilhadass da NaTrave",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.js",