@asumano/worklip-typeorm-db 1.1.22 → 1.1.25

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,5 +1,6 @@
1
1
  import { Region } from "./Region";
2
2
  import { Company } from "..";
3
+ import { CountryHoliday } from "./CountryHoliday";
3
4
  export declare class Country {
4
5
  id: number;
5
6
  code: string;
@@ -11,4 +12,5 @@ export declare class Country {
11
12
  status: number;
12
13
  regions: Region[];
13
14
  companies: Company[];
15
+ country_holidays: CountryHoliday[];
14
16
  }
@@ -13,6 +13,7 @@ exports.Country = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
14
  const Region_1 = require("./Region");
15
15
  const __1 = require("..");
16
+ const CountryHoliday_1 = require("./CountryHoliday");
16
17
  let Country = class Country {
17
18
  };
18
19
  exports.Country = Country;
@@ -81,6 +82,10 @@ __decorate([
81
82
  (0, typeorm_1.OneToMany)(() => __1.Company, (company) => company.country),
82
83
  __metadata("design:type", Array)
83
84
  ], Country.prototype, "companies", void 0);
85
+ __decorate([
86
+ (0, typeorm_1.OneToMany)(() => CountryHoliday_1.CountryHoliday, (countryHoliday) => countryHoliday.country),
87
+ __metadata("design:type", Array)
88
+ ], Country.prototype, "country_holidays", void 0);
84
89
  exports.Country = Country = __decorate([
85
90
  (0, typeorm_1.Entity)({ comment: "Países donde está disponible la plataforma." })
86
91
  ], Country);
@@ -0,0 +1,8 @@
1
+ import { Country } from "./Country";
2
+ export declare class CountryHoliday {
3
+ id: number;
4
+ name: string;
5
+ date: string;
6
+ country: Country;
7
+ created: Date;
8
+ }
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CountryHoliday = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const Country_1 = require("./Country");
15
+ let CountryHoliday = class CountryHoliday {
16
+ };
17
+ exports.CountryHoliday = CountryHoliday;
18
+ __decorate([
19
+ (0, typeorm_1.PrimaryGeneratedColumn)({
20
+ type: "int",
21
+ comment: "ID único de cada registro.",
22
+ }),
23
+ __metadata("design:type", Number)
24
+ ], CountryHoliday.prototype, "id", void 0);
25
+ __decorate([
26
+ (0, typeorm_1.Column)({ type: "varchar", length: 200, comment: "Nombre del festivo." }),
27
+ __metadata("design:type", String)
28
+ ], CountryHoliday.prototype, "name", void 0);
29
+ __decorate([
30
+ (0, typeorm_1.Column)({
31
+ type: "date",
32
+ comment: "Fecha del festivo.",
33
+ }),
34
+ __metadata("design:type", String)
35
+ ], CountryHoliday.prototype, "date", void 0);
36
+ __decorate([
37
+ (0, typeorm_1.ManyToOne)(() => Country_1.Country, (country) => country.country_holidays, {
38
+ onDelete: "CASCADE",
39
+ onUpdate: "NO ACTION",
40
+ }),
41
+ (0, typeorm_1.JoinColumn)({ name: "country" }),
42
+ __metadata("design:type", Country_1.Country)
43
+ ], CountryHoliday.prototype, "country", void 0);
44
+ __decorate([
45
+ (0, typeorm_1.Column)({
46
+ type: "datetime",
47
+ default: () => "CURRENT_TIMESTAMP",
48
+ comment: "Fecha de creación del registro.",
49
+ }),
50
+ __metadata("design:type", Date)
51
+ ], CountryHoliday.prototype, "created", void 0);
52
+ exports.CountryHoliday = CountryHoliday = __decorate([
53
+ (0, typeorm_1.Entity)("country_holiday", {
54
+ comment: "Tabla para guardar los festivos de los países.",
55
+ })
56
+ ], CountryHoliday);
@@ -6,6 +6,7 @@ export declare class GlobalTemplateSection {
6
6
  template: GlobalTemplate;
7
7
  name: string;
8
8
  order: number;
9
+ details: any | null;
9
10
  created: Date;
10
11
  updated: Date | null;
11
12
  status: number;
@@ -55,6 +55,15 @@ __decorate([
55
55
  }),
56
56
  __metadata("design:type", Number)
57
57
  ], GlobalTemplateSection.prototype, "order", void 0);
