test-entity-library-asm 2.9.9 → 3.0.0
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/Category.d.ts +3 -1
- package/dist/entities/Category.js +8 -0
- package/dist/entities/CategoryDate.d.ts +8 -0
- package/dist/entities/CategoryDate.js +54 -0
- package/dist/entities/CategorySchedule.d.ts +2 -2
- package/dist/entities/CategorySchedule.js +15 -9
- package/dist/entities/Day.d.ts +3 -0
- package/dist/entities/Day.js +12 -3
- package/dist/entities/Product.d.ts +3 -1
- package/dist/entities/Product.js +8 -0
- package/dist/entities/ProductDate.d.ts +8 -0
- package/dist/entities/ProductDate.js +54 -0
- package/dist/entities/ProductSchedule.d.ts +9 -0
- package/dist/entities/ProductSchedule.js +56 -0
- package/dist/entities.views.routes.d.ts +3 -0
- package/dist/entities.views.routes.js +8 -2
- package/package.json +1 -1
- package/src/entities/Category.ts +10 -1
- package/src/entities/CategoryDate.ts +37 -0
- package/src/entities/CategorySchedule.ts +24 -18
- package/src/entities/Day.ts +14 -7
- package/src/entities/Product.ts +10 -1
- package/src/entities/ProductDate.ts +38 -0
- package/src/entities/ProductSchedule.ts +39 -0
- package/src/entities.views.routes.ts +3 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Local } from "./Local";
|
|
2
2
|
import { Product } from "./Product";
|
|
3
|
-
import { Partner } from "..";
|
|
3
|
+
import { CategoryDate, Partner, ScheduleCategory } from "..";
|
|
4
4
|
export declare class Category {
|
|
5
5
|
id: number;
|
|
6
6
|
local: Local;
|
|
@@ -14,4 +14,6 @@ export declare class Category {
|
|
|
14
14
|
status: number;
|
|
15
15
|
review_comment: string;
|
|
16
16
|
products: Product[];
|
|
17
|
+
category_schedules: ScheduleCategory[];
|
|
18
|
+
category_dates: CategoryDate[];
|
|
17
19
|
}
|
|
@@ -90,6 +90,14 @@ var Category = /** @class */ (function () {
|
|
|
90
90
|
(0, typeorm_1.OneToMany)(function () { return Product_1.Product; }, function (product) { return product.category; }),
|
|
91
91
|
__metadata("design:type", Array)
|
|
92
92
|
], Category.prototype, "products", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, typeorm_1.OneToMany)(function () { return __1.ScheduleCategory; }, function (scheduleCategory) { return scheduleCategory.category; }),
|
|
95
|
+
__metadata("design:type", Array)
|
|
96
|
+
], Category.prototype, "category_schedules", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, typeorm_1.OneToMany)(function () { return __1.CategoryDate; }, function (categoryDate) { return categoryDate.category; }),
|
|
99
|
+
__metadata("design:type", Array)
|
|
100
|
+
], Category.prototype, "category_dates", void 0);
|
|
93
101
|
Category = __decorate([
|
|
94
102
|
(0, typeorm_1.Entity)({
|
|
95
103
|
comment: "Lista de categorías que tiene un local en su menú: promos, de la semana, completo...\r\n\r\nEsas categorías será visibles a nivel app como un menu horizontal donde cada categoría tendrá sus productos.",
|
|
@@ -0,0 +1,54 @@
|
|
|
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.CategoryDate = void 0;
|
|
13
|
+
var typeorm_1 = require("typeorm");
|
|
14
|
+
var Category_1 = require("./Category");
|
|
15
|
+
var CategoryDate = /** @class */ (function () {
|
|
16
|
+
function CategoryDate() {
|
|
17
|
+
}
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
20
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
21
|
+
}),
|
|
22
|
+
__metadata("design:type", Number)
|
|
23
|
+
], CategoryDate.prototype, "id", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.ManyToOne)(function () { return Category_1.Category; }, function (category) { return category.category_dates; }, {
|
|
26
|
+
onDelete: "CASCADE",
|
|
27
|
+
onUpdate: "NO ACTION",
|
|
28
|
+
}),
|
|
29
|
+
(0, typeorm_1.JoinColumn)({ name: "category" }),
|
|
30
|
+
__metadata("design:type", Category_1.Category)
|
|
31
|
+
], CategoryDate.prototype, "category", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({
|
|
34
|
+
type: "date",
|
|
35
|
+
comment: "Fecha en la que va a estar disponible la categoría.",
|
|
36
|
+
}),
|
|
37
|
+
__metadata("design:type", Date)
|
|
38
|
+
], CategoryDate.prototype, "date", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ comment: "Hora de inicio." }),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], CategoryDate.prototype, "start_time", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ comment: "Hora de finalización." }),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], CategoryDate.prototype, "end_time", void 0);
|
|
47
|
+
CategoryDate = __decorate([
|
|
48
|
+
(0, typeorm_1.Entity)("category_date", {
|
|
49
|
+
comment: "Fechas específicas donde se pueden agregar horarios.",
|
|
50
|
+
})
|
|
51
|
+
], CategoryDate);
|
|
52
|
+
return CategoryDate;
|
|
53
|
+
}());
|
|
54
|
+
exports.CategoryDate = CategoryDate;
|
|
@@ -18,31 +18,37 @@ var ScheduleCategory = /** @class */ (function () {
|
|
|
18
18
|
}
|
|
19
19
|
__decorate([
|
|
20
20
|
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
21
|
-
comment:
|
|
21
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
22
22
|
}),
|
|
23
23
|
__metadata("design:type", Number)
|
|
24
24
|
], ScheduleCategory.prototype, "id", void 0);
|
|
25
25
|
__decorate([
|
|
26
|
-
(0, typeorm_1.ManyToOne)(function () { return Category_1.Category; },
|
|
27
|
-
|
|
26
|
+
(0, typeorm_1.ManyToOne)(function () { return Category_1.Category; }, function (category) { return category.category_schedules; }, {
|
|
27
|
+
onDelete: "CASCADE",
|
|
28
|
+
onUpdate: "NO ACTION",
|
|
29
|
+
}),
|
|
30
|
+
(0, typeorm_1.JoinColumn)({ name: "category" }),
|
|
28
31
|
__metadata("design:type", Category_1.Category)
|
|
29
32
|
], ScheduleCategory.prototype, "category", void 0);
|
|
30
33
|
__decorate([
|
|
31
|
-
(0, typeorm_1.ManyToOne)(function () { return Day_1.Day; },
|
|
32
|
-
|
|
34
|
+
(0, typeorm_1.ManyToOne)(function () { return Day_1.Day; }, function (day) { return day.category_schedules_day; }, {
|
|
35
|
+
onDelete: "RESTRICT",
|
|
36
|
+
onUpdate: "NO ACTION",
|
|
37
|
+
}),
|
|
38
|
+
(0, typeorm_1.JoinColumn)({ name: "day" }),
|
|
33
39
|
__metadata("design:type", Day_1.Day)
|
|
34
40
|
], ScheduleCategory.prototype, "day", void 0);
|
|
35
41
|
__decorate([
|
|
36
|
-
(0, typeorm_1.Column)({ comment:
|
|
42
|
+
(0, typeorm_1.Column)({ comment: "Hora de inicio." }),
|
|
37
43
|
__metadata("design:type", String)
|
|
38
44
|
], ScheduleCategory.prototype, "start_time", void 0);
|
|
39
45
|
__decorate([
|
|
40
|
-
(0, typeorm_1.Column)({ comment:
|
|
46
|
+
(0, typeorm_1.Column)({ comment: "Hora de finalización." }),
|
|
41
47
|
__metadata("design:type", String)
|
|
42
48
|
], ScheduleCategory.prototype, "end_time", void 0);
|
|
43
49
|
ScheduleCategory = __decorate([
|
|
44
|
-
(0, typeorm_1.Entity)(
|
|
45
|
-
comment:
|
|
50
|
+
(0, typeorm_1.Entity)("category_schedule", {
|
|
51
|
+
comment: "Horarios en que se puede ver una categoría, si se desea que una categoría esté los lunes de 7 am a 5 pm se puede hacer.",
|
|
46
52
|
})
|
|
47
53
|
], ScheduleCategory);
|
|
48
54
|
return ScheduleCategory;
|
package/dist/entities/Day.d.ts
CHANGED
package/dist/entities/Day.js
CHANGED
|
@@ -11,12 +11,13 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Day = void 0;
|
|
13
13
|
var typeorm_1 = require("typeorm");
|
|
14
|
+
var __1 = require("..");
|
|
14
15
|
var Day = /** @class */ (function () {
|
|
15
16
|
function Day() {
|
|
16
17
|
}
|
|
17
18
|
__decorate([
|
|
18
19
|
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
19
|
-
comment:
|
|
20
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
20
21
|
}),
|
|
21
22
|
__metadata("design:type", Number)
|
|
22
23
|
], Day.prototype, "id", void 0);
|
|
@@ -30,12 +31,20 @@ var Day = /** @class */ (function () {
|
|
|
30
31
|
__decorate([
|
|
31
32
|
(0, typeorm_1.Column)({
|
|
32
33
|
default: 1,
|
|
33
|
-
comment:
|
|
34
|
+
comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
|
34
35
|
}),
|
|
35
36
|
__metadata("design:type", Number)
|
|
36
37
|
], Day.prototype, "status", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.OneToMany)(function () { return __1.ScheduleCategory; }, function (scheduleCategory) { return scheduleCategory.day; }),
|
|
40
|
+
__metadata("design:type", Array)
|
|
41
|
+
], Day.prototype, "category_schedules_day", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.OneToMany)(function () { return __1.ProductSchedule; }, function (productSchedule) { return productSchedule.day; }),
|
|
44
|
+
__metadata("design:type", Array)
|
|
45
|
+
], Day.prototype, "product_schedules_day", void 0);
|
|
37
46
|
Day = __decorate([
|
|
38
|
-
(0, typeorm_1.Entity)({ comment:
|
|
47
|
+
(0, typeorm_1.Entity)({ comment: "Días de la semana." })
|
|
39
48
|
], Day);
|
|
40
49
|
return Day;
|
|
41
50
|
}());
|
|
@@ -3,7 +3,7 @@ import { ProductGroup } from "./ProductGroup";
|
|
|
3
3
|
import { ProductIngredient } from "./ProductIngredient";
|
|
4
4
|
import { RequestProduct } from "./RequestProduct";
|
|
5
5
|
import { User } from "./User";
|
|
6
|
-
import { Partner } from "..";
|
|
6
|
+
import { Partner, ProductDate, ProductSchedule } from "..";
|
|
7
7
|
export declare class Product {
|
|
8
8
|
id: number;
|
|
9
9
|
category: Category;
|
|
@@ -26,4 +26,6 @@ export declare class Product {
|
|
|
26
26
|
product_ingredients: ProductIngredient[];
|
|
27
27
|
request_products: RequestProduct[];
|
|
28
28
|
users_favorite_product: User[];
|
|
29
|
+
product_schedules: ProductSchedule[];
|
|
30
|
+
product_dates: ProductDate[];
|
|
29
31
|
}
|
package/dist/entities/Product.js
CHANGED
|
@@ -149,6 +149,14 @@ var Product = /** @class */ (function () {
|
|
|
149
149
|
}),
|
|
150
150
|
__metadata("design:type", Array)
|
|
151
151
|
], Product.prototype, "users_favorite_product", void 0);
|
|
152
|
+
__decorate([
|
|
153
|
+
(0, typeorm_1.OneToMany)(function () { return __1.ProductSchedule; }, function (productSchedule) { return productSchedule.product; }),
|
|
154
|
+
__metadata("design:type", Array)
|
|
155
|
+
], Product.prototype, "product_schedules", void 0);
|
|
156
|
+
__decorate([
|
|
157
|
+
(0, typeorm_1.OneToMany)(function () { return __1.ProductDate; }, function (productDate) { return productDate.product; }),
|
|
158
|
+
__metadata("design:type", Array)
|
|
159
|
+
], Product.prototype, "product_dates", void 0);
|
|
152
160
|
Product = __decorate([
|
|
153
161
|
(0, typeorm_1.Entity)({
|
|
154
162
|
comment: "Productos qué serán visibles a los usuarios, estos están asociados a un local.",
|
|
@@ -0,0 +1,54 @@
|
|
|
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.ProductDate = void 0;
|
|
13
|
+
var typeorm_1 = require("typeorm");
|
|
14
|
+
var __1 = require("..");
|
|
15
|
+
var ProductDate = /** @class */ (function () {
|
|
16
|
+
function ProductDate() {
|
|
17
|
+
}
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
20
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
21
|
+
}),
|
|
22
|
+
__metadata("design:type", Number)
|
|
23
|
+
], ProductDate.prototype, "id", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.ManyToOne)(function () { return __1.Product; }, function (product) { return product.product_dates; }, {
|
|
26
|
+
onDelete: "CASCADE",
|
|
27
|
+
onUpdate: "NO ACTION",
|
|
28
|
+
}),
|
|
29
|
+
(0, typeorm_1.JoinColumn)({ name: "product" }),
|
|
30
|
+
__metadata("design:type", __1.Product)
|
|
31
|
+
], ProductDate.prototype, "product", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({
|
|
34
|
+
type: "date",
|
|
35
|
+
comment: "Fecha en la que va a estar disponible el producto.",
|
|
36
|
+
}),
|
|
37
|
+
__metadata("design:type", Date)
|
|
38
|
+
], ProductDate.prototype, "date", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ comment: "Hora de inicio." }),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], ProductDate.prototype, "start_time", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ comment: "Hora de finalización." }),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], ProductDate.prototype, "end_time", void 0);
|
|
47
|
+
ProductDate = __decorate([
|
|
48
|
+
(0, typeorm_1.Entity)("product_date", {
|
|
49
|
+
comment: "Fechas específicas donde se pueden agregar horarios",
|
|
50
|
+
})
|
|
51
|
+
], ProductDate);
|
|
52
|
+
return ProductDate;
|
|
53
|
+
}());
|
|
54
|
+
exports.ProductDate = ProductDate;
|
|
@@ -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.ProductSchedule = void 0;
|
|
13
|
+
var typeorm_1 = require("typeorm");
|
|
14
|
+
var __1 = require("..");
|
|
15
|
+
var Day_1 = require("./Day");
|
|
16
|
+
var ProductSchedule = /** @class */ (function () {
|
|
17
|
+
function ProductSchedule() {
|
|
18
|
+
}
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
21
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
22
|
+
}),
|
|
23
|
+
__metadata("design:type", Number)
|
|
24
|
+
], ProductSchedule.prototype, "id", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.ManyToOne)(function () { return __1.Product; }, function (product) { return product.product_schedules; }, {
|
|
27
|
+
onDelete: "CASCADE",
|
|
28
|
+
onUpdate: "NO ACTION",
|
|
29
|
+
}),
|
|
30
|
+
(0, typeorm_1.JoinColumn)({ name: "product" }),
|
|
31
|
+
__metadata("design:type", __1.Product)
|
|
32
|
+
], ProductSchedule.prototype, "product", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.ManyToOne)(function () { return Day_1.Day; }, function (day) { return day.product_schedules_day; }, {
|
|
35
|
+
onDelete: "RESTRICT",
|
|
36
|
+
onUpdate: "NO ACTION",
|
|
37
|
+
}),
|
|
38
|
+
(0, typeorm_1.JoinColumn)({ name: "day" }),
|
|
39
|
+
__metadata("design:type", Day_1.Day)
|
|
40
|
+
], ProductSchedule.prototype, "day", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ comment: "Hora de inicio." }),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], ProductSchedule.prototype, "start_time", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({ comment: "Hora de finalización." }),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], ProductSchedule.prototype, "end_time", void 0);
|
|
49
|
+
ProductSchedule = __decorate([
|
|
50
|
+
(0, typeorm_1.Entity)("product_schedule", {
|
|
51
|
+
comment: "Horarios en que se puede ver una producto.",
|
|
52
|
+
})
|
|
53
|
+
], ProductSchedule);
|
|
54
|
+
return ProductSchedule;
|
|
55
|
+
}());
|
|
56
|
+
exports.ProductSchedule = ProductSchedule;
|
|
@@ -47,6 +47,9 @@ export { PartnerPermissionSection } from "./entities/PartnerPermissionSection";
|
|
|
47
47
|
export { PartnerPlatform } from "./entities/PartnerPlatform";
|
|
48
48
|
export { ServicePlan } from "./entities/ServicePlan";
|
|
49
49
|
export { Bank } from "./entities/Bank";
|
|
50
|
+
export { CategoryDate } from "./entities/CategoryDate";
|
|
51
|
+
export { ProductSchedule } from "./entities/ProductSchedule";
|
|
52
|
+
export { ProductDate } from "./entities/ProductDate";
|
|
50
53
|
export { LocalsCompany } from "./views/LocalsCompany";
|
|
51
54
|
export { VerifyLocals } from "./views/VerifyLocals";
|
|
52
55
|
export { MasterNotifications } from "./views/MasterNotifications";
|
|
@@ -14,8 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
18
|
-
exports.CustomRepository = exports.PartnerNotifications = exports.DiscountsCodeUser = exports.Partners = exports.ViewLocalsCompanies = exports.MasterNotifications = exports.VerifyLocals = void 0;
|
|
17
|
+
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.TerminalSession = exports.Terminal = exports.Square = exports.RequestStatus = 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.PartnerNotifications = exports.DiscountsCodeUser = exports.Partners = exports.ViewLocalsCompanies = exports.MasterNotifications = exports.VerifyLocals = exports.LocalsCompany = exports.ProductDate = exports.ProductSchedule = 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");
|
|
@@ -114,6 +114,12 @@ var ServicePlan_1 = require("./entities/ServicePlan");
|
|
|
114
114
|
Object.defineProperty(exports, "ServicePlan", { enumerable: true, get: function () { return ServicePlan_1.ServicePlan; } });
|
|
115
115
|
var Bank_1 = require("./entities/Bank");
|
|
116
116
|
Object.defineProperty(exports, "Bank", { enumerable: true, get: function () { return Bank_1.Bank; } });
|
|
117
|
+
var CategoryDate_1 = require("./entities/CategoryDate");
|
|
118
|
+
Object.defineProperty(exports, "CategoryDate", { enumerable: true, get: function () { return CategoryDate_1.CategoryDate; } });
|
|
119
|
+
var ProductSchedule_1 = require("./entities/ProductSchedule");
|
|
120
|
+
Object.defineProperty(exports, "ProductSchedule", { enumerable: true, get: function () { return ProductSchedule_1.ProductSchedule; } });
|
|
121
|
+
var ProductDate_1 = require("./entities/ProductDate");
|
|
122
|
+
Object.defineProperty(exports, "ProductDate", { enumerable: true, get: function () { return ProductDate_1.ProductDate; } });
|
|
117
123
|
var LocalsCompany_1 = require("./views/LocalsCompany");
|
|
118
124
|
Object.defineProperty(exports, "LocalsCompany", { enumerable: true, get: function () { return LocalsCompany_1.LocalsCompany; } });
|
|
119
125
|
var VerifyLocals_1 = require("./views/VerifyLocals");
|
package/package.json
CHANGED
package/src/entities/Category.ts
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "typeorm";
|
|
9
9
|
import { Local } from "./Local";
|
|
10
10
|
import { Product } from "./Product";
|
|
11
|
-
import { Partner } from "..";
|
|
11
|
+
import { CategoryDate, Partner, ScheduleCategory } from "..";
|
|
12
12
|
|
|
13
13
|
@Entity({
|
|
14
14
|
comment:
|
|
@@ -77,4 +77,13 @@ export class Category {
|
|
|
77
77
|
|
|
78
78
|
@OneToMany(() => Product, (product) => product.category)
|
|
79
79
|
products: Product[];
|
|
80
|
+
|
|
81
|
+
@OneToMany(
|
|
82
|
+
() => ScheduleCategory,
|
|
83
|
+
(scheduleCategory) => scheduleCategory.category
|
|
84
|
+
)
|
|
85
|
+
category_schedules: ScheduleCategory[];
|
|
86
|
+
|
|
87
|
+
@OneToMany(() => CategoryDate, (categoryDate) => categoryDate.category)
|
|
88
|
+
category_dates: CategoryDate[];
|
|
80
89
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Column,
|
|
3
|
+
Entity,
|
|
4
|
+
JoinColumn,
|
|
5
|
+
ManyToOne,
|
|
6
|
+
PrimaryGeneratedColumn,
|
|
7
|
+
} from "typeorm";
|
|
8
|
+
import { Category } from "./Category";
|
|
9
|
+
|
|
10
|
+
@Entity("category_date", {
|
|
11
|
+
comment: "Fechas específicas donde se pueden agregar horarios.",
|
|
12
|
+
})
|
|
13
|
+
export class CategoryDate {
|
|
14
|
+
@PrimaryGeneratedColumn({
|
|
15
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
16
|
+
})
|
|
17
|
+
id: number;
|
|
18
|
+
|
|
19
|
+
@ManyToOne(() => Category, (category) => category.category_dates, {
|
|
20
|
+
onDelete: "CASCADE",
|
|
21
|
+
onUpdate: "NO ACTION",
|
|
22
|
+
})
|
|
23
|
+
@JoinColumn({ name: "category" })
|
|
24
|
+
category: Category;
|
|
25
|
+
|
|
26
|
+
@Column({
|
|
27
|
+
type: "date",
|
|
28
|
+
comment: "Fecha en la que va a estar disponible la categoría.",
|
|
29
|
+
})
|
|
30
|
+
date: Date;
|
|
31
|
+
|
|
32
|
+
@Column({ comment: "Hora de inicio." })
|
|
33
|
+
start_time: string;
|
|
34
|
+
|
|
35
|
+
@Column({ comment: "Hora de finalización." })
|
|
36
|
+
end_time: string;
|
|
37
|
+
}
|
|
@@ -3,32 +3,38 @@ import {
|
|
|
3
3
|
Entity,
|
|
4
4
|
JoinColumn,
|
|
5
5
|
ManyToOne,
|
|
6
|
-
PrimaryGeneratedColumn
|
|
7
|
-
} from
|
|
8
|
-
import { Category } from
|
|
9
|
-
import { Day } from
|
|
6
|
+
PrimaryGeneratedColumn,
|
|
7
|
+
} from "typeorm";
|
|
8
|
+
import { Category } from "./Category";
|
|
9
|
+
import { Day } from "./Day";
|
|
10
10
|
|
|
11
|
-
@Entity(
|
|
11
|
+
@Entity("category_schedule", {
|
|
12
12
|
comment:
|
|
13
|
-
|
|
13
|
+
"Horarios en que se puede ver una categoría, si se desea que una categoría esté los lunes de 7 am a 5 pm se puede hacer.",
|
|
14
14
|
})
|
|
15
15
|
export class ScheduleCategory {
|
|
16
16
|
@PrimaryGeneratedColumn({
|
|
17
|
-
comment:
|
|
17
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
18
18
|
})
|
|
19
|
-
id: number
|
|
19
|
+
id: number;
|
|
20
20
|
|
|
21
|
-
@ManyToOne(() => Category,
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
@ManyToOne(() => Category, (category) => category.category_schedules, {
|
|
22
|
+
onDelete: "CASCADE",
|
|
23
|
+
onUpdate: "NO ACTION",
|
|
24
|
+
})
|
|
25
|
+
@JoinColumn({ name: "category" })
|
|
26
|
+
category: Category;
|
|
24
27
|
|
|
25
|
-
@ManyToOne(() => Day,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
@ManyToOne(() => Day, (day) => day.category_schedules_day, {
|
|
29
|
+
onDelete: "RESTRICT",
|
|
30
|
+
onUpdate: "NO ACTION",
|
|
31
|
+
})
|
|
32
|
+
@JoinColumn({ name: "day" })
|
|
33
|
+
day: Day;
|
|
28
34
|
|
|
29
|
-
@Column({ comment:
|
|
30
|
-
start_time: string
|
|
35
|
+
@Column({ comment: "Hora de inicio." })
|
|
36
|
+
start_time: string;
|
|
31
37
|
|
|
32
|
-
@Column({ comment:
|
|
33
|
-
end_time: string
|
|
38
|
+
@Column({ comment: "Hora de finalización." })
|
|
39
|
+
end_time: string;
|
|
34
40
|
}
|
package/src/entities/Day.ts
CHANGED
|
@@ -1,23 +1,30 @@
|
|
|
1
|
-
import { Column, Entity, PrimaryGeneratedColumn } from
|
|
1
|
+
import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from "typeorm";
|
|
2
|
+
import { CategoryDate, ProductSchedule, ScheduleCategory } from "..";
|
|
2
3
|
|
|
3
|
-
@Entity({ comment:
|
|
4
|
+
@Entity({ comment: "Días de la semana." })
|
|
4
5
|
export class Day {
|
|
5
6
|
@PrimaryGeneratedColumn({
|
|
6
|
-
comment:
|
|
7
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
7
8
|
})
|
|
8
|
-
id: number
|
|
9
|
+
id: number;
|
|
9
10
|
|
|
10
11
|
@Column({
|
|
11
12
|
length: 50,
|
|
12
13
|
comment:
|
|
13
14
|
'Nombre del día.\r\n\r\nID/KEY de la variable que se encuentra en los archivos "locale" para el multilenguaje.',
|
|
14
15
|
})
|
|
15
|
-
name: string
|
|
16
|
+
name: string;
|
|
16
17
|
|
|
17
18
|
@Column({
|
|
18
19
|
default: 1,
|
|
19
20
|
comment:
|
|
20
|
-
|
|
21
|
+
"Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
|
21
22
|
})
|
|
22
|
-
status: number
|
|
23
|
+
status: number;
|
|
24
|
+
|
|
25
|
+
@OneToMany(() => ScheduleCategory, (scheduleCategory) => scheduleCategory.day)
|
|
26
|
+
category_schedules_day: ScheduleCategory[];
|
|
27
|
+
|
|
28
|
+
@OneToMany(() => ProductSchedule, (productSchedule) => productSchedule.day)
|
|
29
|
+
product_schedules_day: ProductSchedule[];
|
|
23
30
|
}
|
package/src/entities/Product.ts
CHANGED
|
@@ -13,7 +13,7 @@ import { ProductGroup } from "./ProductGroup";
|
|
|
13
13
|
import { ProductIngredient } from "./ProductIngredient";
|
|
14
14
|
import { RequestProduct } from "./RequestProduct";
|
|
15
15
|
import { User } from "./User";
|
|
16
|
-
import { Partner } from "..";
|
|
16
|
+
import { Partner, ProductDate, ProductSchedule } from "..";
|
|
17
17
|
|
|
18
18
|
@Entity({
|
|
19
19
|
comment:
|
|
@@ -134,4 +134,13 @@ export class Product {
|
|
|
134
134
|
name: "user_favorite_product",
|
|
135
135
|
})
|
|
136
136
|
users_favorite_product: User[];
|
|
137
|
+
|
|
138
|
+
@OneToMany(
|
|
139
|
+
() => ProductSchedule,
|
|
140
|
+
(productSchedule) => productSchedule.product
|
|
141
|
+
)
|
|
142
|
+
product_schedules: ProductSchedule[];
|
|
143
|
+
|
|
144
|
+
@OneToMany(() => ProductDate, (productDate) => productDate.product)
|
|
145
|
+
product_dates: ProductDate[];
|
|
137
146
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Column,
|
|
3
|
+
Entity,
|
|
4
|
+
JoinColumn,
|
|
5
|
+
ManyToOne,
|
|
6
|
+
PrimaryGeneratedColumn,
|
|
7
|
+
} from "typeorm";
|
|
8
|
+
import { Category } from "./Category";
|
|
9
|
+
import { Product } from "..";
|
|
10
|
+
|
|
11
|
+
@Entity("product_date", {
|
|
12
|
+
comment: "Fechas específicas donde se pueden agregar horarios",
|
|
13
|
+
})
|
|
14
|
+
export class ProductDate {
|
|
15
|
+
@PrimaryGeneratedColumn({
|
|
16
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
17
|
+
})
|
|
18
|
+
id: number;
|
|
19
|
+
|
|
20
|
+
@ManyToOne(() => Product, (product) => product.product_dates, {
|
|
21
|
+
onDelete: "CASCADE",
|
|
22
|
+
onUpdate: "NO ACTION",
|
|
23
|
+
})
|
|
24
|
+
@JoinColumn({ name: "product" })
|
|
25
|
+
product: Product;
|
|
26
|
+
|
|
27
|
+
@Column({
|
|
28
|
+
type: "date",
|
|
29
|
+
comment: "Fecha en la que va a estar disponible el producto.",
|
|
30
|
+
})
|
|
31
|
+
date: Date;
|
|
32
|
+
|
|
33
|
+
@Column({ comment: "Hora de inicio." })
|
|
34
|
+
start_time: string;
|
|
35
|
+
|
|
36
|
+
@Column({ comment: "Hora de finalización." })
|
|
37
|
+
end_time: string;
|
|
38
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Column,
|
|
3
|
+
Entity,
|
|
4
|
+
JoinColumn,
|
|
5
|
+
ManyToOne,
|
|
6
|
+
PrimaryGeneratedColumn,
|
|
7
|
+
} from "typeorm";
|
|
8
|
+
import { Product } from "..";
|
|
9
|
+
import { Day } from "./Day";
|
|
10
|
+
|
|
11
|
+
@Entity("product_schedule", {
|
|
12
|
+
comment: "Horarios en que se puede ver una producto.",
|
|
13
|
+
})
|
|
14
|
+
export class ProductSchedule {
|
|
15
|
+
@PrimaryGeneratedColumn({
|
|
16
|
+
comment: "Número de identificación (ID) único de cada registro.",
|
|
17
|
+
})
|
|
18
|
+
id: number;
|
|
19
|
+
|
|
20
|
+
@ManyToOne(() => Product, (product) => product.product_schedules, {
|
|
21
|
+
onDelete: "CASCADE",
|
|
22
|
+
onUpdate: "NO ACTION",
|
|
23
|
+
})
|
|
24
|
+
@JoinColumn({ name: "product" })
|
|
25
|
+
product: Product;
|
|
26
|
+
|
|
27
|
+
@ManyToOne(() => Day, (day) => day.product_schedules_day, {
|
|
28
|
+
onDelete: "RESTRICT",
|
|
29
|
+
onUpdate: "NO ACTION",
|
|
30
|
+
})
|
|
31
|
+
@JoinColumn({ name: "day" })
|
|
32
|
+
day: Day;
|
|
33
|
+
|
|
34
|
+
@Column({ comment: "Hora de inicio." })
|
|
35
|
+
start_time: string;
|
|
36
|
+
|
|
37
|
+
@Column({ comment: "Hora de finalización." })
|
|
38
|
+
end_time: string;
|
|
39
|
+
}
|
|
@@ -47,6 +47,9 @@ export { PartnerPermissionSection } from "./entities/PartnerPermissionSection";
|
|
|
47
47
|
export { PartnerPlatform } from "./entities/PartnerPlatform";
|
|
48
48
|
export { ServicePlan } from "./entities/ServicePlan";
|
|
49
49
|
export { Bank } from "./entities/Bank";
|
|
50
|
+
export { CategoryDate } from "./entities/CategoryDate";
|
|
51
|
+
export { ProductSchedule } from "./entities/ProductSchedule";
|
|
52
|
+
export { ProductDate } from "./entities/ProductDate";
|
|
50
53
|
|
|
51
54
|
export { LocalsCompany } from "./views/LocalsCompany";
|
|
52
55
|
export { VerifyLocals } from "./views/VerifyLocals";
|