test-entity-library-asm 1.1.0 → 1.1.2
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 +8 -0
- package/dist/entities/Category.js +44 -0
- package/dist/entities/City.d.ts +13 -0
- package/dist/entities/City.js +55 -0
- package/dist/entities/CodeRedemptionHistoryCompany.d.ts +9 -0
- package/dist/entities/CodeRedemptionHistoryCompany.js +46 -0
- package/dist/entities/CodeRedemptionHistoryUser.d.ts +9 -0
- package/dist/entities/CodeRedemptionHistoryUser.js +46 -0
- package/dist/entities/Company.d.ts +29 -0
- package/dist/entities/Company.js +132 -0
- package/dist/entities/Configuration.d.ts +4 -0
- package/dist/entities/Configuration.js +33 -0
- package/dist/entities/Country.d.ts +12 -0
- package/dist/entities/Country.js +68 -0
- package/dist/entities/Day.d.ts +5 -0
- package/dist/entities/Day.js +34 -0
- package/dist/entities/DiscountCodeCompany.d.ts +15 -0
- package/dist/entities/DiscountCodeCompany.js +77 -0
- package/dist/entities/DiscountCodeUser.d.ts +17 -0
- package/dist/entities/DiscountCodeUser.js +82 -0
- package/dist/entities/Local.d.ts +21 -0
- package/dist/entities/Local.js +108 -0
- package/dist/entities/Master.d.ts +6 -0
- package/dist/entities/Master.js +36 -0
- package/dist/entities/Permission.d.ts +9 -0
- package/dist/entities/Permission.js +56 -0
- package/dist/entities/Plan.d.ts +14 -0
- package/dist/entities/Plan.js +75 -0
- package/dist/entities/Product.d.ts +17 -0
- package/dist/entities/Product.js +87 -0
- package/dist/entities/ProductGroup.d.ts +14 -0
- package/dist/entities/ProductGroup.js +74 -0
- package/dist/entities/ProductTopping.d.ts +9 -0
- package/dist/entities/ProductTopping.js +50 -0
- package/dist/entities/Region.d.ts +9 -0
- package/dist/entities/Region.js +45 -0
- package/dist/entities/Role.d.ts +12 -0
- package/dist/entities/Role.js +74 -0
- package/dist/entities/RoleVisibleTo.d.ts +6 -0
- package/dist/entities/RoleVisibleTo.js +39 -0
- package/dist/entities/ScheduleCategory.d.ts +9 -0
- package/dist/entities/ScheduleCategory.js +48 -0
- package/dist/entities/Terminal.d.ts +10 -0
- package/dist/entities/Terminal.js +63 -0
- package/dist/entities/TerminalSession.d.ts +10 -0
- package/dist/entities/TerminalSession.js +55 -0
- package/dist/entities/TypeFood.d.ts +7 -0
- package/dist/entities/TypeFood.js +42 -0
- package/dist/entities/User.d.ts +38 -0
- package/dist/entities/User.js +147 -0
- package/dist/entities/productGroupComplement.d.ts +8 -0
- package/dist/entities/productGroupComplement.js +46 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +30 -0
- package/dist/interfaces.d.ts +16 -0
- package/dist/interfaces.js +2 -0
- package/package.json +1 -1
- package/src/index.ts +4 -1
- package/src/interfaces.ts +1 -1
|
@@ -0,0 +1,44 @@
|
|
|
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.Category = void 0;
|
|
13
|
+
var typeorm_1 = require("typeorm");
|
|
14
|
+
var Local_1 = require("./Local");
|
|
15
|
+
var Category = /** @class */ (function () {
|
|
16
|
+
function Category() {
|
|
17
|
+
}
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
20
|
+
__metadata("design:type", Number)
|
|
21
|
+
], Category.prototype, "id", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.Column)(),
|
|
24
|
+
__metadata("design:type", Number)
|
|
25
|
+
], Category.prototype, "localId", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)({ length: 30 }),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], Category.prototype, "name", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)(),
|
|
32
|
+
__metadata("design:type", Number)
|
|
33
|
+
], Category.prototype, "position", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.ManyToOne)(function () { return Local_1.Local; }),
|
|
36
|
+
(0, typeorm_1.JoinColumn)({ name: 'localId' }),
|
|
37
|
+
__metadata("design:type", Local_1.Local)
|
|
38
|
+
], Category.prototype, "local", void 0);
|
|
39
|
+
Category = __decorate([
|
|
40
|
+
(0, typeorm_1.Entity)()
|
|
41
|
+
], Category);
|
|
42
|
+
return Category;
|
|
43
|
+
}());
|
|
44
|
+
exports.Category = Category;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Region } from './Region';
|
|
2
|
+
import { User } from './User';
|
|
3
|
+
import { Company } from './Company';
|
|
4
|
+
import { Local } from './Local';
|
|
5
|
+
export declare class City {
|
|
6
|
+
id: number;
|
|
7
|
+
name: string;
|
|
8
|
+
region: Region;
|
|
9
|
+
status: number;
|
|
10
|
+
users: User[];
|
|
11
|
+
companies: Company[];
|
|
12
|
+
locals: Local[];
|
|
13
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
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.City = void 0;
|
|
13
|
+
var typeorm_1 = require("typeorm");
|
|
14
|
+
var Region_1 = require("./Region");
|
|
15
|
+
var User_1 = require("./User");
|
|
16
|
+
var Company_1 = require("./Company");
|
|
17
|
+
var Local_1 = require("./Local");
|
|
18
|
+
var City = /** @class */ (function () {
|
|
19
|
+
function City() {
|
|
20
|
+
}
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
23
|
+
__metadata("design:type", Number)
|
|
24
|
+
], City.prototype, "id", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)({ length: 50 }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], City.prototype, "name", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.ManyToOne)(function () { return Region_1.Region; }, function (region) { return region.cities; }),
|
|
31
|
+
(0, typeorm_1.JoinColumn)({ name: 'region' }),
|
|
32
|
+
__metadata("design:type", Region_1.Region)
|
|
33
|
+
], City.prototype, "region", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ default: 1 }),
|
|
36
|
+
__metadata("design:type", Number)
|
|
37
|
+
], City.prototype, "status", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.OneToMany)(function () { return User_1.User; }, function (user) { return user.city; }),
|
|
40
|
+
__metadata("design:type", Array)
|
|
41
|
+
], City.prototype, "users", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.OneToMany)(function () { return Company_1.Company; }, function (Company) { return Company.city; }),
|
|
44
|
+
__metadata("design:type", Array)
|
|
45
|
+
], City.prototype, "companies", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.OneToMany)(function () { return Local_1.Local; }, function (local) { return local.city; }),
|
|
48
|
+
__metadata("design:type", Array)
|
|
49
|
+
], City.prototype, "locals", void 0);
|
|
50
|
+
City = __decorate([
|
|
51
|
+
(0, typeorm_1.Entity)()
|
|
52
|
+
], City);
|
|
53
|
+
return City;
|
|
54
|
+
}());
|
|
55
|
+
exports.City = City;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DiscountCodeCompany } from './DiscountCodeCompany';
|
|
2
|
+
import { Company } from './Company';
|
|
3
|
+
export declare class CodeRedemptionHistoryCompany {
|
|
4
|
+
id: number;
|
|
5
|
+
discount_code_company: DiscountCodeCompany;
|
|
6
|
+
company: Company;
|
|
7
|
+
dateUsed: Date;
|
|
8
|
+
discountApplied: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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.CodeRedemptionHistoryCompany = void 0;
|
|
13
|
+
var typeorm_1 = require("typeorm");
|
|
14
|
+
var DiscountCodeCompany_1 = require("./DiscountCodeCompany");
|
|
15
|
+
var Company_1 = require("./Company");
|
|
16
|
+
var CodeRedemptionHistoryCompany = /** @class */ (function () {
|
|
17
|
+
function CodeRedemptionHistoryCompany() {
|
|
18
|
+
}
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
21
|
+
__metadata("design:type", Number)
|
|
22
|
+
], CodeRedemptionHistoryCompany.prototype, "id", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.ManyToOne)(function () { return DiscountCodeCompany_1.DiscountCodeCompany; }, function (company) { return company.code_redemptions_history_company; }),
|
|
25
|
+
(0, typeorm_1.JoinColumn)({ name: 'discount_code_company' }),
|
|
26
|
+
__metadata("design:type", DiscountCodeCompany_1.DiscountCodeCompany)
|
|
27
|
+
], CodeRedemptionHistoryCompany.prototype, "discount_code_company", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.ManyToOne)(function () { return Company_1.Company; }, function (company) { return company.code_redemption_history_company; }),
|
|
30
|
+
(0, typeorm_1.JoinColumn)({ name: 'company' }),
|
|
31
|
+
__metadata("design:type", Company_1.Company)
|
|
32
|
+
], CodeRedemptionHistoryCompany.prototype, "company", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ type: 'datetime' }),
|
|
35
|
+
__metadata("design:type", Date)
|
|
36
|
+
], CodeRedemptionHistoryCompany.prototype, "dateUsed", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ length: 10 }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], CodeRedemptionHistoryCompany.prototype, "discountApplied", void 0);
|
|
41
|
+
CodeRedemptionHistoryCompany = __decorate([
|
|
42
|
+
(0, typeorm_1.Entity)('code_redemption_history_company')
|
|
43
|
+
], CodeRedemptionHistoryCompany);
|
|
44
|
+
return CodeRedemptionHistoryCompany;
|
|
45
|
+
}());
|
|
46
|
+
exports.CodeRedemptionHistoryCompany = CodeRedemptionHistoryCompany;
|
|
@@ -0,0 +1,46 @@
|
|
|
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.CodeRedemptionHistoryUser = void 0;
|
|
13
|
+
var typeorm_1 = require("typeorm");
|
|
14
|
+
var User_1 = require("./User");
|
|
15
|
+
var DiscountCodeUser_1 = require("./DiscountCodeUser");
|
|
16
|
+
var CodeRedemptionHistoryUser = /** @class */ (function () {
|
|
17
|
+
function CodeRedemptionHistoryUser() {
|
|
18
|
+
}
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
21
|
+
__metadata("design:type", Number)
|
|
22
|
+
], CodeRedemptionHistoryUser.prototype, "id", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.ManyToOne)(function () { return DiscountCodeUser_1.DiscountCodeUser; }, function (discountCodeUser) { return discountCodeUser.code_redemptions_history_users; }),
|
|
25
|
+
(0, typeorm_1.JoinColumn)({ name: 'discount_code_user' }),
|
|
26
|
+
__metadata("design:type", DiscountCodeUser_1.DiscountCodeUser)
|
|
27
|
+
], CodeRedemptionHistoryUser.prototype, "discount_code_user", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.ManyToOne)(function () { return User_1.User; }, function (user) { return user.code_redemption_history_users; }),
|
|
30
|
+
(0, typeorm_1.JoinColumn)({ name: 'user' }),
|
|
31
|
+
__metadata("design:type", User_1.User)
|
|
32
|
+
], CodeRedemptionHistoryUser.prototype, "user", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ type: 'datetime' }),
|
|
35
|
+
__metadata("design:type", Date)
|
|
36
|
+
], CodeRedemptionHistoryUser.prototype, "date_used", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ length: 10 }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], CodeRedemptionHistoryUser.prototype, "discount_applied", void 0);
|
|
41
|
+
CodeRedemptionHistoryUser = __decorate([
|
|
42
|
+
(0, typeorm_1.Entity)('code_redemption_history_user')
|
|
43
|
+
], CodeRedemptionHistoryUser);
|
|
44
|
+
return CodeRedemptionHistoryUser;
|
|
45
|
+
}());
|
|
46
|
+
exports.CodeRedemptionHistoryUser = CodeRedemptionHistoryUser;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { City } from './City';
|
|
2
|
+
import { User } from './User';
|
|
3
|
+
import { Plan } from './Plan';
|
|
4
|
+
import { TypeFood } from './TypeFood';
|
|
5
|
+
import { Local } from './Local';
|
|
6
|
+
import { CodeRedemptionHistoryCompany } from './CodeRedemptionHistoryCompany';
|
|
7
|
+
import { DiscountCodeUser } from './DiscountCodeUser';
|
|
8
|
+
import { ProductTopping } from './ProductTopping';
|
|
9
|
+
export declare class Company {
|
|
10
|
+
id: number;
|
|
11
|
+
name: string;
|
|
12
|
+
city: City;
|
|
13
|
+
user: User;
|
|
14
|
+
profile: string;
|
|
15
|
+
quantity_locals: number;
|
|
16
|
+
quantity_users: number;
|
|
17
|
+
legal_information: string;
|
|
18
|
+
legal_agent: string;
|
|
19
|
+
plan: Plan;
|
|
20
|
+
created: Date;
|
|
21
|
+
expiration: Date;
|
|
22
|
+
updated: Date;
|
|
23
|
+
status: number;
|
|
24
|
+
types_food: TypeFood[];
|
|
25
|
+
locals: Local[];
|
|
26
|
+
code_redemption_history_company: CodeRedemptionHistoryCompany[];
|
|
27
|
+
discount_code_users: DiscountCodeUser[];
|
|
28
|
+
product_toppings: ProductTopping[];
|
|
29
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
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.Company = void 0;
|
|
13
|
+
var typeorm_1 = require("typeorm");
|
|
14
|
+
var City_1 = require("./City");
|
|
15
|
+
var User_1 = require("./User");
|
|
16
|
+
var Plan_1 = require("./Plan");
|
|
17
|
+
var TypeFood_1 = require("./TypeFood");
|
|
18
|
+
var Local_1 = require("./Local");
|
|
19
|
+
var CodeRedemptionHistoryCompany_1 = require("./CodeRedemptionHistoryCompany");
|
|
20
|
+
var DiscountCodeUser_1 = require("./DiscountCodeUser");
|
|
21
|
+
var ProductTopping_1 = require("./ProductTopping");
|
|
22
|
+
var Company = /** @class */ (function () {
|
|
23
|
+
function Company() {
|
|
24
|
+
}
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
27
|
+
__metadata("design:type", Number)
|
|
28
|
+
], Company.prototype, "id", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ length: 50 }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], Company.prototype, "name", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.ManyToOne)(function () { return City_1.City; }, function (city) { return city.companies; }),
|
|
35
|
+
(0, typeorm_1.JoinColumn)({ name: 'city' }),
|
|
36
|
+
__metadata("design:type", City_1.City)
|
|
37
|
+
], Company.prototype, "city", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.ManyToOne)(function () { return User_1.User; }, function (city) { return city.companies; }),
|
|
40
|
+
(0, typeorm_1.JoinColumn)({ name: 'user' }),
|
|
41
|
+
__metadata("design:type", User_1.User)
|
|
42
|
+
], Company.prototype, "user", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({
|
|
45
|
+
type: 'longtext',
|
|
46
|
+
nullable: true,
|
|
47
|
+
comment: 'Campo de tipo JSON donde se guarda información necesaria para la empresa',
|
|
48
|
+
}),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], Company.prototype, "profile", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, typeorm_1.Column)({ default: 1 }),
|
|
53
|
+
__metadata("design:type", Number)
|
|
54
|
+
], Company.prototype, "quantity_locals", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.Column)({ default: 6 }),
|
|
57
|
+
__metadata("design:type", Number)
|
|
58
|
+
], Company.prototype, "quantity_users", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({
|
|
61
|
+
type: 'longtext',
|
|
62
|
+
nullable: true,
|
|
63
|
+
comment: 'Información de tipo JSON donde se guarda la información legal de la empresa',
|
|
64
|
+
}),
|
|
65
|
+
__metadata("design:type", String)
|
|
66
|
+
], Company.prototype, "legal_information", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.Column)({
|
|
69
|
+
type: 'longtext',
|
|
70
|
+
nullable: true,
|
|
71
|
+
comment: 'Información de tipo JSON donde se guarda la información del representante legal del representante',
|
|
72
|
+
}),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], Company.prototype, "legal_agent", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, typeorm_1.ManyToOne)(function () { return Plan_1.Plan; }, function (plan) { return plan.companies; }),
|
|
77
|
+
(0, typeorm_1.JoinColumn)({ name: 'plan' }),
|
|
78
|
+
__metadata("design:type", Plan_1.Plan)
|
|
79
|
+
], Company.prototype, "plan", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, typeorm_1.Column)({ type: 'datetime' }),
|
|
82
|
+
__metadata("design:type", Date)
|
|
83
|
+
], Company.prototype, "created", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
86
|
+
__metadata("design:type", Date)
|
|
87
|
+
], Company.prototype, "expiration", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, typeorm_1.Column)({ type: 'datetime' }),
|
|
90
|
+
__metadata("design:type", Date)
|
|
91
|
+
], Company.prototype, "updated", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, typeorm_1.Column)({ default: 1 }),
|
|
94
|
+
__metadata("design:type", Number)
|
|
95
|
+
], Company.prototype, "status", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
(0, typeorm_1.ManyToMany)(function () { return TypeFood_1.TypeFood; }),
|
|
98
|
+
(0, typeorm_1.JoinTable)({
|
|
99
|
+
name: 'type_food_company',
|
|
100
|
+
joinColumn: {
|
|
101
|
+
name: 'company',
|
|
102
|
+
referencedColumnName: 'id',
|
|
103
|
+
},
|
|
104
|
+
inverseJoinColumn: {
|
|
105
|
+
name: 'type_food',
|
|
106
|
+
referencedColumnName: 'id',
|
|
107
|
+
},
|
|
108
|
+
}),
|
|
109
|
+
__metadata("design:type", Array)
|
|
110
|
+
], Company.prototype, "types_food", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
(0, typeorm_1.OneToMany)(function () { return Local_1.Local; }, function (local) { return local.company; }),
|
|
113
|
+
__metadata("design:type", Array)
|
|
114
|
+
], Company.prototype, "locals", void 0);
|
|
115
|
+
__decorate([
|
|
116
|
+
(0, typeorm_1.OneToMany)(function () { return CodeRedemptionHistoryCompany_1.CodeRedemptionHistoryCompany; }, function (codeRedemptionHistoryCompany) { return codeRedemptionHistoryCompany.company; }),
|
|
117
|
+
__metadata("design:type", Array)
|
|
118
|
+
], Company.prototype, "code_redemption_history_company", void 0);
|
|
119
|
+
__decorate([
|
|
120
|
+
(0, typeorm_1.OneToMany)(function () { return DiscountCodeUser_1.DiscountCodeUser; }, function (discountCodeUser) { return discountCodeUser.company; }),
|
|
121
|
+
__metadata("design:type", Array)
|
|
122
|
+
], Company.prototype, "discount_code_users", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
(0, typeorm_1.OneToMany)(function () { return ProductTopping_1.ProductTopping; }, function (productTopping) { return productTopping.company; }),
|
|
125
|
+
__metadata("design:type", Array)
|
|
126
|
+
], Company.prototype, "product_toppings", void 0);
|
|
127
|
+
Company = __decorate([
|
|
128
|
+
(0, typeorm_1.Entity)()
|
|
129
|
+
], Company);
|
|
130
|
+
return Company;
|
|
131
|
+
}());
|
|
132
|
+
exports.Company = Company;
|
|
@@ -0,0 +1,33 @@
|
|
|
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.Configuration = void 0;
|
|
13
|
+
var typeorm_1 = require("typeorm");
|
|
14
|
+
var Configuration = /** @class */ (function () {
|
|
15
|
+
function Configuration() {
|
|
16
|
+
}
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, typeorm_1.PrimaryColumn)({ length: 20 }),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], Configuration.prototype, "profile", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.Column)({
|
|
23
|
+
type: 'longtext',
|
|
24
|
+
comment: 'Columna de tipo JSON para agregar la información y configuración respecto a la plataforma.',
|
|
25
|
+
}),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], Configuration.prototype, "settings", void 0);
|
|
28
|
+
Configuration = __decorate([
|
|
29
|
+
(0, typeorm_1.Entity)()
|
|
30
|
+
], Configuration);
|
|
31
|
+
return Configuration;
|
|
32
|
+
}());
|
|
33
|
+
exports.Configuration = Configuration;
|
|
@@ -0,0 +1,68 @@
|
|
|
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.Country = void 0;
|
|
13
|
+
var typeorm_1 = require("typeorm");
|
|
14
|
+
var Region_1 = require("./Region");
|
|
15
|
+
var Country = /** @class */ (function () {
|
|
16
|
+
function Country() {
|
|
17
|
+
}
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
20
|
+
__metadata("design:type", Number)
|
|
21
|
+
], Country.prototype, "id", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.Column)({ length: 10 }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], Country.prototype, "code", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)({ length: 50 }),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], Country.prototype, "name", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({
|
|
32
|
+
length: 10,
|
|
33
|
+
comment: 'Usamos esta columna para saber la moneda del país y sugerírsela al usuario o al local',
|
|
34
|
+
}),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], Country.prototype, "currency", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ length: 10 }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], Country.prototype, "prefix", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({
|
|
43
|
+
type: 'longtext',
|
|
44
|
+
comment: 'Esta columna de tipo JSON nos sirve para agregar toda la información que se necesita a nivel de información legal de la empresa que se registre, ya que para cada país cambia la información',
|
|
45
|
+
}),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], Country.prototype, "legal_information", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({
|
|
50
|
+
type: 'longtext',
|
|
51
|
+
comment: 'Columna de tipo JSON para almacenar la información que se necesita para la información del representante legal de la empresa',
|
|
52
|
+
}),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], Country.prototype, "legal_agent", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.Column)({ default: 1 }),
|
|
57
|
+
__metadata("design:type", Number)
|
|
58
|
+
], Country.prototype, "status", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.OneToMany)(function () { return Region_1.Region; }, function (region) { return region.country; }),
|
|
61
|
+
__metadata("design:type", Array)
|
|
62
|
+
], Country.prototype, "regions", void 0);
|
|
63
|
+
Country = __decorate([
|
|
64
|
+
(0, typeorm_1.Entity)()
|
|
65
|
+
], Country);
|
|
66
|
+
return Country;
|
|
67
|
+
}());
|
|
68
|
+
exports.Country = Country;
|
|
@@ -0,0 +1,34 @@
|
|
|
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.Day = void 0;
|
|
13
|
+
var typeorm_1 = require("typeorm");
|
|
14
|
+
var Day = /** @class */ (function () {
|
|
15
|
+
function Day() {
|
|
16
|
+
}
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
19
|
+
__metadata("design:type", Number)
|
|
20
|
+
], Day.prototype, "id", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.Column)({ length: 50 }),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], Day.prototype, "name", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)({ default: 1 }),
|
|
27
|
+
__metadata("design:type", Number)
|
|
28
|
+
], Day.prototype, "status", void 0);
|
|
29
|
+
Day = __decorate([
|
|
30
|
+
(0, typeorm_1.Entity)()
|
|
31
|
+
], Day);
|
|
32
|
+
return Day;
|
|
33
|
+
}());
|
|
34
|
+
exports.Day = Day;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { User } from './User';
|
|
2
|
+
import { CodeRedemptionHistoryCompany } from './CodeRedemptionHistoryCompany';
|
|
3
|
+
export declare class DiscountCodeCompany {
|
|
4
|
+
id: number;
|
|
5
|
+
code: string;
|
|
6
|
+
discount: string;
|
|
7
|
+
type: number;
|
|
8
|
+
single_use: number;
|
|
9
|
+
created: Date;
|
|
10
|
+
expiration: Date;
|
|
11
|
+
updated: Date;
|
|
12
|
+
status: number;
|
|
13
|
+
updated_by: User;
|
|
14
|
+
code_redemptions_history_company: CodeRedemptionHistoryCompany[];
|
|
15
|
+
}
|
|
@@ -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.DiscountCodeCompany = void 0;
|
|
13
|
+
var typeorm_1 = require("typeorm");
|
|
14
|
+
var User_1 = require("./User");
|
|
15
|
+
var CodeRedemptionHistoryCompany_1 = require("./CodeRedemptionHistoryCompany");
|
|
16
|
+
var DiscountCodeCompany = /** @class */ (function () {
|
|
17
|
+
function DiscountCodeCompany() {
|
|
18
|
+
}
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
21
|
+
__metadata("design:type", Number)
|
|
22
|
+
], DiscountCodeCompany.prototype, "id", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)({ length: 10 }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], DiscountCodeCompany.prototype, "code", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ length: 10 }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], DiscountCodeCompany.prototype, "discount", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({
|
|
33
|
+
default: 1,
|
|
34
|
+
comment: 'Campo para el tipo de descuento:\r\n1. Porcentaje.\r\n2. Valor en moneda.',
|
|
35
|
+
}),
|
|
36
|
+
__metadata("design:type", Number)
|
|
37
|
+
], DiscountCodeCompany.prototype, "type", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({
|
|
40
|
+
default: 1,
|
|
41
|
+
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',
|
|
42
|
+
}),
|
|
43
|
+
__metadata("design:type", Number)
|
|
44
|
+
], DiscountCodeCompany.prototype, "single_use", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({ type: 'datetime' }),
|
|
47
|
+
__metadata("design:type", Date)
|
|
48
|
+
], DiscountCodeCompany.prototype, "created", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({ type: 'date' }),
|
|
51
|
+
__metadata("design:type", Date)
|
|
52
|
+
], DiscountCodeCompany.prototype, "expiration", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({ type: 'datetime' }),
|
|
55
|
+
__metadata("design:type", Date)
|
|
56
|
+
], DiscountCodeCompany.prototype, "updated", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({ default: 1 }),
|
|
59
|
+
__metadata("design:type", Number)
|
|
60
|
+
], DiscountCodeCompany.prototype, "status", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.ManyToOne)(function () { return User_1.User; }, function (user) { return user.discount_code_companies; }),
|
|
63
|
+
(0, typeorm_1.JoinColumn)({ name: 'update_by' }),
|
|
64
|
+
__metadata("design:type", User_1.User)
|
|
65
|
+
], DiscountCodeCompany.prototype, "updated_by", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, typeorm_1.OneToMany)(function () { return CodeRedemptionHistoryCompany_1.CodeRedemptionHistoryCompany; }, function (codeRedemptionHistoryCompany) {
|
|
68
|
+
return codeRedemptionHistoryCompany.discount_code_company;
|
|
69
|
+
}),
|
|
70
|
+
__metadata("design:type", Array)
|
|
71
|
+
], DiscountCodeCompany.prototype, "code_redemptions_history_company", void 0);
|
|
72
|
+
DiscountCodeCompany = __decorate([
|
|
73
|
+
(0, typeorm_1.Entity)('discount_code_company')
|
|
74
|
+
], DiscountCodeCompany);
|
|
75
|
+
return DiscountCodeCompany;
|
|
76
|
+
}());
|
|
77
|
+
exports.DiscountCodeCompany = DiscountCodeCompany;
|