@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
package/package.json
CHANGED
|
@@ -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
|
+
}
|
|
@@ -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
|
|