@natrave/shared-entities 1.2.50 → 1.2.52
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/facilities/addresses/address.entity.d.ts +5 -3
- package/dist/facilities/addresses/address.entity.d.ts.map +1 -1
- package/dist/facilities/addresses/address.entity.js +5 -3
- package/dist/facilities/facilities/facility.entity.d.ts +0 -5
- package/dist/facilities/facilities/facility.entity.d.ts.map +1 -1
- package/dist/facilities/facilities/facility.entity.js +0 -25
- package/dist/facilities/facilities/index.d.ts +0 -1
- package/dist/facilities/facilities/index.d.ts.map +1 -1
- package/dist/facilities/facilities/index.js +1 -3
- package/dist/facilities/facility-owners/facility-owner.entity.d.ts +0 -2
- package/dist/facilities/facility-owners/facility-owner.entity.d.ts.map +1 -1
- package/dist/facilities/facility-owners/facility-owner.entity.js +0 -5
- package/package.json +6 -6
- package/dist/facilities/facilities/enums/facility-status.enum.d.ts +0 -6
- package/dist/facilities/facilities/enums/facility-status.enum.d.ts.map +0 -1
- package/dist/facilities/facilities/enums/facility-status.enum.js +0 -9
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
import { IAddress } from '@natrave/facility-service-types';
|
|
2
|
+
import { BrazilianState } from '@natrave/tournaments-service-types';
|
|
1
3
|
import { Facility } from '../../facilities/facilities';
|
|
2
|
-
export declare class Address {
|
|
4
|
+
export declare class Address implements IAddress {
|
|
3
5
|
id: number;
|
|
4
6
|
createdAt: Date;
|
|
5
7
|
updatedAt: Date;
|
|
6
8
|
streetAddress: string;
|
|
7
9
|
number: string;
|
|
8
|
-
complement
|
|
10
|
+
complement: string | null;
|
|
9
11
|
neighborhood: string;
|
|
10
12
|
city: string;
|
|
11
|
-
state:
|
|
13
|
+
state: BrazilianState | null;
|
|
12
14
|
postalCode: string;
|
|
13
15
|
country: string;
|
|
14
16
|
latitude: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address.entity.d.ts","sourceRoot":"","sources":["../../../src/facilities/addresses/address.entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"address.entity.d.ts","sourceRoot":"","sources":["../../../src/facilities/addresses/address.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAWpE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAWvD,qBACa,OAAQ,YAAW,QAAQ;IAItC,EAAE,EAAE,MAAM,CAAC;IAOX,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAQhB,aAAa,EAAE,MAAM,CAAC;IAOtB,MAAM,EAAE,MAAM,CAAC;IAQf,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAO1B,YAAY,EAAE,MAAM,CAAC;IAOrB,IAAI,EAAE,MAAM,CAAC;IAQb,KAAK,EAAE,cAAc,GAAG,IAAI,CAAC;IAQ7B,UAAU,EAAE,MAAM,CAAC;IAOnB,OAAO,EAAE,MAAM,CAAC;IAShB,QAAQ,EAAE,MAAM,CAAC;IASjB,SAAS,EAAE,MAAM,CAAC;IAUlB,UAAU,EAAE,QAAQ,EAAE,CAAC;CACxB"}
|
|
@@ -8,6 +8,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
8
8
|
if (kind && result) __defProp(target, key, result);
|
|
9
9
|
return result;
|
|
10
10
|
};
|
|
11
|
+
import { BrazilianState } from "@natrave/tournaments-service-types";
|
|
11
12
|
import {
|
|
12
13
|
Column,
|
|
13
14
|
CreateDateColumn,
|
|
@@ -78,9 +79,10 @@ __decorateClass([
|
|
|
78
79
|
], Address.prototype, "city", 2);
|
|
79
80
|
__decorateClass([
|
|
80
81
|
Column({
|
|
81
|
-
type: "
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
type: "enum",
|
|
83
|
+
enum: BrazilianState,
|
|
84
|
+
nullable: true,
|
|
85
|
+
comment: "Estado (UF) onde o torneio ser\xE1 realizado."
|
|
84
86
|
})
|
|
85
87
|
], Address.prototype, "state", 2);
|
|
86
88
|
__decorateClass([
|
|
@@ -2,23 +2,18 @@ import type { IFacility } from '@natrave/facility-service-types';
|
|
|
2
2
|
import { TournamentFacility } from '../../tournaments';
|
|
3
3
|
import { Address } from '../addresses';
|
|
4
4
|
import { FacilityImage } from '../facility-images';
|
|
5
|
-
import { FacilityOwner } from '../facility-owners';
|
|
6
5
|
import { Field } from '../fields';
|
|
7
|
-
import { FacilityStatus } from './enums/facility-status.enum';
|
|
8
6
|
export declare class Facility implements IFacility {
|
|
9
7
|
id: number;
|
|
10
|
-
facilityOwnerId: number;
|
|
11
8
|
addressId: number;
|
|
12
9
|
createdAt: Date;
|
|
13
10
|
updatedAt: Date;
|
|
14
11
|
name: string;
|
|
15
12
|
contactEmail: string | null;
|
|
16
13
|
contactPhone: string;
|
|
17
|
-
status: FacilityStatus;
|
|
18
14
|
cnpj: string | null;
|
|
19
15
|
deletedAt: Date | null;
|
|
20
16
|
address: Address;
|
|
21
|
-
facilityOwner: FacilityOwner;
|
|
22
17
|
fields: Field[];
|
|
23
18
|
facilityImages: FacilityImage[];
|
|
24
19
|
tournamentFacilities: TournamentFacility[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facility.entity.d.ts","sourceRoot":"","sources":["../../../src/facilities/facilities/facility.entity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAiBjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"facility.entity.d.ts","sourceRoot":"","sources":["../../../src/facilities/facilities/facility.entity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAiBjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAclC,qBAKa,QAAS,YAAW,SAAS;IAIxC,EAAE,EAAE,MAAM,CAAC;IAOX,SAAS,EAAE,MAAM,CAAC;IAOlB,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAQhB,IAAI,EAAE,MAAM,CAAC;IASb,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ5B,YAAY,EAAE,MAAM,CAAC;IASrB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAQpB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAQ;IAU9B,OAAO,EAAE,OAAO,CAAC;IAGjB,MAAM,EAAE,KAAK,EAAE,CAAC;IAGhB,cAAc,EAAE,aAAa,EAAE,CAAC;IAGhC,oBAAoB,EAAE,kBAAkB,EAAE,CAAC;IAO3C,cAAc,IAAI,IAAI;CAGvB"}
|
|
@@ -26,13 +26,10 @@ import {
|
|
|
26
26
|
import { TournamentFacility } from "../../tournaments/index.js";
|
|
27
27
|
import { Address } from "../addresses/index.js";
|
|
28
28
|
import { FacilityImage } from "../facility-images/index.js";
|
|
29
|
-
import { FacilityOwner } from "../facility-owners/index.js";
|
|
30
29
|
import { Field } from "../fields/index.js";
|
|
31
|
-
import { FacilityStatus } from "./enums/facility-status.enum.js";
|
|
32
30
|
import { sanitizeFacility } from "./utils/sanititze.utils.js";
|
|
33
31
|
let Facility = class {
|
|
34
32
|
constructor() {
|
|
35
|
-
this.status = FacilityStatus.PENDING;
|
|
36
33
|
this.deletedAt = null;
|
|
37
34
|
}
|
|
38
35
|
sanitizeFields() {
|
|
@@ -44,13 +41,6 @@ __decorateClass([
|
|
|
44
41
|
comment: "Identificador \xFAnico do estabelecimento."
|
|
45
42
|
})
|
|
46
43
|
], Facility.prototype, "id", 2);
|
|
47
|
-
__decorateClass([
|
|
48
|
-
Column({
|
|
49
|
-
name: "facility_owner_id",
|
|
50
|
-
type: "int",
|
|
51
|
-
comment: "Identificador do propriet\xE1rio do estabelecimento."
|
|
52
|
-
})
|
|
53
|
-
], Facility.prototype, "facilityOwnerId", 2);
|
|
54
44
|
__decorateClass([
|
|
55
45
|
Column({
|
|
56
46
|
name: "address_id",
|
|
@@ -97,14 +87,6 @@ __decorateClass([
|
|
|
97
87
|
comment: "Telefone de contato do estabelecimento."
|
|
98
88
|
})
|
|
99
89
|
], Facility.prototype, "contactPhone", 2);
|
|
100
|
-
__decorateClass([
|
|
101
|
-
Column({
|
|
102
|
-
type: "enum",
|
|
103
|
-
enum: FacilityStatus,
|
|
104
|
-
enumName: "facility_status",
|
|
105
|
-
comment: "Status atual do estabelecimento (ex: PENDING, APPROVED)."
|
|
106
|
-
})
|
|
107
|
-
], Facility.prototype, "status", 2);
|
|
108
90
|
__decorateClass([
|
|
109
91
|
Column({
|
|
110
92
|
name: "cnpj",
|
|
@@ -130,13 +112,6 @@ __decorateClass([
|
|
|
130
112
|
}),
|
|
131
113
|
JoinColumn({ name: "address_id" })
|
|
132
114
|
], Facility.prototype, "address", 2);
|
|
133
|
-
__decorateClass([
|
|
134
|
-
ManyToOne(() => FacilityOwner, (owner) => owner.facilities, {
|
|
135
|
-
onDelete: "CASCADE",
|
|
136
|
-
onUpdate: "CASCADE"
|
|
137
|
-
}),
|
|
138
|
-
JoinColumn({ name: "facility_owner_id" })
|
|
139
|
-
], Facility.prototype, "facilityOwner", 2);
|
|
140
115
|
__decorateClass([
|
|
141
116
|
OneToMany(() => Field, (field) => field.facility)
|
|
142
117
|
], Facility.prototype, "fields", 2);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/facilities/facilities/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/facilities/facilities/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Facility } from '../facilities/facility.entity';
|
|
2
1
|
export declare class FacilityOwner {
|
|
3
2
|
id: number;
|
|
4
3
|
createdAt: Date;
|
|
@@ -7,7 +6,6 @@ export declare class FacilityOwner {
|
|
|
7
6
|
contactEmail: string;
|
|
8
7
|
cnpj?: string;
|
|
9
8
|
contactPhone: string;
|
|
10
|
-
facilities: Facility[];
|
|
11
9
|
sanitizeFields(): void;
|
|
12
10
|
}
|
|
13
11
|
//# sourceMappingURL=facility-owner.entity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facility-owner.entity.d.ts","sourceRoot":"","sources":["../../../src/facilities/facility-owners/facility-owner.entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"facility-owner.entity.d.ts","sourceRoot":"","sources":["../../../src/facilities/facility-owners/facility-owner.entity.ts"],"names":[],"mappings":"AAuBA,qBAGa,aAAa;IAIxB,EAAE,EAAE,MAAM,CAAC;IAOX,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAOhB,IAAI,EAAE,MAAM,CAAC;IAUb,YAAY,EAAE,MAAM,CAAC;IAUrB,IAAI,CAAC,EAAE,MAAM,CAAC;IAQd,YAAY,EAAE,MAAM,CAAC;IASrB,cAAc,IAAI,IAAI;CAGvB"}
|
|
@@ -15,12 +15,10 @@ import {
|
|
|
15
15
|
CreateDateColumn,
|
|
16
16
|
Entity,
|
|
17
17
|
Index,
|
|
18
|
-
OneToMany,
|
|
19
18
|
PrimaryGeneratedColumn,
|
|
20
19
|
Unique,
|
|
21
20
|
UpdateDateColumn
|
|
22
21
|
} from "typeorm";
|
|
23
|
-
import { Facility } from "../facilities/facility.entity.js";
|
|
24
22
|
import { sanitizeFacilityOwner } from "./utils/sanitize.utils.js";
|
|
25
23
|
let FacilityOwner = class {
|
|
26
24
|
sanitizeFields() {
|
|
@@ -81,9 +79,6 @@ __decorateClass([
|
|
|
81
79
|
comment: "Telefone de contato do propriet\xE1rio."
|
|
82
80
|
})
|
|
83
81
|
], FacilityOwner.prototype, "contactPhone", 2);
|
|
84
|
-
__decorateClass([
|
|
85
|
-
OneToMany(() => Facility, (facility) => facility.facilityOwner)
|
|
86
|
-
], FacilityOwner.prototype, "facilities", 2);
|
|
87
82
|
__decorateClass([
|
|
88
83
|
BeforeInsert(),
|
|
89
84
|
BeforeUpdate()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@natrave/shared-entities",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.52",
|
|
4
4
|
"description": "Entidades compartilhadass da NaTrave",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
"private": false,
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@changesets/cli": "^2.29.4",
|
|
29
|
-
"@eslint/js": "^9.
|
|
29
|
+
"@eslint/js": "^9.27.0",
|
|
30
30
|
"@typescript-eslint/eslint-plugin": "^8.32.1",
|
|
31
31
|
"@typescript-eslint/parser": "^8.32.1",
|
|
32
32
|
"esbuild": "^0.25.4",
|
|
33
|
-
"eslint": "^9.
|
|
33
|
+
"eslint": "^9.27.0",
|
|
34
34
|
"eslint-config-prettier": "^10.1.5",
|
|
35
|
-
"eslint-import-resolver-typescript": "^4.3.
|
|
35
|
+
"eslint-import-resolver-typescript": "^4.3.5",
|
|
36
36
|
"eslint-plugin-import": "^2.31.0",
|
|
37
37
|
"eslint-plugin-prettier": "^5.4.0",
|
|
38
38
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@natrave/auth-service-types": "^1.1.63",
|
|
47
|
-
"@natrave/facility-service-types": "^0.0.
|
|
47
|
+
"@natrave/facility-service-types": "^0.0.4",
|
|
48
48
|
"@natrave/notification-service-types": "^1.1.65",
|
|
49
|
-
"@natrave/tournaments-service-types": "^1.1.
|
|
49
|
+
"@natrave/tournaments-service-types": "^1.1.80",
|
|
50
50
|
"reflect-metadata": "^0.2.2",
|
|
51
51
|
"typeorm": "^0.3.24"
|
|
52
52
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"facility-status.enum.d.ts","sourceRoot":"","sources":["../../../../src/facilities/facilities/enums/facility-status.enum.ts"],"names":[],"mappings":"AASA,oBAAY,cAAc;IAIxB,OAAO,YAAY;IAKnB,QAAQ,aAAa;IAKrB,QAAQ,aAAa;CACtB"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
var FacilityStatus = /* @__PURE__ */ ((FacilityStatus2) => {
|
|
2
|
-
FacilityStatus2["PENDING"] = "pending";
|
|
3
|
-
FacilityStatus2["APPROVED"] = "approved";
|
|
4
|
-
FacilityStatus2["REJECTED"] = "rejected";
|
|
5
|
-
return FacilityStatus2;
|
|
6
|
-
})(FacilityStatus || {});
|
|
7
|
-
export {
|
|
8
|
-
FacilityStatus
|
|
9
|
-
};
|