@asumano/worklip-typeorm-db 1.1.14 → 1.1.15

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.
@@ -4,7 +4,7 @@ import { AssociateSession } from "./AssociateSession";
4
4
  import { Workshop } from "./Workshop";
5
5
  import { ServiceOrderHistory } from "./ServiceOrderHistory";
6
6
  import { Reminder } from "./Reminder";
7
- import { AssociatePermission } from "../entities.views.routes";
7
+ import { AssociatePasswordReset, AssociatePermission } from "../entities.views.routes";
8
8
  export declare class Associate {
9
9
  id: number;
10
10
  code: string;
@@ -28,4 +28,5 @@ export declare class Associate {
28
28
  service_order_history: ServiceOrderHistory[];
29
29
  reminders: Reminder[];
30
30
  permissions: AssociatePermission[];
31
+ passwordResets: AssociatePasswordReset[];
31
32
  }
@@ -207,6 +207,10 @@ __decorate([
207
207
  }),
208
208
  __metadata("design:type", Array)
209
209
  ], Associate.prototype, "permissions", void 0);
210
+ __decorate([
211
+ (0, typeorm_1.OneToMany)(() => entities_views_routes_1.AssociatePasswordReset, (passwordReset) => passwordReset.associate),
212
+ __metadata("design:type", Array)
213
+ ], Associate.prototype, "passwordResets", void 0);
210
214
  exports.Associate = Associate = __decorate([
211
215
  (0, typeorm_1.Entity)({
212
216
  comment: "Usuarios de los concesionarios/talleres de la plataforma.",
@@ -0,0 +1,10 @@
1
+ import { Associate } from "..";
2
+ export declare class AssociatePasswordReset {
3
+ id: number;
4
+ associate: Associate;
5
+ token: string;
6
+ expires_at: Date;
7
+ used: number;
8
+ created: Date;
9
+ updated: Date | null;
10
+ }
@@ -0,0 +1,77 @@
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.AssociatePasswordReset = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const __1 = require("..");
15
+ let AssociatePasswordReset = class AssociatePasswordReset {
16
+ };
17
+ exports.AssociatePasswordReset = AssociatePasswordReset;
18
+ __decorate([
19
+ (0, typeorm_1.PrimaryGeneratedColumn)({
20
+ type: "int",
21
+ comment: "Número de identificación (ID) único de cada registro.",
22
+ }),
23
+ __metadata("design:type", Number)
24
+ ], AssociatePasswordReset.prototype, "id", void 0);
25
+ __decorate([
26
+ (0, typeorm_1.ManyToOne)(() => __1.Associate, (associate) => associate.passwordResets, {
27
+ onDelete: "CASCADE",
28
+ onUpdate: "NO ACTION",
29
+ }),
30
+ (0, typeorm_1.JoinColumn)({ name: "associate" }),
31
+ __metadata("design:type", __1.Associate)
32
+ ], AssociatePasswordReset.prototype, "associate", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)({
35
+ length: 255,
36
+ type: "varchar",
37
+ comment: "Token generado para cambiar la contraseña.",
38
+ }),
39
+ __metadata("design:type", String)
40
+ ], AssociatePasswordReset.prototype, "token", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)({
43
+ type: "datetime",
44
+ comment: "Cuando expira el token.",
45
+ }),
46
+ __metadata("design:type", Date)
47
+ ], AssociatePasswordReset.prototype, "expires_at", void 0);
48
+ __decorate([
49
+ (0, typeorm_1.Column)({
50
+ default: 0,
51
+ type: "int",
52
+ width: 1,
53
+ comment: "Si ya se usó el token de cambio de contraseña.\n1: Ya se usó.\n0: No se ha usado.",
54
+ }),
55
+ __metadata("design:type", Number)
56
+ ], AssociatePasswordReset.prototype, "used", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.Column)({
59
+ type: "datetime",
60
+ comment: "Fecha de creación del registro.",
61
+ default: () => "CURRENT_TIMESTAMP",
62
+ }),
63
+ __metadata("design:type", Date)
64
+ ], AssociatePasswordReset.prototype, "created", void 0);
65
+ __decorate([
66
+ (0, typeorm_1.Column)({
67
+ type: "datetime",
68
+ nullable: true,
69
+ default: null,
70
+ comment: "Fecha de actualización del registro.",
71
+ onUpdate: "CURRENT_TIMESTAMP",
72
+ }),
73
+ __metadata("design:type", Object)
74
+ ], AssociatePasswordReset.prototype, "updated", void 0);
75
+ exports.AssociatePasswordReset = AssociatePasswordReset = __decorate([
76
+ (0, typeorm_1.Entity)("associate_password_reset")
77
+ ], AssociatePasswordReset);
@@ -23,4 +23,5 @@ export { AssociatePlatform } from "./entities/AssociatePlatform";
23
23
  export { AssociateRole } from "./entities/AssociateRole";
24
24
  export { AssociatePermission } from "./entities/AssociatePermission";
25
25
  export { AssociateSection } from "./entities/AssociateSection";
26
+ export { AssociatePasswordReset } from "./entities/AssociatePasswordReset";
26
27
  export { Associates } from "./views/Associates";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Associates = 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.Associates = 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");
@@ -51,5 +51,7 @@ var AssociatePermission_1 = require("./entities/AssociatePermission");
51
51
  Object.defineProperty(exports, "AssociatePermission", { enumerable: true, get: function () { return AssociatePermission_1.AssociatePermission; } });
52
52
  var AssociateSection_1 = require("./entities/AssociateSection");
53
53
  Object.defineProperty(exports, "AssociateSection", { enumerable: true, get: function () { return AssociateSection_1.AssociateSection; } });
54
+ var AssociatePasswordReset_1 = require("./entities/AssociatePasswordReset");
55
+ Object.defineProperty(exports, "AssociatePasswordReset", { enumerable: true, get: function () { return AssociatePasswordReset_1.AssociatePasswordReset; } });
54
56
  var Associates_1 = require("./views/Associates");
55
57
  Object.defineProperty(exports, "Associates", { enumerable: true, get: function () { return Associates_1.Associates; } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asumano/worklip-typeorm-db",
3
- "version": "1.1.14",
3
+ "version": "1.1.15",
4
4
  "publishConfig": {
5
5
  "access": "restricted"
6
6
  },