@natrave/shared-entities 1.2.15 → 1.2.17

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.
@@ -0,0 +1,12 @@
1
+ import { Field } from '../fields';
2
+ export declare class FieldImage {
3
+ id: number;
4
+ fieldId: number;
5
+ createdAt: Date;
6
+ updatedAt: Date;
7
+ url: string;
8
+ description: string;
9
+ isPrimary: boolean;
10
+ field: Field;
11
+ }
12
+ //# sourceMappingURL=field-image.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field-image.entity.d.ts","sourceRoot":"","sources":["../../../src/facilities/field-images/field-image.entity.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAWlC,qBACa,UAAU;IAIrB,EAAE,EAAE,MAAM,CAAC;IAOX,OAAO,EAAE,MAAM,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAMhB,GAAG,EAAE,MAAM,CAAC;IAQZ,WAAW,EAAE,MAAM,CAAC;IAQpB,SAAS,EAAE,OAAO,CAAC;IAWnB,KAAK,EAAE,KAAK,CAAC;CACd"}
@@ -0,0 +1,82 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __decorateClass = (decorators, target, key, kind) => {
4
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
5
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
6
+ if (decorator = decorators[i])
7
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8
+ if (kind && result) __defProp(target, key, result);
9
+ return result;
10
+ };
11
+ import {
12
+ Column,
13
+ CreateDateColumn,
14
+ Entity,
15
+ JoinColumn,
16
+ ManyToOne,
17
+ PrimaryGeneratedColumn,
18
+ UpdateDateColumn
19
+ } from "typeorm";
20
+ import { Field } from "../fields/index.js";
21
+ let FieldImage = class {
22
+ };
23
+ __decorateClass([
24
+ PrimaryGeneratedColumn({
25
+ comment: "Identificador \xFAnico da imagem do campo."
26
+ })
27
+ ], FieldImage.prototype, "id", 2);
28
+ __decorateClass([
29
+ Column({
30
+ name: "field_id",
31
+ type: "int",
32
+ comment: "Identificador do campo associado a esta imagem."
33
+ })
34
+ ], FieldImage.prototype, "fieldId", 2);
35
+ __decorateClass([
36
+ CreateDateColumn({
37
+ name: "created_at",
38
+ type: "timestamptz",
39
+ comment: "Data e hora em que a imagem foi cadastrada."
40
+ })
41
+ ], FieldImage.prototype, "createdAt", 2);
42
+ __decorateClass([
43
+ UpdateDateColumn({
44
+ name: "updated_at",
45
+ type: "timestamptz",
46
+ comment: "Data e hora da \xFAltima atualiza\xE7\xE3o dos dados da imagem."
47
+ })
48
+ ], FieldImage.prototype, "updatedAt", 2);
49
+ __decorateClass([
50
+ Column({
51
+ type: "text",
52
+ comment: "URL da imagem do campo."
53
+ })
54
+ ], FieldImage.prototype, "url", 2);
55
+ __decorateClass([
56
+ Column({
57
+ type: "text",
58
+ nullable: true,
59
+ default: null,
60
+ comment: "Descri\xE7\xE3o opcional da imagem."
61
+ })
62
+ ], FieldImage.prototype, "description", 2);
63
+ __decorateClass([
64
+ Column({
65
+ name: "is_primary",
66
+ type: "boolean",
67
+ default: false,
68
+ comment: "Indica se esta \xE9 a imagem principal do campo."
69
+ })
70
+ ], FieldImage.prototype, "isPrimary", 2);
71
+ __decorateClass([
72
+ ManyToOne(() => Field, (field) => field.images, {
73
+ onDelete: "CASCADE"
74
+ }),
75
+ JoinColumn({ name: "field_id" })
76
+ ], FieldImage.prototype, "field", 2);
77
+ FieldImage = __decorateClass([
78
+ Entity("field_images")
79
+ ], FieldImage);
80
+ export {
81
+ FieldImage
82
+ };
@@ -0,0 +1,2 @@
1
+ export { FieldImage } from './field-image.entity';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/facilities/field-images/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { FieldImage } from "./field-image.entity.js";
2
+ export {
3
+ FieldImage
4
+ };
@@ -1,5 +1,6 @@
1
1
  import { TournamentMatch } from '../../tournaments';
2
2
  import { Facility } from '../facilities';
3
+ import { FieldImage } from '../field-images/field-image.entity';
3
4
  import { FieldSurfaceType } from './enums/surface-type.enum';
