@natrave/shared-entities 1.1.1 → 1.1.2

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @natrave/shared-entities
2
2
 
3
+ ## 1.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 4113a58: Adiciona campo status (enum 'default' e 'registered') à entidade TournamentTeam
8
+
3
9
  ## 1.1.1
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natrave/shared-entities",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Entidades compartilhadass da NaTrave",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Enum que representa os status de um time em um torneio.
3
+ *
4
+ * @remarks
5
+ * Este enum fornece valores para identificar o status do time, garantindo consistência
6
+ * ao referenciar o status na aplicação.
7
+ *
8
+ * @public
9
+ */
10
+ export enum TournamentTeamStatus {
11
+ /**
12
+ * Status "default": indica que o time foi criado automaticamente e ainda não foi
13
+ * personalizado ou inscrito pelo usuário.
14
+ */
15
+ DEFAULT = 'default',
16
+
17
+ /**
18
+ * Status "registered": indica que o time foi registrado e personalizado pelo usuário.
19
+ */
20
+ REGISTERED = 'registered',
21
+ }
@@ -1 +1,3 @@
1
1
  export { TournamentTeam } from './tournament-team.entity';
2
+
3
+ export { TournamentTeamStatus } from './enums/tournament-team-status.enum';
@@ -19,6 +19,7 @@ import { TournamentMatch } from 'tournaments/tournament-matches';
19
19
  import { TournamentPlayer } from 'tournaments/tournament-players';
20
20
  import { Tournament } from 'tournaments/tournaments';
21
21
 
22
+ import { TournamentTeamStatus } from './enums/tournament-team-status.enum';
22
23
  import { generateRandomInviteCode } from './utils/invite-code-generator';
23
24
 
24
25
  /**
@@ -54,6 +55,15 @@ export class TournamentTeam implements ITournamentTeam {
54
55
  @Column({ name: 'invite_code', type: 'varchar', length: 5, unique: true })
55
56
  inviteCode: string;
56
57
 
58
+ /**
59
+ * Status do time no torneio.
60
+ *
61
+ * Por padrão, o status será "default", indicando que o time é um placeholder
62
+ * que ainda não foi registrado/personalizado pelo usuário.
63
+ */
64
+ @Column({ type: 'enum', enum: TournamentTeamStatus, default: TournamentTeamStatus.DEFAULT })
65
+ status: TournamentTeamStatus;
66
+
57
67
  @CreateDateColumn({ name: 'created_at', type: 'timestamptz' })
58
68
  createdAt: Date;
59
69