test-entity-library-asm 3.2.10 → 3.2.12
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/entities/BusinessType.d.ts +2 -2
- package/dist/entities/BusinessType.js +10 -8
- package/dist/entities/BusinessTypeProduct.d.ts +2 -2
- package/dist/entities/BusinessTypeProduct.js +5 -2
- package/dist/entities/Category.d.ts +6 -6
- package/dist/entities/Category.js +12 -6
- package/dist/entities/Company.d.ts +6 -6
- package/dist/entities/Company.js +3 -3
- package/dist/entities/Country.d.ts +1 -1
- package/dist/entities/DiscountCodeCompany.d.ts +8 -8
- package/dist/entities/DiscountCodeCompany.js +26 -24
- package/dist/entities/DiscountCodeUser.d.ts +9 -9
- package/dist/entities/DiscountCodeUser.js +35 -33
- package/dist/entities/Local.d.ts +2 -2
- package/dist/entities/Local.js +1 -1
- package/dist/entities/LocalPlan.d.ts +2 -2
- package/dist/entities/LocalPlan.js +18 -18
- package/dist/entities/LocalQualification.d.ts +3 -3
- package/dist/entities/LocalQualification.js +17 -12
- package/dist/entities/Master.d.ts +2 -2
- package/dist/entities/Master.js +1 -1
- package/dist/entities/MasterNotification.d.ts +4 -4
- package/dist/entities/MasterNotification.js +3 -3
- package/dist/entities/MasterRole.d.ts +1 -1
- package/dist/entities/MasterRole.js +1 -1
- package/dist/entities/Partner.d.ts +6 -5
- package/dist/entities/Partner.js +7 -3
- package/dist/entities/PartnerNotification.d.ts +4 -4
- package/dist/entities/PartnerNotification.js +3 -3
- package/dist/entities/PartnerPermission.d.ts +4 -4
- package/dist/entities/PartnerPermission.js +18 -18
- package/dist/entities/PartnerPermissionSection.d.ts +3 -3
- package/dist/entities/PartnerPermissionSection.js +13 -13
- package/dist/entities/PartnerPlatform.d.ts +3 -3
- package/dist/entities/PartnerPlatform.js +10 -10
- package/dist/entities/PartnerRole.d.ts +5 -5
- package/dist/entities/PartnerRole.js +22 -22
- package/dist/entities/PartnerSession.d.ts +1 -1
- package/dist/entities/PartnerSession.js +1 -4
- package/dist/entities/PaymentMethod.d.ts +4 -6
- package/dist/entities/PaymentMethod.js +11 -22
- package/dist/entities/Plan.d.ts +3 -3
- package/dist/entities/Plan.js +19 -14
- package/dist/entities/PosSystem.d.ts +2 -2
- package/dist/entities/PosSystem.js +12 -12
- package/dist/entities/Product.d.ts +5 -5
- package/dist/entities/Product.js +14 -5
- package/dist/entities/ProductTopping.d.ts +3 -3
- package/dist/entities/ProductTopping.js +9 -9
- package/dist/entities/Request.d.ts +2 -5
- package/dist/entities/Request.js +2 -18
- package/dist/entities/RequestLocal.d.ts +2 -1
- package/dist/entities/RequestLocal.js +4 -0
- package/dist/entities/RequestLocalHistory.d.ts +2 -2
- package/dist/entities/RequestLocalHistory.js +2 -2
- package/dist/entities/RequestLocalPayment.d.ts +19 -0
- package/dist/entities/RequestLocalPayment.js +159 -0
- package/dist/entities/ServicePlan.d.ts +4 -4
- package/dist/entities/ServicePlan.js +21 -23
- package/dist/entities/Square.d.ts +6 -6
- package/dist/entities/Square.js +18 -18
- package/dist/entities/ToppingImage.d.ts +1 -1
- package/dist/entities/ToppingImage.js +1 -1
- package/dist/entities/User.d.ts +7 -6
- package/dist/entities/User.js +22 -20
- package/dist/entities/UserAddress.d.ts +1 -1
- package/dist/entities/UserAddress.js +1 -1
- package/dist/entities/UserPaymentMethod.d.ts +17 -0
- package/dist/entities/UserPaymentMethod.js +118 -0
- package/dist/entities/VerifyLocal.d.ts +4 -4
- package/dist/entities/VerifyLocal.js +32 -32
- package/dist/entities/productGroupComplement.d.ts +5 -5
- package/dist/entities/productGroupComplement.js +3 -3
- package/dist/entities.views.routes.d.ts +2 -0
- package/dist/entities.views.routes.js +5 -1
- package/package.json +1 -1
- package/src/entities/BusinessType.ts +16 -15
- package/src/entities/BusinessTypeProduct.ts +5 -2
- package/src/entities/Category.ts +13 -7
- package/src/entities/Company.ts +8 -8
- package/src/entities/Country.ts +1 -1
- package/src/entities/DiscountCodeCompany.ts +43 -42
- package/src/entities/DiscountCodeUser.ts +52 -50
- package/src/entities/Local.ts +2 -15
- package/src/entities/LocalPlan.ts +31 -31
- package/src/entities/LocalQualification.ts +24 -25
- package/src/entities/Master.ts +2 -2
- package/src/entities/MasterNotification.ts +4 -4
- package/src/entities/MasterRole.ts +1 -1
- package/src/entities/Partner.ts +11 -4
- package/src/entities/PartnerNotification.ts +4 -4
- package/src/entities/PartnerPermission.ts +27 -27
- package/src/entities/PartnerPermissionSection.ts +21 -21
- package/src/entities/PartnerPlatform.ts +17 -17
- package/src/entities/PartnerRole.ts +30 -30
- package/src/entities/PartnerSession.ts +4 -11
- package/src/entities/PaymentMethod.ts +14 -21
- package/src/entities/Plan.ts +31 -26
- package/src/entities/PosSystem.ts +21 -21
- package/src/entities/Product.ts +16 -7
- package/src/entities/ProductTopping.ts +17 -17
- package/src/entities/Request.ts +3 -32
- package/src/entities/RequestLocal.ts +7 -1
- package/src/entities/RequestLocalHistory.ts +2 -2
- package/src/entities/RequestLocalPayment.ts +145 -0
- package/src/entities/ServicePlan.ts +40 -41
- package/src/entities/Square.ts +31 -31
- package/src/entities/ToppingImage.ts +1 -1
- package/src/entities/User.ts +26 -22
- package/src/entities/UserAddress.ts +1 -1
- package/src/entities/UserPaymentMethod.ts +99 -0
- package/src/entities/VerifyLocal.ts +51 -51
- package/src/entities/productGroupComplement.ts +5 -5
- package/src/entities.views.routes.ts +2 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { BusinessTypeProduct } from
|
|
1
|
+
import { BusinessTypeProduct } from "./BusinessTypeProduct";
|
|
2
2
|
export declare class BusinessType {
|
|
3
3
|
id: number;
|
|
4
4
|
name: string;
|
|
5
|
-
description: string;
|
|
5
|
+
description: string | null;
|
|
6
6
|
status: number;
|
|
7
7
|
business_types_product: BusinessTypeProduct[];
|
|
8
8
|
}
|
|
@@ -12,31 +12,33 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.BusinessType = void 0;
|
|
13
13
|
var typeorm_1 = require("typeorm");
|
|
14
14
|
var BusinessTypeProduct_1 = require("./BusinessTypeProduct");
|
|
15
|
+
var jsonTransformer_1 = require("../transformers/jsonTransformer");
|
|
15
16
|
var BusinessType = /** @class */ (function () {
|
|
16
17
|
function BusinessType() {
|
|
17
18
|
}
|
|
18
19
|
__decorate([
|
|
19
20
|
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
20
|
-
comment:
|
|
21
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
21
22
|
}),
|
|
22
23
|
__metadata("design:type", Number)
|
|
23
24
|
], BusinessType.prototype, "id", void 0);
|
|
24
25
|
__decorate([
|
|
25
|
-
(0, typeorm_1.Column)({ length: 50, comment:
|
|
26
|
+
(0, typeorm_1.Column)({ length: 50, comment: "Nombre del tipo de negocio." }),
|
|
26
27
|
__metadata("design:type", String)
|
|
27
28
|
], BusinessType.prototype, "name", void 0);
|
|
28
29
|
__decorate([
|
|
29
30
|
(0, typeorm_1.Column)({
|
|
30
|
-
type:
|
|
31
|
+
type: "text",
|
|
31
32
|
nullable: true,
|
|
32
|
-
|
|
33
|
+
transformer: jsonTransformer_1.jsonTransformer,
|
|
34
|
+
comment: "Descripción del tipo de negocio.",
|
|
33
35
|
}),
|
|
34
|
-
__metadata("design:type",
|
|
36
|
+
__metadata("design:type", Object)
|
|
35
37
|
], BusinessType.prototype, "description", void 0);
|
|
36
38
|
__decorate([
|
|
37
39
|
(0, typeorm_1.Column)({
|
|
38
40
|
default: 1,
|
|
39
|
-
comment:
|
|
41
|
+
comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
|
40
42
|
}),
|
|
41
43
|
__metadata("design:type", Number)
|
|
42
44
|
], BusinessType.prototype, "status", void 0);
|
|
@@ -46,8 +48,8 @@ var BusinessType = /** @class */ (function () {
|
|
|
46
48
|
], BusinessType.prototype, "business_types_product", void 0);
|
|
47
49
|
BusinessType = __decorate([
|
|
48
50
|
(0, typeorm_1.Entity)({
|
|
49
|
-
name:
|
|
50
|
-
comment:
|
|
51
|
+
name: "business_type",
|
|
52
|
+
comment: "Almacenar los tipos de negocio qué se van a poder agregar en asumano.",
|
|
51
53
|
})
|
|
52
54
|
], BusinessType);
|
|
53
55
|
return BusinessType;
|
|
@@ -2,9 +2,9 @@ import { Local } from "..";
|
|
|
2
2
|
import { BusinessType } from "./BusinessType";
|
|
3
3
|
export declare class BusinessTypeProduct {
|
|
4
4
|
id: number;
|
|
5
|
-
business_type: BusinessType;
|
|
5
|
+
business_type: BusinessType | null;
|
|
6
6
|
name: string;
|
|
7
|
-
photo: string;
|
|
7
|
+
photo: string | null;
|
|
8
8
|
status: number;
|
|
9
9
|
business_type_products: Local[];
|
|
10
10
|
}
|
|
@@ -29,10 +29,11 @@ var BusinessTypeProduct = /** @class */ (function () {
|
|
|
29
29
|
nullable: true,
|
|
30
30
|
}),
|
|
31
31
|
(0, typeorm_1.JoinColumn)({ name: "business_type" }),
|
|
32
|
-
__metadata("design:type",
|
|
32
|
+
__metadata("design:type", Object)
|
|
33
33
|
], BusinessTypeProduct.prototype, "business_type", void 0);
|
|
34
34
|
__decorate([
|
|
35
35
|
(0, typeorm_1.Column)({
|
|
36
|
+
type: "string",
|
|
36
37
|
length: 40,
|
|
37
38
|
comment: "ID de la variable que se encuentra en los archivos `locales` para el multilenguaje.",
|
|
38
39
|
}),
|
|
@@ -40,14 +41,16 @@ var BusinessTypeProduct = /** @class */ (function () {
|
|
|
40
41
|
], BusinessTypeProduct.prototype, "name", void 0);
|
|
41
42
|
__decorate([
|
|
42
43
|
(0, typeorm_1.Column)({
|
|
44
|
+
type: "string",
|
|
43
45
|
length: 500,
|
|
44
46
|
nullable: true,
|
|
45
47
|
comment: "Imagen para el tipo de comida.",
|
|
46
48
|
}),
|
|
47
|
-
__metadata("design:type",
|
|
49
|
+
__metadata("design:type", Object)
|
|
48
50
|
], BusinessTypeProduct.prototype, "photo", void 0);
|
|
49
51
|
__decorate([
|
|
50
52
|
(0, typeorm_1.Column)({
|
|
53
|
+
type: "number",
|
|
51
54
|
default: 1,
|
|
52
55
|
comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
|
53
56
|
}),
|
|
@@ -6,16 +6,16 @@ export declare class Category {
|
|
|
6
6
|
local: Local;
|
|
7
7
|
name: string;
|
|
8
8
|
position: number;
|
|
9
|
-
type_sales_hours: number;
|
|
10
|
-
show_or_hide_item: number;
|
|
9
|
+
type_sales_hours: number | null;
|
|
10
|
+
show_or_hide_item: number | null;
|
|
11
11
|
created_by: Partner;
|
|
12
|
-
created: Date;
|
|
12
|
+
created: Date | null;
|
|
13
13
|
updated: Date;
|
|
14
|
-
updated_by: Partner;
|
|
15
|
-
current_values: any;
|
|
14
|
+
updated_by: Partner | null;
|
|
15
|
+
current_values: any | null;
|
|
16
16
|
status: number;
|
|
17
17
|
status_review: number;
|
|
18
|
-
review_comment: string;
|
|
18
|
+
review_comment: string | null;
|
|
19
19
|
products: Product[];
|
|
20
20
|
category_schedules: ScheduleCategory[];
|
|
21
21
|
category_dates: CategoryDate[];
|
|
@@ -15,6 +15,7 @@ var Local_1 = require("./Local");
|
|
|
15
15
|
var Product_1 = require("./Product");
|
|
16
16
|
var __1 = require("..");
|
|
17
17
|
var jsonTransformer_1 = require("../transformers/jsonTransformer");
|
|
18
|
+
var dateTransformer_1 = require("../transformers/dateTransformer");
|
|
18
19
|
var Category = /** @class */ (function () {
|
|
19
20
|
function Category() {
|
|
20
21
|
}
|
|
@@ -46,7 +47,7 @@ var Category = /** @class */ (function () {
|
|
|
46
47
|
comment: "Campo para saber el tipo de horario que se va a mostrar en la aplicación:\n 1. Días. \n2. Fecha específica.",
|
|
47
48
|
default: null,
|
|
48
49
|
}),
|
|
49
|
-
__metadata("design:type",
|
|
50
|
+
__metadata("design:type", Object)
|
|
50
51
|
], Category.prototype, "type_sales_hours", void 0);
|
|
51
52
|
__decorate([
|
|
52
53
|
(0, typeorm_1.Column)({
|
|
@@ -54,7 +55,7 @@ var Category = /** @class */ (function () {
|
|
|
54
55
|
comment: "Columna para saber el tipo de horario qué el usuario quiere para el elemento: \n1. Mostrar (Show). \n2. Ocultar (Hide)",
|
|
55
56
|
default: null,
|
|
56
57
|
}),
|
|
57
|
-
__metadata("design:type",
|
|
58
|
+
__metadata("design:type", Object)
|
|
58
59
|
], Category.prototype, "show_or_hide_item", void 0);
|
|
59
60
|
__decorate([
|
|
60
61
|
(0, typeorm_1.ManyToOne)(function () { return __1.Partner; }, function (partner) { return partner.partners_category_created_by; }, {
|
|
@@ -68,12 +69,17 @@ var Category = /** @class */ (function () {
|
|
|
68
69
|
(0, typeorm_1.Column)({
|
|
69
70
|
type: "datetime",
|
|
70
71
|
nullable: true,
|
|
72
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
71
73
|
comment: "Fecha de creación del registro.",
|
|
72
74
|
}),
|
|
73
|
-
__metadata("design:type",
|
|
75
|
+
__metadata("design:type", Object)
|
|
74
76
|
], Category.prototype, "created", void 0);
|
|
75
77
|
__decorate([
|
|
76
|
-
(0, typeorm_1.Column)({
|
|
78
|
+
(0, typeorm_1.Column)({
|
|
79
|
+
type: "datetime",
|
|
80
|
+
transformer: new dateTransformer_1.DateTransformer(),
|
|
81
|
+
comment: "Fecha de actualización del registro.",
|
|
82
|
+
}),
|
|
77
83
|
__metadata("design:type", Date)
|
|
78
84
|
], Category.prototype, "updated", void 0);
|
|
79
85
|
__decorate([
|
|
@@ -83,7 +89,7 @@ var Category = /** @class */ (function () {
|
|
|
83
89
|
nullable: true,
|
|
84
90
|
}),
|
|
85
91
|
(0, typeorm_1.JoinColumn)({ name: "updated_by" }),
|
|
86
|
-
__metadata("design:type",
|
|
92
|
+
__metadata("design:type", Object)
|
|
87
93
|
], Category.prototype, "updated_by", void 0);
|
|
88
94
|
__decorate([
|
|
89
95
|
(0, typeorm_1.Column)({
|
|
@@ -114,7 +120,7 @@ var Category = /** @class */ (function () {
|
|
|
114
120
|
length: 600,
|
|
115
121
|
comment: "Comentario del revisor al rechazar una categoría (master).",
|
|
116
122
|
}),
|
|
117
|
-
__metadata("design:type",
|
|
123
|
+
__metadata("design:type", Object)
|
|
118
124
|
], Category.prototype, "review_comment", void 0);
|
|
119
125
|
__decorate([
|
|
120
126
|
(0, typeorm_1.OneToMany)(function () { return Product_1.Product; }, function (product) { return product.category; }),
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IPropsContactDetails } from "../interfaces";
|
|
1
2
|
import { City } from "./City";
|
|
2
3
|
import { CodeRedemptionHistoryCompany } from "./CodeRedemptionHistoryCompany";
|
|
3
4
|
import { DiscountCodeUser } from "./DiscountCodeUser";
|
|
@@ -6,20 +7,19 @@ import { Partner } from "./Partner";
|
|
|
6
7
|
import { PartnerRole } from "./PartnerRole";
|
|
7
8
|
import { Plan } from "./Plan";
|
|
8
9
|
import { ProductTopping } from "./ProductTopping";
|
|
9
|
-
import { IPropsContactDetails } from "../interfaces";
|
|
10
10
|
export declare class Company {
|
|
11
11
|
id: number;
|
|
12
12
|
code: string;
|
|
13
13
|
name: string;
|
|
14
14
|
city: City;
|
|
15
15
|
partner: Partner;
|
|
16
|
-
profile: any;
|
|
16
|
+
profile: any | null;
|
|
17
17
|
contact_details: IPropsContactDetails | null;
|
|
18
|
-
legal_information: any;
|
|
19
|
-
legal_agent: any;
|
|
20
|
-
settings: any;
|
|
18
|
+
legal_information: any | null;
|
|
19
|
+
legal_agent: any | null;
|
|
20
|
+
settings: any | null;
|
|
21
21
|
created: Date;
|
|
22
|
-
expiration: Date;
|
|
22
|
+
expiration: Date | null;
|
|
23
23
|
updated: Date;
|
|
24
24
|
status: number;
|
|
25
25
|
locals: Local[];
|
package/dist/entities/Company.js
CHANGED
|
@@ -11,6 +11,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Company = void 0;
|
|
13
13
|
var typeorm_1 = require("typeorm");
|
|
14
|
+
var dateTransformer_1 = require("../transformers/dateTransformer");
|
|
15
|
+
var jsonTransformer_1 = require("../transformers/jsonTransformer");
|
|
14
16
|
var City_1 = require("./City");
|
|
15
17
|
var CodeRedemptionHistoryCompany_1 = require("./CodeRedemptionHistoryCompany");
|
|
16
18
|
var DiscountCodeUser_1 = require("./DiscountCodeUser");
|
|
@@ -19,8 +21,6 @@ var Partner_1 = require("./Partner");
|
|
|
19
21
|
var PartnerRole_1 = require("./PartnerRole");
|
|
20
22
|
var Plan_1 = require("./Plan");
|
|
21
23
|
var ProductTopping_1 = require("./ProductTopping");
|
|
22
|
-
var jsonTransformer_1 = require("../transformers/jsonTransformer");
|
|
23
|
-
var dateTransformer_1 = require("../transformers/dateTransformer");
|
|
24
24
|
var Company = /** @class */ (function () {
|
|
25
25
|
function Company() {
|
|
26
26
|
}
|
|
@@ -113,7 +113,7 @@ var Company = /** @class */ (function () {
|
|
|
113
113
|
nullable: true,
|
|
114
114
|
comment: "Cuándo expira el plan de la empresa.",
|
|
115
115
|
}),
|
|
116
|
-
__metadata("design:type",
|
|
116
|
+
__metadata("design:type", Object)
|
|
117
117
|
], Company.prototype, "expiration", void 0);
|
|
118
118
|
__decorate([
|
|
119
119
|
(0, typeorm_1.Column)({
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { CodeRedemptionHistoryCompany } from
|
|
2
|
-
import { Master } from
|
|
3
|
-
import { ServiceDiscountsPlan } from
|
|
1
|
+
import { CodeRedemptionHistoryCompany } from "./CodeRedemptionHistoryCompany";
|
|
2
|
+
import { Master } from "./Master";
|
|
3
|
+
import { ServiceDiscountsPlan } from "./ServiceDiscountsPlan";
|
|
4
4
|
export declare class DiscountCodeCompany {
|
|
5
5
|
id: number;
|
|
6
6
|
code: string;
|
|
7
7
|
discount: string;
|
|
8
8
|
type: number;
|
|
9
9
|
single_use: number;
|
|
10
|
-
use_limit: number;
|
|
10
|
+
use_limit: number | null;
|
|
11
11
|
created: Date;
|
|
12
|
-
start:
|
|
13
|
-
expiration:
|
|
14
|
-
repeat_days: any;
|
|
15
|
-
updated: Date;
|
|
12
|
+
start: Date;
|
|
13
|
+
expiration: Date | null;
|
|
14
|
+
repeat_days: any | null;
|
|
15
|
+
updated: Date | null;
|
|
16
16
|
status: number;
|
|
17
17
|
updated_by: Master;
|
|
18
18
|
code_redemptions_history_company: CodeRedemptionHistoryCompany[];
|
|
@@ -21,93 +21,95 @@ var DiscountCodeCompany = /** @class */ (function () {
|
|
|
21
21
|
}
|
|
22
22
|
__decorate([
|
|
23
23
|
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
24
|
-
comment:
|
|
24
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
25
25
|
}),
|
|
26
26
|
__metadata("design:type", Number)
|
|
27
27
|
], DiscountCodeCompany.prototype, "id", void 0);
|
|
28
28
|
__decorate([
|
|
29
29
|
(0, typeorm_1.Column)({
|
|
30
30
|
length: 10,
|
|
31
|
-
comment:
|
|
31
|
+
comment: "Código de descuento para las empresas (company).",
|
|
32
32
|
}),
|
|
33
33
|
__metadata("design:type", String)
|
|
34
34
|
], DiscountCodeCompany.prototype, "code", void 0);
|
|
35
35
|
__decorate([
|
|
36
|
-
(0, typeorm_1.Column)({ length: 10, comment:
|
|
36
|
+
(0, typeorm_1.Column)({ length: 10, comment: "Descuento que se aplica." }),
|
|
37
37
|
__metadata("design:type", String)
|
|
38
38
|
], DiscountCodeCompany.prototype, "discount", void 0);
|
|
39
39
|
__decorate([
|
|
40
40
|
(0, typeorm_1.Column)({
|
|
41
41
|
default: 1,
|
|
42
|
-
comment:
|
|
42
|
+
comment: "Campo para el tipo de descuento:\r\n1. Porcentaje.\r\n2. Valor en moneda.",
|
|
43
43
|
}),
|
|
44
44
|
__metadata("design:type", Number)
|
|
45
45
|
], DiscountCodeCompany.prototype, "type", void 0);
|
|
46
46
|
__decorate([
|
|
47
47
|
(0, typeorm_1.Column)({
|
|
48
48
|
default: 1,
|
|
49
|
-
comment:
|
|
49
|
+
comment: "Con esto validamos si la empresa puede usar el código una vez o varias veces:\r\n1. Una sola vez.\r\n0. Más de una vez.\r\n\r\nCon esto validamos sí tenemos qué ir a buscar a la tabla code_redemption_history_company.",
|
|
50
50
|
}),
|
|
51
51
|
__metadata("design:type", Number)
|
|
52
52
|
], DiscountCodeCompany.prototype, "single_use", void 0);
|
|
53
53
|
__decorate([
|
|
54
54
|
(0, typeorm_1.Column)({
|
|
55
55
|
nullable: true,
|
|
56
|
-
comment:
|
|
56
|
+
comment: "Validamos sí el descuento se aplica para una cantidad límite de usuarios. Entonces, no debería tener en cuenta la fecha de expiración o, si quiero agregar las 2 condicionales.",
|
|
57
57
|
}),
|
|
58
|
-
__metadata("design:type",
|
|
58
|
+
__metadata("design:type", Object)
|
|
59
59
|
], DiscountCodeCompany.prototype, "use_limit", void 0);
|
|
60
60
|
__decorate([
|
|
61
61
|
(0, typeorm_1.Column)({
|
|
62
|
-
type:
|
|
63
|
-
comment:
|
|
62
|
+
type: "datetime",
|
|
63
|
+
comment: "Fecha de creación del registro.",
|
|
64
64
|
transformer: new dateTransformer_1.DateTransformer(),
|
|
65
65
|
}),
|
|
66
66
|
__metadata("design:type", Date)
|
|
67
67
|
], DiscountCodeCompany.prototype, "created", void 0);
|
|
68
68
|
__decorate([
|
|
69
69
|
(0, typeorm_1.Column)({
|
|
70
|
-
|
|
70
|
+
type: "date",
|
|
71
|
+
comment: "Fecha inicial del descuento.",
|
|
71
72
|
}),
|
|
72
|
-
__metadata("design:type",
|
|
73
|
+
__metadata("design:type", Date)
|
|
73
74
|
], DiscountCodeCompany.prototype, "start", void 0);
|
|
74
75
|
__decorate([
|
|
75
76
|
(0, typeorm_1.Column)({
|
|
77
|
+
type: "date",
|
|
76
78
|
nullable: true,
|
|
77
|
-
comment:
|
|
79
|
+
comment: "Fecha de expiración del registro.",
|
|
78
80
|
}),
|
|
79
|
-
__metadata("design:type",
|
|
81
|
+
__metadata("design:type", Object)
|
|
80
82
|
], DiscountCodeCompany.prototype, "expiration", void 0);
|
|
81
83
|
__decorate([
|
|
82
84
|
(0, typeorm_1.Column)({
|
|
83
|
-
type:
|
|
85
|
+
type: "text",
|
|
84
86
|
transformer: jsonTransformer_1.jsonTransformer,
|
|
85
87
|
nullable: true,
|
|
86
|
-
comment:
|
|
88
|
+
comment: "Columna de tipos JSON para agregar en un arreglo los días que se pueden repetir el descuento.",
|
|
87
89
|
}),
|
|
88
90
|
__metadata("design:type", Object)
|
|
89
91
|
], DiscountCodeCompany.prototype, "repeat_days", void 0);
|
|
90
92
|
__decorate([
|
|
91
93
|
(0, typeorm_1.Column)({
|
|
92
|
-
type:
|
|
93
|
-
comment:
|
|
94
|
+
type: "datetime",
|
|
95
|
+
comment: "Fecha de actualización.",
|
|
94
96
|
transformer: new dateTransformer_1.DateTransformer(),
|
|
95
97
|
}),
|
|
96
|
-
__metadata("design:type",
|
|
98
|
+
__metadata("design:type", Object)
|
|
97
99
|
], DiscountCodeCompany.prototype, "updated", void 0);
|
|
98
100
|
__decorate([
|
|
99
101
|
(0, typeorm_1.Column)({
|
|
100
102
|
default: 1,
|
|
101
|
-
comment:
|
|
103
|
+
comment: "Estado del registro, es decir: \n 1. Activo: Es visible en la plataforma. \n 0. Inactivo: No será visible en la plataforma.",
|
|
102
104
|
}),
|
|
103
105
|
__metadata("design:type", Number)
|
|
104
106
|
], DiscountCodeCompany.prototype, "status", void 0);
|
|
105
107
|
__decorate([
|
|
106
108
|
(0, typeorm_1.ManyToOne)(function () { return Master_1.Master; }, function (master) { return master.discount_code_companies; }, {
|
|
107
|
-
onDelete:
|
|
108
|
-
onUpdate:
|
|
109
|
+
onDelete: "CASCADE",
|
|
110
|
+
onUpdate: "NO ACTION",
|
|
109
111
|
}),
|
|
110
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
112
|
+
(0, typeorm_1.JoinColumn)({ name: "updated_by" }),
|
|
111
113
|
__metadata("design:type", Master_1.Master)
|
|
112
114
|
], DiscountCodeCompany.prototype, "updated_by", void 0);
|
|
113
115
|
__decorate([
|
|
@@ -121,8 +123,8 @@ var DiscountCodeCompany = /** @class */ (function () {
|
|
|
121
123
|
__metadata("design:type", Array)
|
|
122
124
|
], DiscountCodeCompany.prototype, "service_discounts_plans", void 0);
|
|
123
125
|
DiscountCodeCompany = __decorate([
|
|
124
|
-
(0, typeorm_1.Entity)(
|
|
125
|
-
comment:
|
|
126
|
+
(0, typeorm_1.Entity)("discount_code_company", {
|
|
127
|
+
comment: "Códigos de descuento para las empresas.",
|
|
126
128
|
})
|
|
127
129
|
], DiscountCodeCompany);
|
|
128
130
|
return DiscountCodeCompany;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { Local } from "..";
|
|
2
|
+
import { CodeRedemptionHistoryUser } from "./CodeRedemptionHistoryUser";
|
|
3
|
+
import { Company } from "./Company";
|
|
4
|
+
import { Partner } from "./Partner";
|
|
5
5
|
export declare class DiscountCodeUser {
|
|
6
6
|
id: number;
|
|
7
7
|
company: Company;
|
|
8
|
-
local: Local;
|
|
8
|
+
local: Local | null;
|
|
9
9
|
code: string;
|
|
10
10
|
discount: string;
|
|
11
11
|
type: number;
|
|
12
12
|
single_use: number;
|
|
13
|
-
use_limit: number;
|
|
13
|
+
use_limit: number | null;
|
|
14
14
|
created: Date;
|
|
15
|
-
start:
|
|
16
|
-
expiration:
|
|
17
|
-
repeat_days: any;
|
|
15
|
+
start: Date;
|
|
16
|
+
expiration: Date | null;
|
|
17
|
+
repeat_days: any | null;
|
|
18
18
|
updated_by: Partner;
|
|
19
19
|
updated: Date;
|
|
20
20
|
status: number;
|
|
@@ -11,116 +11,118 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.DiscountCodeUser = void 0;
|
|
13
13
|
var typeorm_1 = require("typeorm");
|
|
14
|
-
var CodeRedemptionHistoryUser_1 = require("./CodeRedemptionHistoryUser");
|
|
15
|
-
var Company_1 = require("./Company");
|
|
16
|
-
var Partner_1 = require("./Partner");
|
|
17
14
|
var __1 = require("..");
|
|
18
15
|
var dateTransformer_1 = require("../transformers/dateTransformer");
|
|
19
16
|
var jsonTransformer_1 = require("../transformers/jsonTransformer");
|
|
17
|
+
var CodeRedemptionHistoryUser_1 = require("./CodeRedemptionHistoryUser");
|
|
18
|
+
var Company_1 = require("./Company");
|
|
19
|
+
var Partner_1 = require("./Partner");
|
|
20
20
|
var DiscountCodeUser = /** @class */ (function () {
|
|
21
21
|
function DiscountCodeUser() {
|
|
22
22
|
}
|
|
23
23
|
__decorate([
|
|
24
24
|
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
25
|
-
comment:
|
|
25
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
26
26
|
}),
|
|
27
27
|
__metadata("design:type", Number)
|
|
28
28
|
], DiscountCodeUser.prototype, "id", void 0);
|
|
29
29
|
__decorate([
|
|
30
30
|
(0, typeorm_1.ManyToOne)(function () { return Company_1.Company; }, function (company) { return company.discount_code_users; }, {
|
|
31
|
-
onDelete:
|
|
32
|
-
onUpdate:
|
|
31
|
+
onDelete: "CASCADE",
|
|
32
|
+
onUpdate: "NO ACTION",
|
|
33
33
|
}),
|
|
34
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
34
|
+
(0, typeorm_1.JoinColumn)({ name: "company" }),
|
|
35
35
|
__metadata("design:type", Company_1.Company)
|
|
36
36
|
], DiscountCodeUser.prototype, "company", void 0);
|
|
37
37
|
__decorate([
|
|
38
38
|
(0, typeorm_1.ManyToOne)(function () { return __1.Local; }, function (local) { return local.discount_code_locals; }, {
|
|
39
|
-
onDelete:
|
|
40
|
-
onUpdate:
|
|
39
|
+
onDelete: "CASCADE",
|
|
40
|
+
onUpdate: "NO ACTION",
|
|
41
41
|
nullable: true,
|
|
42
42
|
}),
|
|
43
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
44
|
-
__metadata("design:type",
|
|
43
|
+
(0, typeorm_1.JoinColumn)({ name: "local" }),
|
|
44
|
+
__metadata("design:type", Object)
|
|
45
45
|
], DiscountCodeUser.prototype, "local", void 0);
|
|
46
46
|
__decorate([
|
|
47
|
-
(0, typeorm_1.Column)({ length: 10, comment:
|
|
47
|
+
(0, typeorm_1.Column)({ length: 10, comment: "Código del descuento para compartirlo." }),
|
|
48
48
|
__metadata("design:type", String)
|
|
49
49
|
], DiscountCodeUser.prototype, "code", void 0);
|
|
50
50
|
__decorate([
|
|
51
|
-
(0, typeorm_1.Column)({ length: 10, comment:
|
|
51
|
+
(0, typeorm_1.Column)({ length: 10, comment: "Descuento que se aplica." }),
|
|
52
52
|
__metadata("design:type", String)
|
|
53
53
|
], DiscountCodeUser.prototype, "discount", void 0);
|
|
54
54
|
__decorate([
|
|
55
55
|
(0, typeorm_1.Column)({
|
|
56
|
-
comment:
|
|
56
|
+
comment: "Campo para el tipo de descuento: \r\n1. Porcentaje.\r\n2. Valor en moneda.",
|
|
57
57
|
}),
|
|
58
58
|
__metadata("design:type", Number)
|
|
59
59
|
], DiscountCodeUser.prototype, "type", void 0);
|
|
60
60
|
__decorate([
|
|
61
61
|
(0, typeorm_1.Column)({
|
|
62
62
|
default: 1,
|
|
63
|
-
comment:
|
|
63
|
+
comment: "Con esto validamos si la empresa puede usar el código una vez o varias veces:\r\n1. Una sola vez.\r\n0. Más de una vez.\r\n\r\nCon esto validamos sí tenemos que ir a buscar a la tabla code_redemption_history_user",
|
|
64
64
|
}),
|
|
65
65
|
__metadata("design:type", Number)
|
|
66
66
|
], DiscountCodeUser.prototype, "single_use", void 0);
|
|
67
67
|
__decorate([
|
|
68
68
|
(0, typeorm_1.Column)({
|
|
69
69
|
nullable: true,
|
|
70
|
-
comment:
|
|
70
|
+
comment: "Validamos sí el descuento se aplica para una cantidad límite de usuarios. Entonces, no debería tener en cuenta la fecha de expiración o, si quiero agregar las 2 condicionales.",
|
|
71
71
|
}),
|
|
72
|
-
__metadata("design:type",
|
|
72
|
+
__metadata("design:type", Object)
|
|
73
73
|
], DiscountCodeUser.prototype, "use_limit", void 0);
|
|
74
74
|
__decorate([
|
|
75
75
|
(0, typeorm_1.Column)({
|
|
76
|
-
type:
|
|
76
|
+
type: "datetime",
|
|
77
77
|
transformer: new dateTransformer_1.DateTransformer(),
|
|
78
|
-
comment:
|
|
78
|
+
comment: "Fecha de creación del registro.",
|
|
79
79
|
}),
|
|
80
80
|
__metadata("design:type", Date)
|
|
81
81
|
], DiscountCodeUser.prototype, "created", void 0);
|
|
82
82
|
__decorate([
|
|
83
83
|
(0, typeorm_1.Column)({
|
|
84
|
-
|
|
84
|
+
type: "date",
|
|
85
|
+
comment: "Fecha inicial del descuento.",
|
|
85
86
|
}),
|
|
86
|
-
__metadata("design:type",
|
|
87
|
+
__metadata("design:type", Date)
|
|
87
88
|
], DiscountCodeUser.prototype, "start", void 0);
|
|
88
89
|
__decorate([
|
|
89
90
|
(0, typeorm_1.Column)({
|
|
91
|
+
type: "date",
|
|
90
92
|
nullable: true,
|
|
91
|
-
comment:
|
|
93
|
+
comment: "Fecha de expiración del registro.",
|
|
92
94
|
}),
|
|
93
|
-
__metadata("design:type",
|
|
95
|
+
__metadata("design:type", Object)
|
|
94
96
|
], DiscountCodeUser.prototype, "expiration", void 0);
|
|
95
97
|
__decorate([
|
|
96
98
|
(0, typeorm_1.Column)({
|
|
97
|
-
type:
|
|
99
|
+
type: "text",
|
|
98
100
|
transformer: jsonTransformer_1.jsonTransformer,
|
|
99
101
|
nullable: true,
|
|
100
|
-
comment:
|
|
102
|
+
comment: "Columna de tipos JSON para agregar en un arreglo los días que se pueden repetir el descuento.",
|
|
101
103
|
}),
|
|
102
104
|
__metadata("design:type", Object)
|
|
103
105
|
], DiscountCodeUser.prototype, "repeat_days", void 0);
|
|
104
106
|
__decorate([
|
|
105
107
|
(0, typeorm_1.ManyToOne)(function () { return Partner_1.Partner; }, function (partner) { return partner.discount_code_partners; }, {
|
|
106
|
-
onDelete:
|
|
107
|
-
onUpdate:
|
|
108
|
+
onDelete: "CASCADE",
|
|
109
|
+
onUpdate: "NO ACTION",
|
|
108
110
|
}),
|
|
109
|
-
(0, typeorm_1.JoinColumn)({ name:
|
|
111
|
+
(0, typeorm_1.JoinColumn)({ name: "updated_by" }),
|
|
110
112
|
__metadata("design:type", Partner_1.Partner)
|
|
111
113
|
], DiscountCodeUser.prototype, "updated_by", void 0);
|
|
112
114
|
__decorate([
|
|
113
115
|
(0, typeorm_1.Column)({
|
|
114
|
-
type:
|
|
116
|
+
type: "datetime",
|
|
115
117
|
transformer: new dateTransformer_1.DateTransformer(),
|
|
116
|
-
comment:
|
|
118
|
+
comment: "Fecha de actualización.",
|
|
117
119
|
}),
|
|
118
120
|
__metadata("design:type", Date)
|
|
119
121
|
], DiscountCodeUser.prototype, "updated", void 0);
|
|
120
122
|
__decorate([
|
|
121
123
|
(0, typeorm_1.Column)({
|
|
122
124
|
default: 1,
|
|
123
|
-
comment:
|
|
125
|
+
comment: "Estado del registro, es decir: \n 1. Activo: Es visible en la plataforma. \n 0. Inactivo: No será visible en la plataforma.",
|
|
124
126
|
}),
|
|
125
127
|
__metadata("design:type", Number)
|
|
126
128
|
], DiscountCodeUser.prototype, "status", void 0);
|
|
@@ -129,8 +131,8 @@ var DiscountCodeUser = /** @class */ (function () {
|
|
|
129
131
|
__metadata("design:type", Array)
|
|
130
132
|
], DiscountCodeUser.prototype, "code_redemptions_history_users", void 0);
|
|
131
133
|
DiscountCodeUser = __decorate([
|
|
132
|
-
(0, typeorm_1.Entity)(
|
|
133
|
-
comment:
|
|
134
|
+
(0, typeorm_1.Entity)("discount_code_user", {
|
|
135
|
+
comment: "Códigos de descuento para los usuarios.",
|
|
134
136
|
})
|
|
135
137
|
], DiscountCodeUser);
|
|
136
138
|
return DiscountCodeUser;
|
package/dist/entities/Local.d.ts
CHANGED
|
@@ -16,13 +16,13 @@ export declare class Local {
|
|
|
16
16
|
address: string;
|
|
17
17
|
latitude: number;
|
|
18
18
|
longitude: number;
|
|
19
|
-
details: any;
|
|
19
|
+
details: any | null;
|
|
20
20
|
created: Date;
|
|
21
21
|
updated: Date;
|
|
22
22
|
updated_by: Partner;
|
|
23
23
|
square: Square;
|
|
24
24
|
pos_system: PosSystem;
|
|
25
|
-
pos_system_settings: string;
|
|
25
|
+
pos_system_settings: string | null;
|
|
26
26
|
status: number;
|
|
27
27
|
visible: number;
|
|
28
28
|
locals_partners: Partner[];
|
package/dist/entities/Local.js
CHANGED
|
@@ -112,7 +112,7 @@ var Local = /** @class */ (function () {
|
|
|
112
112
|
transformer: jsonTransformer_1.jsonTransformer,
|
|
113
113
|
comment: "Campo de tipo JSON por si es necesario agregar información adicional",
|
|
114
114
|
}),
|
|
115
|
-
__metadata("design:type",
|
|
115
|
+
__metadata("design:type", Object)
|
|
116
116
|
], Local.prototype, "pos_system_settings", void 0);
|
|
117
117
|
__decorate([
|
|
118
118
|
(0, typeorm_1.Column)({
|