test-entity-library-asm 3.7.9 → 3.8.1

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.
@@ -106,7 +106,7 @@ var RequestLocal = /** @class */ (function () {
106
106
  (0, typeorm_1.ManyToOne)(function () { return __1.CodeRedemptionHistoryUser; }, function (codeRedemptionHistoryUser) {
107
107
  return codeRedemptionHistoryUser.discount_redemption_request_locals;
108
108
  }, {
109
- onDelete: "NO ACTION",
109
+ onDelete: "SET NULL",
110
110
  onUpdate: "NO ACTION",
111
111
  nullable: true,
112
112
  }),
@@ -0,0 +1,8 @@
1
+ export declare class VerificationCode {
2
+ id: number;
3
+ email: string;
4
+ phone: string;
5
+ code: string;
6
+ expiration: Date;
7
+ created: Date;
8
+ }
@@ -0,0 +1,76 @@
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.VerificationCode = void 0;
13
+ var typeorm_1 = require("typeorm");
14
+ var dateTransformer_1 = require("../transformers/dateTransformer");
15
+ var VerificationCode = /** @class */ (function () {
16
+ function VerificationCode() {
17
+ }
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
+ ], VerificationCode.prototype, "id", void 0);
25
+ __decorate([
26
+ (0, typeorm_1.Column)({
27
+ length: 100,
28
+ type: "varchar",
29
+ comment: "Correo electrónico al que se le envía el código de verificación.",
30
+ nullable: true,
31
+ default: null,
32
+ }),
33
+ __metadata("design:type", String)
34
+ ], VerificationCode.prototype, "email", void 0);
35
+ __decorate([
36
+ (0, typeorm_1.Column)({
37
+ length: 12,
38
+ type: "varchar",
39
+ comment: "Número de teléfono al que se le envía el código de verificación.",
40
+ nullable: true,
41
+ default: null,
42
+ }),
43
+ __metadata("design:type", String)
44
+ ], VerificationCode.prototype, "phone", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)({
47
+ length: 5,
48
+ type: "varchar",
49
+ comment: "Código de verificación que se le envía al usuario.",
50
+ }),
51
+ __metadata("design:type", String)
52
+ ], VerificationCode.prototype, "code", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({
55
+ type: "datetime",
56
+ transformer: new dateTransformer_1.DateTransformer(),
57
+ comment: "Fecha de expiración del código de verificación.",
58
+ }),
59
+ __metadata("design:type", Date)
60
+ ], VerificationCode.prototype, "expiration", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.Column)({
63
+ type: "datetime",
64
+ transformer: new dateTransformer_1.DateTransformer(),
65
+ comment: "Fecha de creación del código de verificación.",
66
+ }),
67
+ __metadata("design:type", Date)
68
+ ], VerificationCode.prototype, "created", void 0);
69
+ VerificationCode = __decorate([
70
+ (0, typeorm_1.Entity)("verification_code", {
71
+ comment: "Acá se van a guardar los códigos que se envíen para crear cuentas, verificar correos, números de teléfono entre otros.",
72
+ })
73
+ ], VerificationCode);
74
+ return VerificationCode;
75
+ }());
76
+ exports.VerificationCode = VerificationCode;
@@ -69,6 +69,7 @@ export { RequestLocalTable } from "./entities/RequestLocalTable";
69
69
  export { Gallery } from "./entities/Gallery";
70
70
  export { ProductImage } from "./entities/ProductImage";
71
71
  export { LocalPaymentMethod } from "./entities/LocalPaymentMethod";
72
+ export { VerificationCode } from "./entities/VerificationCode";
72
73
  export { LocalsCompany } from "./views/LocalsCompany";
73
74
  export { VerifyLocals } from "./views/VerifyLocals";
74
75
  export { MasterNotifications } from "./views/MasterNotifications";
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.ToppingImage = exports.ProductDate = exports.ProductSchedule = exports.CategoryDate = exports.Bank = exports.ServicePlan = exports.PartnerPlatform = exports.PartnerPermissionSection = exports.LocalPlan = exports.MasterNotification = exports.VerifyLocal = exports.PosSystem = exports.AuthenticationCredential = exports.BusinessType = exports.UserAddress = exports.User = exports.TypeMeasureIngredient = exports.Square = exports.RequestProductGroupComplement = exports.RequestProduct = exports.Request = exports.Region = exports.ProductTopping = exports.ProductIngredient = exports.ProductGroupComplement = exports.ProductGroup = exports.Product = exports.Plan = exports.PaymentMethod = exports.PartnerRole = exports.PartnerPermission = exports.PartnerNotification = exports.Partner = exports.MasterRole = exports.MasterPermission = exports.Master = exports.LocalQualification = exports.Local = exports.DiscountCodeUser = exports.DiscountCodeCompany = exports.Day = exports.Country = exports.Configuration = exports.Company = exports.CodeRedemptionHistoryUser = exports.CodeRedemptionHistoryCompany = exports.City = exports.ScheduleCategory = exports.Category = exports.BusinessTypeProduct = void 0;
18
- exports.CustomRepository = exports.getLocalReservesInformation = exports.getVerifyLocalsInformation = exports.getLocalsCompanyInformation = exports.getDiscountsCodeUserInformation = exports.getDiscountsCodeCompanyInformation = exports.LocalReserves = exports.LocalTableZonesFilter = exports.PartnerNotifications = exports.DiscountsCodeUser = exports.Partners = exports.ViewLocalsCompanies = exports.MasterNotifications = exports.VerifyLocals = exports.LocalsCompany = exports.LocalPaymentMethod = exports.ProductImage = exports.Gallery = exports.RequestLocalTable = exports.RequestInvoiceCategory = exports.RequestInvoice = exports.LocalTableReserve = exports.LocalReserveStatus = exports.LocalReserve = exports.LocalTableReservePayment = exports.DecorationReserve = exports.LocalDecorationReserve = exports.LocalTable = exports.LocalTableZone = exports.RequestPrint = exports.ReceiptConfig = exports.RequestLocalPayment = exports.UserPaymentMethod = exports.RequestLocalHistory = exports.RequestLocal = exports.PartnerSession = void 0;
18
+ exports.CustomRepository = exports.getLocalReservesInformation = exports.getVerifyLocalsInformation = exports.getLocalsCompanyInformation = exports.getDiscountsCodeUserInformation = exports.getDiscountsCodeCompanyInformation = exports.LocalReserves = exports.LocalTableZonesFilter = exports.PartnerNotifications = exports.DiscountsCodeUser = exports.Partners = exports.ViewLocalsCompanies = exports.MasterNotifications = exports.VerifyLocals = exports.LocalsCompany = exports.VerificationCode = exports.LocalPaymentMethod = exports.ProductImage = exports.Gallery = exports.RequestLocalTable = exports.RequestInvoiceCategory = exports.RequestInvoice = exports.LocalTableReserve = exports.LocalReserveStatus = exports.LocalReserve = exports.LocalTableReservePayment = exports.DecorationReserve = exports.LocalDecorationReserve = exports.LocalTable = exports.LocalTableZone = exports.RequestPrint = exports.ReceiptConfig = exports.RequestLocalPayment = exports.UserPaymentMethod = exports.RequestLocalHistory = exports.RequestLocal = exports.PartnerSession = void 0;
19
19
  var BusinessTypeProduct_1 = require("./entities/BusinessTypeProduct");
