@ashutoshvohra136/tenant-db-contract 1.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/.prettierrc +32 -0
- package/README.md +12 -0
- package/dist/constants/alert-messages.d.ts +10 -0
- package/dist/constants/alert-messages.js +14 -0
- package/dist/constants/common.option.d.ts +7 -0
- package/dist/constants/common.option.js +10 -0
- package/dist/constants/context.option.d.ts +4 -0
- package/dist/constants/context.option.js +8 -0
- package/dist/constants/date-time.option.d.ts +5 -0
- package/dist/constants/date-time.option.js +21 -0
- package/dist/constants/encryption.option.d.ts +4 -0
- package/dist/constants/encryption.option.js +8 -0
- package/dist/constants/events.option.d.ts +6 -0
- package/dist/constants/events.option.js +10 -0
- package/dist/constants/roles.option.d.ts +8 -0
- package/dist/constants/roles.option.js +12 -0
- package/dist/constants/status-code.option.d.ts +4 -0
- package/dist/constants/status-code.option.js +31 -0
- package/dist/entities/AchievementHistory.d.ts +11 -0
- package/dist/entities/AchievementHistory.js +48 -0
- package/dist/entities/AlertMessages.d.ts +9 -0
- package/dist/entities/AlertMessages.js +45 -0
- package/dist/entities/Analysis.d.ts +17 -0
- package/dist/entities/Analysis.js +68 -0
- package/dist/entities/Answers.d.ts +10 -0
- package/dist/entities/Answers.js +45 -0
- package/dist/entities/ApiResponses.d.ts +14 -0
- package/dist/entities/ApiResponses.js +63 -0
- package/dist/entities/Attachments.d.ts +24 -0
- package/dist/entities/Attachments.js +95 -0
- package/dist/entities/AttendanceDetails.d.ts +25 -0
- package/dist/entities/AttendanceDetails.js +111 -0
- package/dist/entities/BeatPlanCheckIns.d.ts +23 -0
- package/dist/entities/BeatPlanCheckIns.js +96 -0
- package/dist/entities/BeatPlanVisits.d.ts +28 -0
- package/dist/entities/BeatPlanVisits.js +109 -0
- package/dist/entities/BranchManagerBrandsMappings.d.ts +11 -0
- package/dist/entities/BranchManagerBrandsMappings.js +53 -0
- package/dist/entities/BranchManagerMerchandiserMappings.d.ts +12 -0
- package/dist/entities/BranchManagerMerchandiserMappings.js +75 -0
- package/dist/entities/BrandWiseCategory.d.ts +10 -0
- package/dist/entities/BrandWiseCategory.js +44 -0
- package/dist/entities/Brands.d.ts +25 -0
- package/dist/entities/Brands.js +91 -0
- package/dist/entities/Category.d.ts +17 -0
- package/dist/entities/Category.js +70 -0
- package/dist/entities/DamagedProductsRequests.d.ts +12 -0
- package/dist/entities/DamagedProductsRequests.js +50 -0
- package/dist/entities/DamagedProductsRequestsDetails.d.ts +19 -0
- package/dist/entities/DamagedProductsRequestsDetails.js +74 -0
- package/dist/entities/Enum/ImageType.d.ts +8 -0
- package/dist/entities/Enum/ImageType.js +12 -0
- package/dist/entities/Enum/LogType.d.ts +9 -0
- package/dist/entities/Enum/LogType.js +14 -0
- package/dist/entities/Enum/Months.d.ts +14 -0
- package/dist/entities/Enum/Months.js +18 -0
- package/dist/entities/Enum/UserRole.d.ts +13 -0
- package/dist/entities/Enum/UserRole.js +18 -0
- package/dist/entities/Enum/UserRosterAssignStatus.d.ts +8 -0
- package/dist/entities/Enum/UserRosterAssignStatus.js +12 -0
- package/dist/entities/Inventory.d.ts +14 -0
- package/dist/entities/Inventory.js +60 -0
- package/dist/entities/InventoryDetails.d.ts +20 -0
- package/dist/entities/InventoryDetails.js +80 -0
- package/dist/entities/LeaveRequests.d.ts +18 -0
- package/dist/entities/LeaveRequests.js +78 -0
- package/dist/entities/LeaveTypes.d.ts +12 -0
- package/dist/entities/LeaveTypes.js +50 -0
- package/dist/entities/LoginHistory.d.ts +18 -0
- package/dist/entities/LoginHistory.js +89 -0
- package/dist/entities/Notifications.d.ts +18 -0
- package/dist/entities/Notifications.js +73 -0
- package/dist/entities/Offer.d.ts +11 -0
- package/dist/entities/Offer.js +51 -0
- package/dist/entities/OfferLaunch.d.ts +10 -0
- package/dist/entities/OfferLaunch.js +44 -0
- package/dist/entities/POSMMaterials.d.ts +8 -0
- package/dist/entities/POSMMaterials.js +39 -0
- package/dist/entities/POSMRequest.d.ts +12 -0
- package/dist/entities/POSMRequest.js +50 -0
- package/dist/entities/POSMRequestDetails.d.ts +18 -0
- package/dist/entities/POSMRequestDetails.js +70 -0
- package/dist/entities/PasswordManager.d.ts +12 -0
- package/dist/entities/PasswordManager.js +57 -0
- package/dist/entities/Products.d.ts +43 -0
- package/dist/entities/Products.js +170 -0
- package/dist/entities/Question.d.ts +16 -0
- package/dist/entities/Question.js +69 -0
- package/dist/entities/Roles.d.ts +13 -0
- package/dist/entities/Roles.js +50 -0
- package/dist/entities/SalesPunch.d.ts +19 -0
- package/dist/entities/SalesPunch.js +73 -0
- package/dist/entities/SalesPunchingAIAnalysis.d.ts +11 -0
- package/dist/entities/SalesPunchingAIAnalysis.js +49 -0
- package/dist/entities/Schemes.d.ts +12 -0
- package/dist/entities/Schemes.js +53 -0
- package/dist/entities/Shifts.d.ts +14 -0
- package/dist/entities/Shifts.js +57 -0
- package/dist/entities/StockRequest.d.ts +22 -0
- package/dist/entities/StockRequest.js +88 -0
- package/dist/entities/StockRequestDetails.d.ts +20 -0
- package/dist/entities/StockRequestDetails.js +78 -0
- package/dist/entities/StoreBrandsMapping.d.ts +12 -0
- package/dist/entities/StoreBrandsMapping.js +57 -0
- package/dist/entities/StoreShifts.d.ts +13 -0
- package/dist/entities/StoreShifts.js +56 -0
- package/dist/entities/Stores.d.ts +25 -0
- package/dist/entities/Stores.js +92 -0
- package/dist/entities/Task.d.ts +19 -0
- package/dist/entities/Task.js +79 -0
- package/dist/entities/TaskAttachment.d.ts +9 -0
- package/dist/entities/TaskAttachment.js +41 -0
- package/dist/entities/TermsAndCondition.d.ts +9 -0
- package/dist/entities/TermsAndCondition.js +43 -0
- package/dist/entities/UplaodedImages.d.ts +10 -0
- package/dist/entities/UplaodedImages.js +52 -0
- package/dist/entities/UserDetails.d.ts +22 -0
- package/dist/entities/UserDetails.js +97 -0
- package/dist/entities/UserLocations.d.ts +13 -0
- package/dist/entities/UserLocations.js +62 -0
- package/dist/entities/UserQuestionAttemptHistory.d.ts +13 -0
- package/dist/entities/UserQuestionAttemptHistory.js +54 -0
- package/dist/entities/UserRoster.d.ts +17 -0
- package/dist/entities/UserRoster.js +73 -0
- package/dist/entities/UserRosterChanges.d.ts +14 -0
- package/dist/entities/UserRosterChanges.js +59 -0
- package/dist/entities/UserStoreChangedHistory.d.ts +12 -0
- package/dist/entities/UserStoreChangedHistory.js +56 -0
- package/dist/entities/UserVideosAttemptsHistory.d.ts +17 -0
- package/dist/entities/UserVideosAttemptsHistory.js +76 -0
- package/dist/entities/Users.d.ts +92 -0
- package/dist/entities/Users.js +301 -0
- package/dist/entities/Versions.d.ts +15 -0
- package/dist/entities/Versions.js +67 -0
- package/dist/entities/Videos.d.ts +17 -0
- package/dist/entities/Videos.js +62 -0
- package/dist/entities/automation_executions.entity.d.ts +7 -0
- package/dist/entities/automation_executions.entity.js +39 -0
- package/dist/entities/automations.entity.d.ts +16 -0
- package/dist/entities/automations.entity.js +75 -0
- package/dist/entities/entitiesV2/Inventory.d.ts +14 -0
- package/dist/entities/entitiesV2/Inventory.js +60 -0
- package/dist/entities/entitiesV2/InventoryDetails.d.ts +20 -0
- package/dist/entities/entitiesV2/InventoryDetails.js +80 -0
- package/dist/entities/entitiesV2/StockRequest.d.ts +22 -0
- package/dist/entities/entitiesV2/StockRequest.js +88 -0
- package/dist/entities/entitiesV2/StockRequestDetails.d.ts +20 -0
- package/dist/entities/entitiesV2/StockRequestDetails.js +78 -0
- package/dist/entities/fcm.entity.d.ts +9 -0
- package/dist/entities/fcm.entity.js +41 -0
- package/dist/entities/index.d.ts +61 -0
- package/dist/entities/index.js +126 -0
- package/dist/entities/notification-user-history.entity.d.ts +16 -0
- package/dist/entities/notification-user-history.entity.js +68 -0
- package/dist/entities/out-of-range.entity.d.ts +11 -0
- package/dist/entities/out-of-range.entity.js +49 -0
- package/dist/entities/permission-policy.entity.d.ts +7 -0
- package/dist/entities/permission-policy.entity.js +40 -0
- package/dist/entities/target.d.ts +17 -0
- package/dist/entities/target.js +72 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +17 -0
- package/package.json +17 -0
- package/src/constants/alert-messages.ts +10 -0
- package/src/constants/common.option.ts +8 -0
- package/src/constants/context.option.ts +4 -0
- package/src/constants/date-time.option.ts +19 -0
- package/src/constants/encryption.option.ts +4 -0
- package/src/constants/events.option.ts +6 -0
- package/src/constants/roles.option.ts +8 -0
- package/src/constants/status-code.option.ts +43 -0
- package/src/entities/AchievementHistory.ts +37 -0
- package/src/entities/AlertMessages.ts +33 -0
- package/src/entities/Analysis.ts +53 -0
- package/src/entities/Answers.ts +36 -0
- package/src/entities/ApiResponses.ts +45 -0
- package/src/entities/Attachments.ts +81 -0
- package/src/entities/AttendanceDetails.ts +86 -0
- package/src/entities/BeatPlanCheckIns.ts +82 -0
- package/src/entities/BeatPlanVisits.ts +88 -0
- package/src/entities/BranchManagerBrandsMappings.ts +41 -0
- package/src/entities/BranchManagerMerchandiserMappings.ts +65 -0
- package/src/entities/BrandWiseCategory.ts +32 -0
- package/src/entities/Brands.ts +73 -0
- package/src/entities/Category.ts +57 -0
- package/src/entities/DamagedProductsRequests.ts +44 -0
- package/src/entities/DamagedProductsRequestsDetails.ts +65 -0
- package/src/entities/Enum/ImageType.ts +8 -0
- package/src/entities/Enum/LogType.ts +10 -0
- package/src/entities/Enum/Months.ts +14 -0
- package/src/entities/Enum/UserRole.ts +14 -0
- package/src/entities/Enum/UserRosterAssignStatus.ts +8 -0
- package/src/entities/Inventory.ts +50 -0
- package/src/entities/InventoryDetails.ts +63 -0
- package/src/entities/LeaveRequests.ts +61 -0
- package/src/entities/LeaveTypes.ts +38 -0
- package/src/entities/LoginHistory.ts +70 -0
- package/src/entities/Notifications.ts +62 -0
- package/src/entities/Offer.ts +35 -0
- package/src/entities/OfferLaunch.ts +31 -0
- package/src/entities/POSMMaterials.ts +33 -0
- package/src/entities/POSMRequest.ts +41 -0
- package/src/entities/POSMRequestDetails.ts +59 -0
- package/src/entities/PasswordManager.ts +44 -0
- package/src/entities/Products.ts +145 -0
- package/src/entities/Question.ts +57 -0
- package/src/entities/Roles.ts +36 -0
- package/src/entities/SalesPunch.ts +63 -0
- package/src/entities/SalesPunchingAIAnalysis.ts +36 -0
- package/src/entities/Schemes.ts +39 -0
- package/src/entities/Shifts.ts +41 -0
- package/src/entities/StockRequest.ts +68 -0
- package/src/entities/StockRequestDetails.ts +63 -0
- package/src/entities/StoreBrandsMapping.ts +44 -0
- package/src/entities/StoreShifts.ts +46 -0
- package/src/entities/Stores.ts +68 -0
- package/src/entities/Task.ts +60 -0
- package/src/entities/TaskAttachment.ts +29 -0
- package/src/entities/TermsAndCondition.ts +29 -0
- package/src/entities/UplaodedImages.ts +37 -0
- package/src/entities/UserDetails.ts +74 -0
- package/src/entities/UserLocations.ts +49 -0
- package/src/entities/UserQuestionAttemptHistory.ts +49 -0
- package/src/entities/UserRoster.ts +58 -0
- package/src/entities/UserRosterChanges.ts +44 -0
- package/src/entities/UserStoreChangedHistory.ts +40 -0
- package/src/entities/UserVideosAttemptsHistory.ts +64 -0
- package/src/entities/Users.ts +259 -0
- package/src/entities/Versions.ts +47 -0
- package/src/entities/Videos.ts +48 -0
- package/src/entities/automation_executions.entity.ts +24 -0
- package/src/entities/automations.entity.ts +60 -0
- package/src/entities/entitiesV2/Inventory.ts +51 -0
- package/src/entities/entitiesV2/InventoryDetails.ts +63 -0
- package/src/entities/entitiesV2/StockRequest.ts +68 -0
- package/src/entities/entitiesV2/StockRequestDetails.ts +63 -0
- package/src/entities/fcm.entity.ts +30 -0
- package/src/entities/index.ts +61 -0
- package/src/entities/notification-user-history.entity.ts +51 -0
- package/src/entities/out-of-range.entity.ts +36 -0
- package/src/entities/permission-policy.entity.ts +25 -0
- package/src/entities/target.ts +54 -0
- package/src/index.ts +1 -0
- package/tsconfig.json +14 -0
|
@@ -0,0 +1,80 @@
|
|
|
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.InventoryDetails = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const Inventory_1 = require("./Inventory");
|
|
15
|
+
const Brands_1 = require("./Brands");
|
|
16
|
+
const Products_1 = require("./Products");
|
|
17
|
+
const Attachments_1 = require("./Attachments");
|
|
18
|
+
let InventoryDetails = class InventoryDetails extends typeorm_1.BaseEntity {
|
|
19
|
+
};
|
|
20
|
+
exports.InventoryDetails = InventoryDetails;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({ type: 'bigint', name: 'id' }),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], InventoryDetails.prototype, "id", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)('bigint', { name: 'inventory_id', nullable: true }) // renamed FK
|
|
27
|
+
,
|
|
28
|
+
__metadata("design:type", Object)
|
|
29
|
+
], InventoryDetails.prototype, "inventoryId", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)('bigint', { name: 'brand_id', nullable: true }),
|
|
32
|
+
__metadata("design:type", Object)
|
|
33
|
+
], InventoryDetails.prototype, "brandId", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)('bigint', { name: 'product_id', nullable: true }),
|
|
36
|
+
__metadata("design:type", Object)
|
|
37
|
+
], InventoryDetails.prototype, "productId", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ type: 'datetime', nullable: true }),
|
|
40
|
+
__metadata("design:type", Date)
|
|
41
|
+
], InventoryDetails.prototype, "date", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false, default: 0 }),
|
|
44
|
+
__metadata("design:type", Number)
|
|
45
|
+
], InventoryDetails.prototype, "quantity", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)('tinyint', { name: 'status', nullable: true, default: 0 }),
|
|
48
|
+
__metadata("design:type", Number)
|
|
49
|
+
], InventoryDetails.prototype, "status", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.CreateDateColumn)({ type: 'datetime' }),
|
|
52
|
+
__metadata("design:type", Date)
|
|
53
|
+
], InventoryDetails.prototype, "created_at", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.UpdateDateColumn)({ type: 'datetime' }),
|
|
56
|
+
__metadata("design:type", Date)
|
|
57
|
+
], InventoryDetails.prototype, "updated_at", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.ManyToOne)(() => Inventory_1.Inventory, (inventory) => inventory.inventoryDetails),
|
|
60
|
+
(0, typeorm_1.JoinColumn)([{ name: 'inventory_id' }]) // FK column
|
|
61
|
+
,
|
|
62
|
+
__metadata("design:type", Inventory_1.Inventory)
|
|
63
|
+
], InventoryDetails.prototype, "inventory", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, typeorm_1.ManyToOne)(() => Brands_1.Brands, (brand) => brand.product),
|
|
66
|
+
(0, typeorm_1.JoinColumn)([{ name: 'brand_id' }]),
|
|
67
|
+
__metadata("design:type", Brands_1.Brands)
|
|
68
|
+
], InventoryDetails.prototype, "brand", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typeorm_1.ManyToOne)(() => Products_1.Product, (product) => product.id),
|
|
71
|
+
(0, typeorm_1.JoinColumn)([{ name: 'product_id' }]),
|
|
72
|
+
__metadata("design:type", Products_1.Product)
|
|
73
|
+
], InventoryDetails.prototype, "product", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, typeorm_1.OneToOne)(() => Attachments_1.Attachement, (attachment) => attachment.inventoryDetails),
|
|
76
|
+
__metadata("design:type", Attachments_1.Attachement)
|
|
77
|
+
], InventoryDetails.prototype, "attachment", void 0);
|
|
78
|
+
exports.InventoryDetails = InventoryDetails = __decorate([
|
|
79
|
+
(0, typeorm_1.Entity)('inventory_details') // final table name
|
|
80
|
+
], InventoryDetails);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseEntity } from 'typeorm';
|
|
2
|
+
import { Users } from './Users';
|
|
3
|
+
import { Attachement } from './Attachments';
|
|
4
|
+
import { LeaveTypes } from './LeaveTypes';
|
|
5
|
+
export declare class LeaveRequests extends BaseEntity {
|
|
6
|
+
id: string;
|
|
7
|
+
start_date: Date;
|
|
8
|
+
end_date: Date;
|
|
9
|
+
remark: string;
|
|
10
|
+
action_remark: string;
|
|
11
|
+
status?: number;
|
|
12
|
+
created_at: Date;
|
|
13
|
+
updated_at: Date;
|
|
14
|
+
leaveType?: LeaveTypes;
|
|
15
|
+
users?: Users;
|
|
16
|
+
action_by: Users;
|
|
17
|
+
attachment: Attachement;
|
|
18
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
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.LeaveRequests = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const Users_1 = require("./Users");
|
|
15
|
+
const Attachments_1 = require("./Attachments");
|
|
16
|
+
const LeaveTypes_1 = require("./LeaveTypes");
|
|
17
|
+
let LeaveRequests = class LeaveRequests extends typeorm_1.BaseEntity {
|
|
18
|
+
};
|
|
19
|
+
exports.LeaveRequests = LeaveRequests;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({ type: 'bigint', name: 'id' }),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], LeaveRequests.prototype, "id", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Column)({ type: 'datetime', nullable: false }),
|
|
26
|
+
__metadata("design:type", Date)
|
|
27
|
+
], LeaveRequests.prototype, "start_date", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ type: 'datetime', nullable: false }),
|
|
30
|
+
__metadata("design:type", Date)
|
|
31
|
+
], LeaveRequests.prototype, "end_date", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], LeaveRequests.prototype, "remark", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], LeaveRequests.prototype, "action_remark", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)('tinyint', { name: 'status', nullable: true, default: 0 }),
|
|
42
|
+
__metadata("design:type", Number)
|
|
43
|
+
], LeaveRequests.prototype, "status", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.CreateDateColumn)({ type: 'datetime' }),
|
|
46
|
+
__metadata("design:type", Date)
|
|
47
|
+
], LeaveRequests.prototype, "created_at", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.UpdateDateColumn)({ type: 'datetime' }),
|
|
50
|
+
__metadata("design:type", Date)
|
|
51
|
+
], LeaveRequests.prototype, "updated_at", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.ManyToOne)(() => LeaveTypes_1.LeaveTypes, (leaveType) => leaveType.leaveRequest, {
|
|
54
|
+
onDelete: 'NO ACTION',
|
|
55
|
+
onUpdate: 'NO ACTION',
|
|
56
|
+
}),
|
|
57
|
+
(0, typeorm_1.JoinColumn)([{ name: 'leave_type_id' }]),
|
|
58
|
+
__metadata("design:type", LeaveTypes_1.LeaveTypes)
|
|
59
|
+
], LeaveRequests.prototype, "leaveType", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.ManyToOne)(() => Users_1.Users, (users) => users.salesPuching),
|
|
62
|
+
(0, typeorm_1.JoinColumn)({ name: 'user_id' }),
|
|
63
|
+
__metadata("design:type", Users_1.Users)
|
|
64
|
+
], LeaveRequests.prototype, "users", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.ManyToOne)(() => Users_1.Users, (u) => u.id),
|
|
67
|
+
(0, typeorm_1.JoinColumn)({ name: 'action_by_id' }),
|
|
68
|
+
(0, typeorm_1.Index)() // Index on action_by_id
|
|
69
|
+
,
|
|
70
|
+
__metadata("design:type", Users_1.Users)
|
|
71
|
+
], LeaveRequests.prototype, "action_by", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, typeorm_1.OneToMany)(() => Attachments_1.Attachement, (attachement) => attachement.leaveRequest),
|
|
74
|
+
__metadata("design:type", Attachments_1.Attachement)
|
|
75
|
+
], LeaveRequests.prototype, "attachment", void 0);
|
|
76
|
+
exports.LeaveRequests = LeaveRequests = __decorate([
|
|
77
|
+
(0, typeorm_1.Entity)('leave_requests')
|
|
78
|
+
], LeaveRequests);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseEntity } from 'typeorm';
|
|
2
|
+
import { LeaveRequests } from './LeaveRequests';
|
|
3
|
+
import { Brands } from './Brands';
|
|
4
|
+
export declare class LeaveTypes extends BaseEntity {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
status?: number;
|
|
8
|
+
created_at: Date;
|
|
9
|
+
updated_at: Date;
|
|
10
|
+
leaveRequest?: LeaveRequests[];
|
|
11
|
+
brand: Brands;
|
|
12
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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.LeaveTypes = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const LeaveRequests_1 = require("./LeaveRequests");
|
|
15
|
+
const Brands_1 = require("./Brands");
|
|
16
|
+
let LeaveTypes = class LeaveTypes extends typeorm_1.BaseEntity {
|
|
17
|
+
};
|
|
18
|
+
exports.LeaveTypes = LeaveTypes;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({ type: 'bigint', name: 'id' }),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], LeaveTypes.prototype, "id", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)('varchar', { name: 'name', nullable: false, length: 255 }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], LeaveTypes.prototype, "name", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ type: 'tinyint', default: 1 }),
|
|
29
|
+
__metadata("design:type", Number)
|
|
30
|
+
], LeaveTypes.prototype, "status", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.CreateDateColumn)({ type: 'datetime' }),
|
|
33
|
+
__metadata("design:type", Date)
|
|
34
|
+
], LeaveTypes.prototype, "created_at", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.UpdateDateColumn)({ type: 'datetime' }),
|
|
37
|
+
__metadata("design:type", Date)
|
|
38
|
+
], LeaveTypes.prototype, "updated_at", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.OneToMany)(() => LeaveRequests_1.LeaveRequests, (leave) => leave.leaveType),
|
|
41
|
+
__metadata("design:type", Array)
|
|
42
|
+
], LeaveTypes.prototype, "leaveRequest", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.ManyToOne)(() => Brands_1.Brands, (brands) => brands.leaveTypes),
|
|
45
|
+
(0, typeorm_1.JoinColumn)({ name: 'brand_id' }),
|
|
46
|
+
__metadata("design:type", Brands_1.Brands)
|
|
47
|
+
], LeaveTypes.prototype, "brand", void 0);
|
|
48
|
+
exports.LeaveTypes = LeaveTypes = __decorate([
|
|
49
|
+
(0, typeorm_1.Entity)('leave_types')
|
|
50
|
+
], LeaveTypes);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseEntity } from 'typeorm';
|
|
2
|
+
import { Users } from './Users';
|
|
3
|
+
export declare class LoginHistory extends BaseEntity {
|
|
4
|
+
id: string;
|
|
5
|
+
userId?: string | null;
|
|
6
|
+
latitude?: string | null;
|
|
7
|
+
longitude?: string | null;
|
|
8
|
+
latitudeLongitudeCity?: string | null;
|
|
9
|
+
latitudeLongitudeState?: string | null;
|
|
10
|
+
logInAddress?: string | null;
|
|
11
|
+
logInPassword?: string | null;
|
|
12
|
+
logInId?: string | null;
|
|
13
|
+
logInTime?: Date | null;
|
|
14
|
+
status: number;
|
|
15
|
+
created_at: Date;
|
|
16
|
+
updated_at: Date;
|
|
17
|
+
user?: Users;
|
|
18
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
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.LoginHistory = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const Users_1 = require("./Users");
|
|
15
|
+
let LoginHistory = class LoginHistory extends typeorm_1.BaseEntity {
|
|
16
|
+
};
|
|
17
|
+
exports.LoginHistory = LoginHistory;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({ type: 'bigint', name: 'id' }),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], LoginHistory.prototype, "id", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.Column)('bigint', { name: 'user_id', nullable: true }),
|
|
24
|
+
__metadata("design:type", Object)
|
|
25
|
+
], LoginHistory.prototype, "userId", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)('varchar', { name: 'latitude', nullable: true, length: 255 }),
|
|
28
|
+
__metadata("design:type", Object)
|
|
29
|
+
], LoginHistory.prototype, "latitude", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)('varchar', { name: 'longitude', nullable: true, length: 255 }),
|
|
32
|
+
__metadata("design:type", Object)
|
|
33
|
+
], LoginHistory.prototype, "longitude", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)('varchar', {
|
|
36
|
+
name: 'latitude_longitude_city',
|
|
37
|
+
nullable: true,
|
|
38
|
+
length: 255,
|
|
39
|
+
}),
|
|
40
|
+
__metadata("design:type", Object)
|
|
41
|
+
], LoginHistory.prototype, "latitudeLongitudeCity", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)('varchar', {
|
|
44
|
+
name: 'latitude_longitude_state',
|
|
45
|
+
nullable: true,
|
|
46
|
+
length: 255,
|
|
47
|
+
}),
|
|
48
|
+
__metadata("design:type", Object)
|
|
49
|
+
], LoginHistory.prototype, "latitudeLongitudeState", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)('varchar', { name: 'log_in_address', nullable: true, length: 255 }),
|
|
52
|
+
__metadata("design:type", Object)
|
|
53
|
+
], LoginHistory.prototype, "logInAddress", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)('text', { name: 'log_in_password', nullable: true }),
|
|
56
|
+
__metadata("design:type", Object)
|
|
57
|
+
], LoginHistory.prototype, "logInPassword", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.Column)('varchar', { name: 'log_in_id', nullable: true, length: 255 }),
|
|
60
|
+
__metadata("design:type", Object)
|
|
61
|
+
], LoginHistory.prototype, "logInId", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.Column)('timestamp', { name: 'log_in_time', nullable: true }),
|
|
64
|
+
__metadata("design:type", Object)
|
|
65
|
+
], LoginHistory.prototype, "logInTime", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, typeorm_1.Column)('tinyint', { name: 'status', nullable: true, default: 0 }),
|
|
68
|
+
__metadata("design:type", Number)
|
|
69
|
+
], LoginHistory.prototype, "status", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, typeorm_1.CreateDateColumn)({ type: 'datetime' }),
|
|
72
|
+
__metadata("design:type", Date)
|
|
73
|
+
], LoginHistory.prototype, "created_at", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, typeorm_1.UpdateDateColumn)({ type: 'datetime' }),
|
|
76
|
+
__metadata("design:type", Date)
|
|
77
|
+
], LoginHistory.prototype, "updated_at", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, typeorm_1.ManyToOne)(() => Users_1.Users, (users) => users.loginHistories, {
|
|
80
|
+
onDelete: 'NO ACTION',
|
|
81
|
+
onUpdate: 'NO ACTION',
|
|
82
|
+
}),
|
|
83
|
+
(0, typeorm_1.JoinColumn)([{ name: 'user_id', referencedColumnName: 'id' }]),
|
|
84
|
+
__metadata("design:type", Users_1.Users)
|
|
85
|
+
], LoginHistory.prototype, "user", void 0);
|
|
86
|
+
exports.LoginHistory = LoginHistory = __decorate([
|
|
87
|
+
(0, typeorm_1.Index)('login_history_ibfk_1', ['userId'], {}),
|
|
88
|
+
(0, typeorm_1.Entity)('login_history')
|
|
89
|
+
], LoginHistory);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseEntity } from 'typeorm';
|
|
2
|
+
import { Users } from './Users';
|
|
3
|
+
import { NotificationUserHistory } from './notification-user-history.entity';
|
|
4
|
+
import { Roles } from './Roles';
|
|
5
|
+
export declare class Notification extends BaseEntity {
|
|
6
|
+
id: bigint;
|
|
7
|
+
user: Users;
|
|
8
|
+
image: string;
|
|
9
|
+
brand_image: string;
|
|
10
|
+
title: string;
|
|
11
|
+
content: string;
|
|
12
|
+
type: string;
|
|
13
|
+
role: Roles;
|
|
14
|
+
status?: number;
|
|
15
|
+
notification_user_history?: NotificationUserHistory;
|
|
16
|
+
created_at: Date;
|
|
17
|
+
updated_at: Date;
|
|
18
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
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.Notification = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const Users_1 = require("./Users");
|
|
15
|
+
const notification_user_history_entity_1 = require("./notification-user-history.entity");
|
|
16
|
+
const Roles_1 = require("./Roles");
|
|
17
|
+
// import { Roles } from './Roles';
|
|
18
|
+
let Notification = class Notification extends typeorm_1.BaseEntity {
|
|
19
|
+
};
|
|
20
|
+
exports.Notification = Notification;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('increment', { type: 'bigint' }),
|
|
23
|
+
__metadata("design:type", typeof BigInt === "function" ? BigInt : Object)
|
|
24
|
+
], Notification.prototype, "id", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.ManyToOne)(() => Users_1.Users, (user) => user.id),
|
|
27
|
+
(0, typeorm_1.JoinColumn)({ name: 'user_id' }),
|
|
28
|
+
__metadata("design:type", Users_1.Users)
|
|
29
|
+
], Notification.prototype, "user", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({ type: 'varchar' }),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], Notification.prototype, "image", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], Notification.prototype, "brand_image", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ type: 'varchar' }),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], Notification.prototype, "title", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ type: 'varchar' }),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], Notification.prototype, "content", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ type: 'varchar' }),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], Notification.prototype, "type", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.ManyToOne)(() => Roles_1.Roles, (role) => role.scheme),
|
|
52
|
+
(0, typeorm_1.JoinColumn)({ name: 'role_id' }),
|
|
53
|
+
__metadata("design:type", Roles_1.Roles)
|
|
54
|
+
], Notification.prototype, "role", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.Column)({ type: 'tinyint', default: 1 }),
|
|
57
|
+
__metadata("design:type", Number)
|
|
58
|
+
], Notification.prototype, "status", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.OneToMany)(() => notification_user_history_entity_1.NotificationUserHistory, (notificationUserHistory) => notificationUserHistory.notificationHistory),
|
|
61
|
+
__metadata("design:type", notification_user_history_entity_1.NotificationUserHistory)
|
|
62
|
+
], Notification.prototype, "notification_user_history", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.CreateDateColumn)({ type: 'datetime' }),
|
|
65
|
+
__metadata("design:type", Date)
|
|
66
|
+
], Notification.prototype, "created_at", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.UpdateDateColumn)({ type: 'datetime' }),
|
|
69
|
+
__metadata("design:type", Date)
|
|
70
|
+
], Notification.prototype, "updated_at", void 0);
|
|
71
|
+
exports.Notification = Notification = __decorate([
|
|
72
|
+
(0, typeorm_1.Entity)({ name: 'notifications' })
|
|
73
|
+
], Notification);
|
|
@@ -0,0 +1,51 @@
|
|
|
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.Offers = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
let Offers = class Offers extends typeorm_1.BaseEntity {
|
|
15
|
+
};
|
|
16
|
+
exports.Offers = Offers;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({ type: 'bigint', name: 'id' }),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], Offers.prototype, "id", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.Column)('varchar', { name: 'name', nullable: false, length: 255 }),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], Offers.prototype, "name", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)('text', { name: 'desc', nullable: true }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], Offers.prototype, "desc", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)('decimal', { name: 'amount', nullable: false, precision: 10, scale: 2 }),
|
|
31
|
+
__metadata("design:type", Number)
|
|
32
|
+
], Offers.prototype, "amount", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)('decimal', { name: 'percentage', nullable: false, precision: 5, scale: 2 }),
|
|
35
|
+
__metadata("design:type", Number)
|
|
36
|
+
], Offers.prototype, "percentage", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)('boolean', { name: 'used', nullable: false, default: false }),
|
|
39
|
+
__metadata("design:type", Boolean)
|
|
40
|
+
], Offers.prototype, "used", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.CreateDateColumn)({ type: 'datetime', name: 'created_at' }),
|
|
43
|
+
__metadata("design:type", Date)
|
|
44
|
+
], Offers.prototype, "created_at", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.UpdateDateColumn)({ type: 'datetime', name: 'updated_at' }),
|
|
47
|
+
__metadata("design:type", Date)
|
|
48
|
+
], Offers.prototype, "updated_at", void 0);
|
|
49
|
+
exports.Offers = Offers = __decorate([
|
|
50
|
+
(0, typeorm_1.Entity)('offers')
|
|
51
|
+
], Offers);
|
|
@@ -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.OfferLaunch = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const Analysis_1 = require("./Analysis");
|
|
15
|
+
let OfferLaunch = class OfferLaunch extends typeorm_1.BaseEntity {
|
|
16
|
+
};
|
|
17
|
+
exports.OfferLaunch = OfferLaunch;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('increment', { type: 'bigint' }),
|
|
20
|
+
__metadata("design:type", Number)
|
|
21
|
+
], OfferLaunch.prototype, "id", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: false }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], OfferLaunch.prototype, "name", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)({ type: 'tinyint', default: 1 }),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], OfferLaunch.prototype, "status", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.CreateDateColumn)({ type: 'datetime' }),
|
|
32
|
+
__metadata("design:type", Date)
|
|
33
|
+
], OfferLaunch.prototype, "created_at", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.UpdateDateColumn)({ type: 'datetime' }),
|
|
36
|
+
__metadata("design:type", Date)
|
|
37
|
+
], OfferLaunch.prototype, "updated_at", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.OneToMany)(() => Analysis_1.Analysis, (analysis) => analysis.offerLaunch),
|
|
40
|
+
__metadata("design:type", Array)
|
|
41
|
+
], OfferLaunch.prototype, "analysis", void 0);
|
|
42
|
+
exports.OfferLaunch = OfferLaunch = __decorate([
|
|
43
|
+
(0, typeorm_1.Entity)({ name: 'offer_launch' })
|
|
44
|
+
], OfferLaunch);
|
|
@@ -0,0 +1,39 @@
|
|
|
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.POSMMaterials = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
let POSMMaterials = class POSMMaterials extends typeorm_1.BaseEntity {
|
|
15
|
+
};
|
|
16
|
+
exports.POSMMaterials = POSMMaterials;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({ type: 'bigint', name: 'id' }),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], POSMMaterials.prototype, "id", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.Column)('varchar', { name: 'name', nullable: false, length: 255 }),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], POSMMaterials.prototype, "name", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)('tinyint', { name: 'status', default: 1 }),
|
|
27
|
+
__metadata("design:type", Number)
|
|
28
|
+
], POSMMaterials.prototype, "status", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.CreateDateColumn)({ type: 'datetime' }),
|
|
31
|
+
__metadata("design:type", Date)
|
|
32
|
+
], POSMMaterials.prototype, "created_at", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.UpdateDateColumn)({ type: 'datetime' }),
|
|
35
|
+
__metadata("design:type", Date)
|
|
36
|
+
], POSMMaterials.prototype, "updated_at", void 0);
|
|
37
|
+
exports.POSMMaterials = POSMMaterials = __decorate([
|
|
38
|
+
(0, typeorm_1.Entity)('posm_materials')
|
|
39
|
+
], POSMMaterials);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseEntity } from 'typeorm';
|
|
2
|
+
import { Users } from './Users';
|
|
3
|
+
import { POSMRequestDetails } from './POSMRequestDetails';
|
|
4
|
+
export declare class POSMRequest extends BaseEntity {
|
|
5
|
+
id: string;
|
|
6
|
+
userId?: string | null;
|
|
7
|
+
status?: number;
|
|
8
|
+
created_at: Date;
|
|
9
|
+
updated_at: Date;
|
|
10
|
+
user?: Users;
|
|
11
|
+
posmRequestDetails?: POSMRequestDetails[];
|
|
12
|
+
}
|