@natrave/shared-entities 1.2.30 → 1.2.32
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/dist/central-auth/organization-users/organization-user.entity.d.ts.map +1 -1
- package/dist/central-auth/organization-users/organization-user.entity.js +12 -1
- package/dist/central-auth/organizations/organization.entity.d.ts +2 -0
- package/dist/central-auth/organizations/organization.entity.d.ts.map +1 -1
- package/dist/central-auth/organizations/organization.entity.js +16 -1
- package/dist/tournaments/tournaments/tournament.entity.d.ts +3 -0
- package/dist/tournaments/tournaments/tournament.entity.d.ts.map +1 -1
- package/dist/tournaments/tournaments/tournament.entity.js +15 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization-user.entity.d.ts","sourceRoot":"","sources":["../../../src/central-auth/organization-users/organization-user.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"organization-user.entity.d.ts","sourceRoot":"","sources":["../../../src/central-auth/organization-users/organization-user.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAaxF,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,qBAWa,gBAAiB,YAAW,iBAAiB;IAExD,EAAE,EAAE,MAAM,CAAC;IAOX,cAAc,EAAE,MAAM,CAAC;IAQvB,SAAS,EAAE,MAAM,CAAC;IAQlB,QAAQ,EAAE,MAAM,CAAC;IAQjB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAOxB,KAAK,EAAE,MAAM,CAAC;IAOd,KAAK,EAAE,MAAM,CAAC;IAQd,MAAM,EAAE,sBAAsB,CAAC;IAS/B,UAAU,EAAE,MAAM,CAAC;IAOnB,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAShB,YAAY,EAAE,YAAY,CAAC;CAC5B"}
|
|
@@ -13,9 +13,11 @@ import {
|
|
|
13
13
|
Column,
|
|
14
14
|
CreateDateColumn,
|
|
15
15
|
Entity,
|
|
16
|
+
Index,
|
|
16
17
|
JoinColumn,
|
|
17
18
|
ManyToOne,
|
|
18
19
|
PrimaryGeneratedColumn,
|
|
20
|
+
Unique,
|
|
19
21
|
UpdateDateColumn
|
|
20
22
|
} from "typeorm";
|
|
21
23
|
import { Organization } from "../organizations/index.js";
|
|
@@ -81,7 +83,6 @@ __decorateClass([
|
|
|
81
83
|
name: "external_id",
|
|
82
84
|
type: "varchar",
|
|
83
85
|
length: 255,
|
|
84
|
-
unique: true,
|
|
85
86
|
comment: "Identificador externo do usu\xE1rio, usado para integra\xE7\xE3o com provedores de autentica\xE7\xE3o como Clerk."
|
|
86
87
|
})
|
|
87
88
|
], OrganizationUser.prototype, "externalId", 2);
|
|
@@ -104,6 +105,16 @@ __decorateClass([
|
|
|
104
105
|
JoinColumn({ name: "organization_id" })
|
|
105
106
|
], OrganizationUser.prototype, "organization", 2);
|
|
106
107
|
OrganizationUser = __decorateClass([
|
|
108
|
+
Unique("UQ_organization_users_document", ["document"]),
|
|
109
|
+
Unique("UQ_organization_users_email", ["email"]),
|
|
110
|
+
Unique("UQ_organization_users_phone", ["phone"]),
|
|
111
|
+
Unique("UQ_organization_users_externalId", ["externalId"]),
|
|
112
|
+
Index("idx_organization_user_document", ["document"]),
|
|
113
|
+
Index("idx_organization_user_email", ["email"]),
|
|
114
|
+
Index("idx_organization_user_phone", ["phone"]),
|
|
115
|
+
Index("idx_organization_user_externalId", ["externalId"]),
|
|
116
|
+
Index("idx_organization_user_organizationId", ["organizationId"]),
|
|
117
|
+
Index("idx_organization_user_status", ["status"]),
|
|
107
118
|
Entity("organization_users")
|
|
108
119
|
], OrganizationUser);
|
|
109
120
|
export {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IOrganization, OrganizationStatus, OrganizationType } from '@natrave/auth-service-types';
|
|
2
|
+
import { Tournament } from '../../tournaments';
|
|
2
3
|
import { OrganizationUser } from '../organization-users/organization-user.entity';
|
|
3
4
|
export declare class Organization implements IOrganization {
|
|
4
5
|
id: number;
|
|
@@ -12,5 +13,6 @@ export declare class Organization implements IOrganization {
|
|
|
12
13
|
createdAt: Date;
|
|
13
14
|
updatedAt: Date;
|
|
14
15
|
users: OrganizationUser[];
|
|
16
|
+
tournaments: Tournament[];
|
|
15
17
|
}
|
|
16
18
|
//# sourceMappingURL=organization.entity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization.entity.d.ts","sourceRoot":"","sources":["../../../src/central-auth/organizations/organization.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"organization.entity.d.ts","sourceRoot":"","sources":["../../../src/central-auth/organizations/organization.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAYlG,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAUlF,qBAWa,YAAa,YAAW,aAAa;IAEhD,EAAE,EAAE,MAAM,CAAC;IAOX,IAAI,EAAE,MAAM,CAAC;IAQb,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAGxB,KAAK,EAAE,MAAM,CAAC;IAGd,KAAK,EAAE,MAAM,CAAC;IAOd,IAAI,EAAE,gBAAgB,CAAC;IAOvB,MAAM,EAAE,kBAAkB,CAAC;IAS3B,UAAU,EAAE,MAAM,CAAC;IAOnB,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAQhB,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAM1B,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B"}
|
|
@@ -13,10 +13,13 @@ import {
|
|
|
13
13
|
Column,
|
|
14
14
|
CreateDateColumn,
|
|
15
15
|
Entity,
|
|
16
|
+
Index,
|
|
16
17
|
OneToMany,
|
|
17
18
|
PrimaryGeneratedColumn,
|
|
19
|
+
Unique,
|
|
18
20
|
UpdateDateColumn
|
|
19
21
|
} from "typeorm";
|
|
22
|
+
import { Tournament } from "../../tournaments/index.js";
|
|
20
23
|
import { OrganizationUser } from "../organization-users/organization-user.entity.js";
|
|
21
24
|
let Organization = class {
|
|
22
25
|
};
|
|
@@ -63,7 +66,6 @@ __decorateClass([
|
|
|
63
66
|
name: "external_id",
|
|
64
67
|
type: "varchar",
|
|
65
68
|
length: 255,
|
|
66
|
-
unique: true,
|
|
67
69
|
comment: "Identificador externo da organiza\xE7\xE3o, usado para integra\xE7\xE3o com provedores como Clerk."
|
|
68
70
|
})
|
|
69
71
|
], Organization.prototype, "externalId", 2);
|
|
@@ -84,7 +86,20 @@ __decorateClass([
|
|
|
84
86
|
__decorateClass([
|
|
85
87
|
OneToMany(() => OrganizationUser, (user) => user.organization)
|
|
86
88
|
], Organization.prototype, "users", 2);
|
|
89
|
+
__decorateClass([
|
|
90
|
+
OneToMany(() => Tournament, (tournament) => tournament.organizer)
|
|
91
|
+
], Organization.prototype, "tournaments", 2);
|
|
87
92
|
Organization = __decorateClass([
|
|
93
|
+
Unique("UQ_organization_document", ["document"]),
|
|
94
|
+
Unique("UQ_organization_email", ["email"]),
|
|
95
|
+
Unique("UQ_organization_phone", ["phone"]),
|
|
96
|
+
Unique("UQ_organization_externalId", ["externalId"]),
|
|
97
|
+
Unique("UQ_organization_name", ["name"]),
|
|
98
|
+
Index("idx_organization_document", ["document"]),
|
|
99
|
+
Index("idx_organization_email", ["email"]),
|
|
100
|
+
Index("idx_organization_phone", ["phone"]),
|
|
101
|
+
Index("idx_organization_externalId", ["externalId"]),
|
|
102
|
+
Index("idx_organization_status", ["status"]),
|
|
88
103
|
Entity("organizations")
|
|
89
104
|
], Organization);
|
|
90
105
|
export {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BrazilianState, ITournament, TournamentGender, TournamentModality, TournamentStatus } from '@natrave/tournaments-service-types';
|
|
2
|
+
import { Organization } from '../../central-auth';
|
|
2
3
|
import { TournamentBracket } from '../tournament-brackets/tournament-bracket.entity';
|
|
3
4
|
import { TournamentCoupon } from '../tournament-coupons';
|
|
4
5
|
import { TournamentFacility } from '../tournament-facilities';
|
|
@@ -20,6 +21,7 @@ export declare class Tournament implements ITournament {
|
|
|
20
21
|
description?: string | null;
|
|
21
22
|
tournamentImage?: string | null;
|
|
22
23
|
matchSchemaId?: number | null;
|
|
24
|
+
organizationId?: number | null;
|
|
23
25
|
city?: string | null;
|
|
24
26
|
state?: BrazilianState | null;
|
|
25
27
|
gender: TournamentGender;
|
|
@@ -31,6 +33,7 @@ export declare class Tournament implements ITournament {
|
|
|
31
33
|
createdAt: Date;
|
|
32
34
|
updatedAt: Date;
|
|
33
35
|
matchSchema: TournamentMatchSchema;
|
|
36
|
+
organizer: Organization;
|
|
34
37
|
teams: TournamentTeam[];
|
|
35
38
|
groups: TournamentGroup[];
|
|
36
39
|
rule: TournamentRule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tournament.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournaments/tournament.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,oCAAoC,CAAC;AAa5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,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AC;IAQhC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ9B,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ/B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAQrB,KAAK,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IAO9B,MAAM,EAAE,gBAAgB,CAAC;IASzB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAShC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAS3B,MAAM,EAAE,gBAAgB,CAAC;IAQzB,QAAQ,EAAE,kBAAkB,CAAC;IAQ7B,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IAOvB,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAQhB,WAAW,EAAE,qBAAqB,CAAC;IAMnC,SAAS,EAAE,YAAY,CAAC;IAGxB,KAAK,EAAE,cAAc,EAAE,CAAC;IAGxB,MAAM,EAAE,eAAe,EAAE,CAAC;IAG1B,IAAI,EAAE,cAAc,CAAC;IAGrB,UAAU,EAAE,oBAAoB,CAAC;IAGjC,MAAM,EAAE,sBAAsB,CAAC;IAG/B,UAAU,EAAE,mBAAmB,EAAE,CAAC;IAGlC,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAG9B,OAAO,EAAE,eAAe,EAAE,CAAC;IAG3B,oBAAoB,EAAE,kBAAkB,EAAE,CAAC;IAG3C,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAG5B,mBAAmB,EAAE,2BAA2B,EAAE,CAAC;IAGnD,QAAQ,EAAE,iBAAiB,EAAE,CAAC;CAC/B"}
|
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
PrimaryGeneratedColumn,
|
|
26
26
|
UpdateDateColumn
|
|
27
27
|
} from "typeorm";
|
|
28
|
+
import { Organization } from "../../central-auth/index.js";
|
|
28
29
|
import { TournamentBracket } from "../tournament-brackets/tournament-bracket.entity.js";
|
|
29
30
|
import { TournamentCoupon } from "../tournament-coupons/index.js";
|
|
30
31
|
import { TournamentFacility } from "../tournament-facilities/index.js";
|
|
@@ -81,6 +82,14 @@ __decorateClass([
|
|
|
81
82
|
comment: "ID do esquema de partidas (opcional)."
|
|
82
83
|
})
|
|
83
84
|
], Tournament.prototype, "matchSchemaId", 2);
|
|
85
|
+
__decorateClass([
|
|
86
|
+
Column({
|
|
87
|
+
name: "organization_id",
|
|
88
|
+
type: "int",
|
|
89
|
+
nullable: true,
|
|
90
|
+
comment: "ID da organiza\xE7\xE3o respons\xE1vel pelo torneio."
|
|
91
|
+
})
|
|
92
|
+
], Tournament.prototype, "organizationId", 2);
|
|
84
93
|
__decorateClass([
|
|
85
94
|
Column({
|
|
86
95
|
type: "varchar",
|
|
@@ -166,6 +175,12 @@ __decorateClass([
|
|
|
166
175
|
}),
|
|
167
176
|
JoinColumn({ name: "match_schema_id" })
|
|
168
177
|
], Tournament.prototype, "matchSchema", 2);
|
|
178
|
+
__decorateClass([
|
|
179
|
+
ManyToOne(() => Organization, (organization) => organization.tournaments, {
|
|
180
|
+
onDelete: "CASCADE"
|
|
181
|
+
}),
|
|
182
|
+
JoinColumn({ name: "organization_id" })
|
|
183
|
+
], Tournament.prototype, "organizer", 2);
|
|
169
184
|
__decorateClass([
|
|
170
185
|
OneToMany(() => TournamentTeam, (team) => team.tournament)
|
|
171
186
|
], Tournament.prototype, "teams", 2);
|