20
20
  Object.defineProperty(exports, "BusinessTypeProduct", { enumerable: true, get: function () { return BusinessTypeProduct_1.BusinessTypeProduct; } });
21
21
  var Category_1 = require("./entities/Category");
@@ -158,6 +158,8 @@ var ProductImage_1 = require("./entities/ProductImage");
158
158
  Object.defineProperty(exports, "ProductImage", { enumerable: true, get: function () { return ProductImage_1.ProductImage; } });
159
159
  var LocalPaymentMethod_1 = require("./entities/LocalPaymentMethod");
160
160
  Object.defineProperty(exports, "LocalPaymentMethod", { enumerable: true, get: function () { return LocalPaymentMethod_1.LocalPaymentMethod; } });
161
+ var VerificationCode_1 = require("./entities/VerificationCode");
162
+ Object.defineProperty(exports, "VerificationCode", { enumerable: true, get: function () { return VerificationCode_1.VerificationCode; } });
161
163
  var LocalsCompany_1 = require("./views/LocalsCompany");
162
164
  Object.defineProperty(exports, "LocalsCompany", { enumerable: true, get: function () { return LocalsCompany_1.LocalsCompany; } });
163
165
  var VerifyLocals_1 = require("./views/VerifyLocals");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "test-entity-library-asm",
3
- "version": "3.7.9",
3
+ "version": "3.8.1",
4
4
  "description": "Entidades de ejemplo para una base de datos",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -110,7 +110,7 @@ export class RequestLocal {
110
110
  (codeRedemptionHistoryUser) =>
111
111
  codeRedemptionHistoryUser.discount_redemption_request_locals,
112
112
  {
113
- onDelete: "NO ACTION",
113
+ onDelete: "SET NULL",
114
114
  onUpdate: "NO ACTION",
115
115
  nullable: true,
116
116
  }
@@ -0,0 +1,53 @@
1
+ import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
2
+ import { DateTransformer } from "../transformers/dateTransformer";
3
+
4
+ @Entity("verification_code", {
5
+ comment:
6
+ "Acá se van a guardar los códigos que se envíen para crear cuentas, verificar correos, números de teléfono entre otros.",
7
+ })
8
+ export class VerificationCode {
9
+ @PrimaryGeneratedColumn({
10
+ type: "int",
11
+ comment: "Número de identificación (ID) único de cada registro.",
12
+ })
13
+ id: number;
14
+
15
+ @Column({
16
+ length: 100,
17
+ type: "varchar",
18
+ comment: "Correo electrónico al que se le envía el código de verificación.",
19
+ nullable: true,
20
+ default: null,
21
+ })
22
+ email: string;
23
+
24
+ @Column({
25
+ length: 12,
26
+ type: "varchar",
27
+ comment: "Número de teléfono al que se le envía el código de verificación.",
28
+ nullable: true,
29
+ default: null,
30
+ })
31
+ phone: string;
32
+
33
+ @Column({
34
+ length: 5,
35
+ type: "varchar",
36
+ comment: "Código de verificación que se le envía al usuario.",
37
+ })
38
+ code: string;
39
+
40
+ @Column({
41
+ type: "datetime",
42
+ transformer: new DateTransformer(),
43
+ comment: "Fecha de expiración del código de verificación.",
44
+ })
45
+ expiration: Date;
46
+
47
+ @Column({
48
+ type: "datetime",
49
+ transformer: new DateTransformer(),
50
+ comment: "Fecha de creación del código de verificación.",
51
+ })
52
+ created: Date;
53
+ }
@@ -69,6 +69,7 @@ export { RequestLocalTable } from "./entities/RequestLocalTable";
69
69
  export { Gallery } from "./entities/Gallery";
70
70
  export { ProductImage } from "./entities/ProductImage";
71
71
  export { LocalPaymentMethod } from "./entities/LocalPaymentMethod";
72
+ export { VerificationCode } from "./entities/VerificationCode";
72
73
 
73
74
  export { LocalsCompany } from "./views/LocalsCompany";
74
75
  export { VerifyLocals } from "./views/VerifyLocals";