@natrave/shared-entities 1.4.89 → 1.4.90

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,4 +1,5 @@
1
1
  import { IOrganizationUser, OrganizationUserStatus } from '@natrave/auth-service-types';
2
+ import { TournamentPayment } from '../../tournaments';
2
3
  import { Organization } from '../organizations';
3
4
  export declare class OrganizationUser implements IOrganizationUser {
4
5
  id: number;
@@ -13,5 +14,6 @@ export declare class OrganizationUser implements IOrganizationUser {
13
14
  createdAt: Date;
14
15
  updatedAt: Date;
15
16
  organization: Organization;
17
+ tournamentPayments: TournamentPayment[];
16
18
  }
17
19
  //# sourceMappingURL=organization-user.entity.d.ts.map
@@ -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;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;IAU/B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAO1B,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAShB,YAAY,EAAE,YAAY,CAAC;CAC5B"}
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;AAcxF,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,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;IAU/B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAO1B,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAShB,YAAY,EAAE,YAAY,CAAC;IAM3B,kBAAkB,EAAE,iBAAiB,EAAE,CAAC;CACzC"}
@@ -16,10 +16,12 @@ import {
16
16
  Index,
17
17
  JoinColumn,
18
18
  ManyToOne,
19
+ OneToMany,
19
20
  PrimaryGeneratedColumn,
20
21
  Unique,
21
22
  UpdateDateColumn
22
23
  } from "typeorm";
24
+ import { TournamentPayment } from "../../tournaments/index.js";
23
25
  import { Organization } from "../organizations/index.js";
24
26
  let OrganizationUser = class {
25
27
  };
@@ -105,6 +107,9 @@ __decorateClass([
105
107
  ManyToOne(() => Organization, (organization) => organization.users, { onDelete: "CASCADE" }),
106
108
  JoinColumn({ name: "organization_id" })
107
109
  ], OrganizationUser.prototype, "organization", 2);
110
+ __decorateClass([
111
+ OneToMany(() => TournamentPayment, (tournamentPayment) => tournamentPayment.organizationUser)
112
+ ], OrganizationUser.prototype, "tournamentPayments", 2);
108
113
  OrganizationUser = __decorateClass([
109
114
  Unique("UQ_organization_users_document", ["document"]),
110
115
  Unique("UQ_organization_users_email", ["email"]),
@@ -9,5 +9,5 @@ import { Player, PlayerPosition } from '../players';
9
9
  import { PlayerTeam, Team, TeamJoinRequest, TeamModality, TeamTrophy } from '../teams';
10
10
  import { Tournament, TournamentAllowedPhone, TournamentBracket, TournamentBracketSlot, TournamentContact, TournamentCoupon, TournamentFacility, TournamentFormatConfig, TournamentGroup, TournamentMatch, TournamentMatchAvailability, TournamentMatchCard, TournamentMatchGoal, TournamentMatchRule, TournamentMatchSchema, TournamentPayment, TournamentPenaltyShootout, TournamentPlayer, TournamentPlayerRule, TournamentPrizeRule, TournamentRegistrationRequest, TournamentTeam, TournamentTeamContactAttempt } from '../tournaments';
11
11
  import { UserDomainEvent, UserEventView } from '../user-events';
12
- export declare const DATABASE_ENTITIES: (typeof OrganizationUser | typeof Organization | typeof PhoneNumber | typeof TournamentAllowedPhone | typeof Tournament | typeof PasswordReset | typeof NotificationToken | typeof User | typeof UserAuthProvider | typeof RefreshToken | typeof Player | typeof TournamentRegistrationRequest | typeof UserVerification | typeof PlayerPosition | typeof PlayerTeam | typeof TeamJoinRequest | typeof TeamPlayerMergeHistory | typeof Team | typeof TournamentPlayer | typeof TournamentTeam | typeof TeamModality | typeof TournamentTeamContactAttempt | typeof TeamTrophy | typeof FacilityImage | typeof Facility | typeof FieldImage | typeof Field | typeof Address | typeof TournamentFacility | typeof FacilityOwner | typeof TournamentContact | typeof Coupon | typeof CouponUsage | typeof TournamentCoupon | typeof TournamentFormatConfig | typeof TournamentMatchRule | typeof TournamentMatchSchema | typeof TournamentMatchAvailability | typeof UserPaymentProvider | typeof PaymentProvider | typeof Payment | typeof TournamentPayment | typeof TournamentPlayerRule | typeof TournamentPrizeRule | typeof TournamentGroup | typeof TournamentMatch | typeof TournamentBracket | typeof TournamentBracketSlot | typeof TournamentMatchGoal | typeof TournamentMatchCard | typeof TournamentPenaltyShootout | typeof UserDomainEvent | typeof UserEventView)[];
12
+ export declare const DATABASE_ENTITIES: (typeof OrganizationUser | typeof Organization | typeof TournamentPayment | typeof PhoneNumber | typeof TournamentAllowedPhone | typeof Tournament | typeof PasswordReset | typeof NotificationToken | typeof User | typeof UserAuthProvider | typeof RefreshToken | typeof Player | typeof TournamentRegistrationRequest | typeof UserVerification | typeof PlayerPosition | typeof PlayerTeam | typeof TeamJoinRequest | typeof TeamPlayerMergeHistory | typeof Team | typeof TournamentPlayer | typeof TournamentTeam | typeof TeamModality | typeof TournamentTeamContactAttempt | typeof TeamTrophy | typeof FacilityImage | typeof Facility | typeof FieldImage | typeof Field | typeof Address | typeof TournamentFacility | typeof FacilityOwner | typeof TournamentContact | typeof Coupon | typeof CouponUsage | typeof TournamentCoupon | typeof TournamentFormatConfig | typeof TournamentMatchRule | typeof TournamentMatchSchema | typeof TournamentMatchAvailability | typeof UserPaymentProvider | typeof PaymentProvider | typeof Payment | typeof TournamentPlayerRule | typeof TournamentPrizeRule | typeof TournamentGroup | typeof TournamentMatch | typeof TournamentBracket | typeof TournamentBracketSlot | typeof TournamentMatchGoal | typeof TournamentMatchCard | typeof TournamentPenaltyShootout | typeof UserDomainEvent | typeof UserEventView)[];
13
13
  //# sourceMappingURL=index.d.ts.map
@@ -1,15 +1,14 @@
1
- import { ITournamentPayment } from '@natrave/tournaments-service-types';
2
- import { User } from '../../app-auth';
1
+ import { OrganizationUser } from '../../central-auth';
3
2
  import { Payment } from '../../payments';
4
3
  import { Tournament } from '../tournaments';
5
- export declare class TournamentPayment implements ITournamentPayment {
4
+ export declare class TournamentPayment {
6
5
  id: string;
7
6
  paymentId: number;
8
7
  tournamentId: number;
9
- userId: string;
8
+ organizationUserId: number;
10
9
  createdAt: Date;
11
10
  updatedAt: Date;
12
- user: User;
11
+ organizationUser: OrganizationUser;
13
12
  payment: Payment;
14
13
  tournament: Tournament;
15
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tournament-payment.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-payments/tournament-payment.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAWxE,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAO5C,qBACa,iBAAkB,YAAW,kBAAkB;IAI1D,EAAE,EAAE,MAAM,CAAC;IAOX,SAAS,EAAE,MAAM,CAAC;IAOlB,YAAY,EAAE,MAAM,CAAC;IAOrB,MAAM,EAAE,MAAM,CAAC;IAOf,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAMhB,IAAI,EAAE,IAAI,CAAC;IAIX,OAAO,EAAE,OAAO,CAAC;IAIjB,UAAU,EAAE,UAAU,CAAC;CACxB"}
1
+ {"version":3,"file":"tournament-payment.entity.d.ts","sourceRoot":"","sources":["../../../src/tournaments/tournament-payments/tournament-payment.entity.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAO5C,qBACa,iBAAiB;IAI5B,EAAE,EAAE,MAAM,CAAC;IAOX,SAAS,EAAE,MAAM,CAAC;IAOlB,YAAY,EAAE,MAAM,CAAC;IAOrB,kBAAkB,EAAE,MAAM,CAAC;IAO3B,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAMhB,gBAAgB,EAAE,gBAAgB,CAAC;IAInC,OAAO,EAAE,OAAO,CAAC;IAIjB,UAAU,EAAE,UAAU,CAAC;CACxB"}
@@ -17,7 +17,7 @@ import {
17
17
  PrimaryGeneratedColumn,
18
18
  UpdateDateColumn
19
19
  } from "typeorm";
20
- import { User } from "../../app-auth/index.js";
20
+ import { OrganizationUser } from "../../central-auth/index.js";
21
21
  import { Payment } from "../../payments/index.js";
22
22
  import { Tournament } from "../tournaments/index.js";
23
23
  let TournamentPayment = class {
@@ -43,11 +43,11 @@ __decorateClass([
43
43
  ], TournamentPayment.prototype, "tournamentId", 2);
44
44
  __decorateClass([
45
45
  Column({
46
- name: "user_id",
47
- type: "uuid",
48
- comment: "Identificador do usu\xE1rio que realizou o pagamento."
46
+ name: "organization_user_id",
47
+ type: "int",
48
+ comment: "Identificador do usu\xE1rio da organiza\xE7\xE3o que realizou o pagamento."
49
49
  })
50
- ], TournamentPayment.prototype, "userId", 2);
50
+ ], TournamentPayment.prototype, "organizationUserId", 2);
51
51
  __decorateClass([
52
52
  CreateDateColumn({
53
53
  name: "created_at",
@@ -63,9 +63,9 @@ __decorateClass([
63
63
  })
64
64
  ], TournamentPayment.prototype, "updatedAt", 2);
65
65
  __decorateClass([
66
- ManyToOne(() => User, { onDelete: "CASCADE" }),
67
- JoinColumn({ name: "user_id" })
68
- ], TournamentPayment.prototype, "user", 2);
66
+ ManyToOne(() => OrganizationUser, { onDelete: "CASCADE" }),
67
+ JoinColumn({ name: "organization_user_id" })
68
+ ], TournamentPayment.prototype, "organizationUser", 2);
69
69
  __decorateClass([
70
70
  ManyToOne(() => Payment, { onDelete: "CASCADE", eager: true }),
71
71
  JoinColumn({ name: "payment_id" })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natrave/shared-entities",
3
- "version": "1.4.89",
3
+ "version": "1.4.90",
4
4
  "description": "Entidades compartilhadass da NaTrave",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.js",