@natrave/shared-entities 1.2.30 → 1.2.31

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 +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;AAWxF,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAOhD,qBACa,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,CAAC;IAOnB,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;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 +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;AAUlG,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AASlF,qBACa,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;IAU3B,UAAU,EAAE,MAAM,CAAC;IAOnB,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAQhB,KAAK,EAAE,gBAAgB,EAAE,CAAC;CAC3B"}
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,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAUlF,qBAUa,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;CAC3B"}
@@ -13,8 +13,10 @@ 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";
20
22
  import { OrganizationUser } from "../organization-users/organization-user.entity.js";
@@ -63,7 +65,6 @@ __decorateClass([
63
65
  name: "external_id",
64
66
  type: "varchar",
65
67
  length: 255,
66
- unique: true,
67
68
  comment: "Identificador externo da organiza\xE7\xE3o, usado para integra\xE7\xE3o com provedores como Clerk."
68
69
  })
69
70
  ], Organization.prototype, "externalId", 2);
@@ -85,6 +86,15 @@ __decorateClass([
85
86
  OneToMany(() => OrganizationUser, (user) => user.organization)
86
87
  ], Organization.prototype, "users", 2);
87
88
  Organization = __decorateClass([
89
+ Unique("UQ_organization_document", ["document"]),
90
+ Unique("UQ_organization_email", ["email"]),
91
+ Unique("UQ_organization_phone", ["phone"]),
92
+ Unique("UQ_organization_externalId", ["externalId"]),
93
+ Index("idx_organization_document", ["document"]),
94
+ Index("idx_organization_email", ["email"]),
95
+ Index("idx_organization_phone", ["phone"]),
96
+ Index("idx_organization_externalId", ["externalId"]),
97
+ Index("idx_organization_status", ["status"]),
88
98
  Entity("organizations")
89
99
  ], Organization);
90
100
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natrave/shared-entities",
3
- "version": "1.2.30",
3
+ "version": "1.2.31",
4
4
  "description": "Entidades compartilhadass da NaTrave",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.js",