4
5
  export declare class Field {
5
6
  id: number;
@@ -14,5 +15,6 @@ export declare class Field {
14
15
  isIndoor: boolean;
15
16
  recommendedPlayersPerTeam: number;
16
17
  tournamentMatches: TournamentMatch[];
18
+ images: FieldImage[];
17
19
  }
18
20
  //# sourceMappingURL=field.entity.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"field.entity.d.ts","sourceRoot":"","sources":["../../../src/facilities/fields/field.entity.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAY7D,qBAEa,KAAK;IAIhB,EAAE,EAAE,MAAM,CAAC;IAOX,UAAU,EAAE,MAAM,CAAC;IAMnB,QAAQ,EAAE,QAAQ,CAAC;IAOnB,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAOhB,IAAI,EAAE,MAAM,CAAC;IAQb,WAAW,EAAE,gBAAgB,CAAC;IAQ9B,MAAM,EAAE,MAAM,CAAC;IAQf,KAAK,EAAE,MAAM,CAAC;IAQd,QAAQ,EAAE,OAAO,CAAC;IAOlB,yBAAyB,EAAE,MAAM,CAAC;IAQlC,iBAAiB,EAAE,eAAe,EAAE,CAAC;CACtC"}
1
+ {"version":3,"file":"field.entity.d.ts","sourceRoot":"","sources":["../../../src/facilities/fields/field.entity.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAEhE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAY7D,qBAEa,KAAK;IAIhB,EAAE,EAAE,MAAM,CAAC;IAOX,UAAU,EAAE,MAAM,CAAC;IAMnB,QAAQ,EAAE,QAAQ,CAAC;IAOnB,SAAS,EAAE,IAAI,CAAC;IAOhB,SAAS,EAAE,IAAI,CAAC;IAOhB,IAAI,EAAE,MAAM,CAAC;IAQb,WAAW,EAAE,gBAAgB,CAAC;IAQ9B,MAAM,EAAE,MAAM,CAAC;IAQf,KAAK,EAAE,MAAM,CAAC;IAQd,QAAQ,EAAE,OAAO,CAAC;IAOlB,yBAAyB,EAAE,MAAM,CAAC;IAQlC,iBAAiB,EAAE,eAAe,EAAE,CAAC;IAKrC,MAAM,EAAE,UAAU,EAAE,CAAC;CACtB"}
@@ -21,6 +21,7 @@ import {
21
21
  } from "typeorm";
22
22
  import { TournamentMatch } from "../../tournaments/index.js";
23
23
  import { Facility } from "../facilities/index.js";
24
+ import { FieldImage } from "../field-images/field-image.entity.js";
24
25
  import { FieldSurfaceType } from "./enums/surface-type.enum.js";
25
26
  let Field = class {
26
27
  };
@@ -105,6 +106,9 @@ __decorateClass([
105
106
  __decorateClass([
106
107
  OneToMany(() => TournamentMatch, (tournamentMatch) => tournamentMatch.field)
107
108
  ], Field.prototype, "tournamentMatches", 2);
109
+ __decorateClass([
110
+ OneToMany(() => FieldImage, (fieldImage) => fieldImage.field)
111
+ ], Field.prototype, "images", 2);
108
112
  Field = __decorateClass([
109
113
  Entity("fields"),
110
114
  Unique(["name", "facilityId"])
@@ -1,6 +1,7 @@
1
- export * from './facility-owners';
2
1
  export * from './addresses';
3
- export * from './fields';
4
- export * from './facility-images';
5
2
  export * from './facilities';
3
+ export * from './facility-images';
4
+ export * from './facility-owners';
5
+ export * from './field-images';
6
+ export * from './fields';
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/facilities/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/facilities/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC"}
@@ -1,5 +1,6 @@
1
- export * from "./facility-owners/index.js";
2
1
  export * from "./addresses/index.js";
3
- export * from "./fields/index.js";
4
- export * from "./facility-images/index.js";
5
2
  export * from "./facilities/index.js";
3
+ export * from "./facility-images/index.js";
4
+ export * from "./facility-owners/index.js";
5
+ export * from "./field-images/index.js";
6
+ export * from "./fields/index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natrave/shared-entities",
3
- "version": "1.2.15",
3
+ "version": "1.2.17",
4
4
  "description": "Entidades compartilhadass da NaTrave",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.js",
@@ -27,8 +27,8 @@
27
27
  "devDependencies": {
28
28
  "@changesets/cli": "^2.28.1",
29
29
  "@eslint/js": "^9.23.0",
30
- "@typescript-eslint/eslint-plugin": "^8.28.0",
31
- "@typescript-eslint/parser": "^8.28.0",
30
+ "@typescript-eslint/eslint-plugin": "^8.29.0",
31
+ "@typescript-eslint/parser": "^8.29.0",
32
32
  "esbuild": "^0.25.2",
33
33
  "eslint": "^9.23.0",
34
34
  "eslint-config-prettier": "^10.1.1",
@@ -43,7 +43,7 @@
43
43
  "ts-node": "^10.9.2"
44
44
  },
45
45
  "dependencies": {
46
- "@natrave/tournaments-service-types": "^1.1.21",
46
+ "@natrave/tournaments-service-types": "^1.1.22",
47
47
  "reflect-metadata": "^0.2.2",
48
48
  "typeorm": "^0.3.21"
49
49
  },