58
+ __decorate([
59
+ (0, typeorm_1.Column)({
60
+ type: "json",
61
+ nullable: true,
62
+ default: null,
63
+ comment: "Elementos adicionales que tenga la sección.",
64
+ }),
65
+ __metadata("design:type", Object)
66
+ ], GlobalTemplateSection.prototype, "details", void 0);
58
67
  __decorate([
59
68
  (0, typeorm_1.Column)({
60
69
  type: "datetime",
@@ -4,7 +4,9 @@ export declare class GlobalTemplateSectionItem {
4
4
  code: string;
5
5
  section: GlobalTemplateSection;
6
6
  name: string;
7
+ observation: string | null;
7
8
  order: number;
9
+ details: any | null;
8
10
  created: Date;
9
11
  updated: Date | null;
10
12
  status: number;
@@ -47,6 +47,16 @@ __decorate([
47
47
  }),
48
48
  __metadata("design:type", String)
49
49
  ], GlobalTemplateSectionItem.prototype, "name", void 0);
50
+ __decorate([
51
+ (0, typeorm_1.Column)({
52
+ length: 255,
53
+ nullable: true,
54
+ default: null,
55
+ type: "varchar",
56
+ comment: "Observaciones/ayuda del item.",
57
+ }),
58
+ __metadata("design:type", Object)
59
+ ], GlobalTemplateSectionItem.prototype, "observation", void 0);
50
60
  __decorate([
51
61
  (0, typeorm_1.Column)({
52
62
  type: "int",
@@ -54,6 +64,15 @@ __decorate([
54
64
  }),
55
65
  __metadata("design:type", Number)
56
66
  ], GlobalTemplateSectionItem.prototype, "order", void 0);
67
+ __decorate([
68
+ (0, typeorm_1.Column)({
69
+ type: "json",
70
+ nullable: true,
71
+ default: null,
72
+ comment: "Elementos adicionales que tenga la sección.",
73
+ }),
74
+ __metadata("design:type", Object)
75
+ ], GlobalTemplateSectionItem.prototype, "details", void 0);
57
76
  __decorate([
58
77
  (0, typeorm_1.Column)({
59
78
  type: "datetime",
@@ -6,6 +6,7 @@ export declare class TemplateSection {
6
6
  template: Template;
7
7
  name: string;
8
8
  order: number;
9
+ details: any | null;
9
10
  created: Date;
10
11
  updated: Date | null;
11
12
  status: number;
@@ -55,6 +55,15 @@ __decorate([
55
55
  }),
56
56
  __metadata("design:type", Number)
57
57
  ], TemplateSection.prototype, "order", void 0);
58
+ __decorate([
59
+ (0, typeorm_1.Column)({
60
+ type: "json",
61
+ nullable: true,
62
+ default: null,
63
+ comment: "Elementos adicionales que tenga la sección.",
64
+ }),
65
+ __metadata("design:type", Object)
66
+ ], TemplateSection.prototype, "details", void 0);
58
67
  __decorate([
59
68
  (0, typeorm_1.Column)({
60
69
  type: "datetime",
@@ -4,7 +4,9 @@ export declare class TemplateSectionItem {
4
4
  code: string;
5
5
  section: TemplateSection;
6
6
  name: string;
7
+ observation: string | null;
7
8
  order: number;
9
+ details: any | null;
8
10
  created: Date;
9
11
  updated: Date | null;
10
12
  status: number;
@@ -47,6 +47,16 @@ __decorate([
47
47
  }),
48
48
  __metadata("design:type", String)
49
49
  ], TemplateSectionItem.prototype, "name", void 0);
50
+ __decorate([
51
+ (0, typeorm_1.Column)({
52
+ length: 255,
53
+ nullable: true,
54
+ default: null,
55
+ type: "varchar",
56
+ comment: "Observaciones/ayuda del item.",
57
+ }),
58
+ __metadata("design:type", Object)
59
+ ], TemplateSectionItem.prototype, "observation", void 0);
50
60
  __decorate([
51
61
  (0, typeorm_1.Column)({
52
62
  type: "int",
@@ -54,6 +64,15 @@ __decorate([
54
64
  }),
55
65
  __metadata("design:type", Number)
56
66
  ], TemplateSectionItem.prototype, "order", void 0);
67
+ __decorate([
68
+ (0, typeorm_1.Column)({
69
+ type: "json",
70
+ nullable: true,
71
+ default: null,
72
+ comment: "Elementos adicionales que tenga la sección.",
73
+ }),
74
+ __metadata("design:type", Object)
75
+ ], TemplateSectionItem.prototype, "details", void 0);
57
76
  __decorate([
58
77
  (0, typeorm_1.Column)({
59
78
  type: "datetime",
@@ -26,5 +26,6 @@ export { AssociateSection } from "./entities/AssociateSection";
26
26
  export { AssociatePasswordReset } from "./entities/AssociatePasswordReset";
27
27
  export { VehicleType } from "./entities/VehicleType";
28
28
  export { CompanyBrand } from "./entities/CompanyBrand";
29
+ export { CountryHoliday } from "./entities/CountryHoliday";
29
30
  export { Associates } from "./views/Associates";
30
31
  export { ServicesOrder } from "./views/ServicesOrder";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ServicesOrder = exports.Associates = exports.CompanyBrand = exports.VehicleType = exports.AssociatePasswordReset = exports.AssociateSection = exports.AssociatePermission = exports.AssociateRole = exports.AssociatePlatform = exports.Reminder = exports.ServiceOrderHistory = exports.ServiceOrder = exports.TemplateSectionItem = exports.TemplateSection = exports.Template = exports.Workshop = exports.GlobalTemplateSectionItem = exports.GlobalTemplateSection = exports.GlobalTemplate = exports.AssociateSession = exports.MasterSession = exports.Associate = exports.Client = exports.Master = exports.Vehicle = exports.Brand = exports.Company = exports.City = exports.Region = exports.Country = void 0;
3
+ exports.ServicesOrder = exports.Associates = exports.CountryHoliday = exports.CompanyBrand = exports.VehicleType = exports.AssociatePasswordReset = exports.AssociateSection = exports.AssociatePermission = exports.AssociateRole = exports.AssociatePlatform = exports.Reminder = exports.ServiceOrderHistory = exports.ServiceOrder = exports.TemplateSectionItem = exports.TemplateSection = exports.Template = exports.Workshop = exports.GlobalTemplateSectionItem = exports.GlobalTemplateSection = exports.GlobalTemplate = exports.AssociateSession = exports.MasterSession = exports.Associate = exports.Client = exports.Master = exports.Vehicle = exports.Brand = exports.Company = exports.City = exports.Region = exports.Country = void 0;
4
4
  var Country_1 = require("./entities/Country");
5
5
  Object.defineProperty(exports, "Country", { enumerable: true, get: function () { return Country_1.Country; } });
6
6
  var Region_1 = require("./entities/Region");
@@ -57,6 +57,8 @@ var VehicleType_1 = require("./entities/VehicleType");
57
57
  Object.defineProperty(exports, "VehicleType", { enumerable: true, get: function () { return VehicleType_1.VehicleType; } });
58
58
  var CompanyBrand_1 = require("./entities/CompanyBrand");
59
59
  Object.defineProperty(exports, "CompanyBrand", { enumerable: true, get: function () { return CompanyBrand_1.CompanyBrand; } });
60
+ var CountryHoliday_1 = require("./entities/CountryHoliday");
61
+ Object.defineProperty(exports, "CountryHoliday", { enumerable: true, get: function () { return CountryHoliday_1.CountryHoliday; } });
60
62
  var Associates_1 = require("./views/Associates");
61
63
  Object.defineProperty(exports, "Associates", { enumerable: true, get: function () { return Associates_1.Associates; } });
62
64
  var ServicesOrder_1 = require("./views/ServicesOrder");
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asumano/worklip-typeorm-db",
3
- "version": "1.1.22",
3
+ "version": "1.1.25",
4
4
  "publishConfig": {
5
5
  "access": "restricted"
6
6
  },
@@ -10,9 +10,6 @@
10
10
  "files": [
11
11
  "dist"
12
12
  ],
13
- "scripts": {
14
- "build": "npx rimraf dist && tsc --build"
15
- },
16
13
  "keywords": [],
17
14
  "author": "",
18
15
  "license": "ISC",
@@ -34,5 +31,8 @@
34
31
  "type": "git",
35
32
  "url": "https://github.com/worklip/worklip-typeorm-db.git"
36
33
  },
37
- "homepage": "https://github.com/worklip/worklip-typeorm-db.git"
38
- }
34
+ "homepage": "https://github.com/worklip/worklip-typeorm-db.git",
35
+ "scripts": {
36
+ "build": "npx rimraf dist && tsc --build"
37
+ }
38
+ }