@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,95 @@
|
|
|
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.Attachement = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const SalesPunch_1 = require("./SalesPunch");
|
|
15
|
+
const Analysis_1 = require("./Analysis");
|
|
16
|
+
const POSMRequestDetails_1 = require("./POSMRequestDetails");
|
|
17
|
+
const LeaveRequests_1 = require("./LeaveRequests");
|
|
18
|
+
const DamagedProductsRequestsDetails_1 = require("./DamagedProductsRequestsDetails");
|
|
19
|
+
const BeatPlanCheckIns_1 = require("./BeatPlanCheckIns");
|
|
20
|
+
const InventoryDetails_1 = require("./InventoryDetails");
|
|
21
|
+
const StockRequestDetails_1 = require("./StockRequestDetails"); // ← ADD THIS IMPORT
|
|
22
|
+
let Attachement = class Attachement extends typeorm_1.BaseEntity {
|
|
23
|
+
};
|
|
24
|
+
exports.Attachement = Attachement;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('increment', { type: 'bigint' }),
|
|
27
|
+
__metadata("design:type", Number)
|
|
28
|
+
], Attachement.prototype, "id", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: false }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], Attachement.prototype, "type", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: false }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], Attachement.prototype, "url", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ type: 'tinyint', default: 1 }),
|
|
39
|
+
__metadata("design:type", Number)
|
|
40
|
+
], Attachement.prototype, "status", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.CreateDateColumn)({ type: 'datetime' }),
|
|
43
|
+
__metadata("design:type", Date)
|
|
44
|
+
], Attachement.prototype, "created_at", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.UpdateDateColumn)({ type: 'datetime' }),
|
|
47
|
+
__metadata("design:type", Date)
|
|
48
|
+
], Attachement.prototype, "updated_at", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.ManyToOne)(() => SalesPunch_1.SalesPunching, (salesPunching) => salesPunching.attachment),
|
|
51
|
+
(0, typeorm_1.JoinColumn)({ name: 'sales_punching_id' }),
|
|
52
|
+
__metadata("design:type", SalesPunch_1.SalesPunching)
|
|
53
|
+
], Attachement.prototype, "salesPunching", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.ManyToOne)(() => Analysis_1.Analysis, (analysis) => analysis.attachment),
|
|
56
|
+
(0, typeorm_1.JoinColumn)({ name: 'analysis_id' }),
|
|
57
|
+
__metadata("design:type", Analysis_1.Analysis)
|
|
58
|
+
], Attachement.prototype, "analysis", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.ManyToOne)(() => POSMRequestDetails_1.POSMRequestDetails, (posmRequestDetails) => posmRequestDetails.attachment),
|
|
61
|
+
(0, typeorm_1.JoinColumn)({ name: 'posm_request_details_id' }),
|
|
62
|
+
__metadata("design:type", POSMRequestDetails_1.POSMRequestDetails)
|
|
63
|
+
], Attachement.prototype, "posmRequestDetails", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, typeorm_1.OneToOne)(() => DamagedProductsRequestsDetails_1.DamagedProductsRequestDetails, (damagedProductsRequestDetails) => damagedProductsRequestDetails.attachment),
|
|
66
|
+
(0, typeorm_1.JoinColumn)({ name: 'damaged_products_request_details_id' }),
|
|
67
|
+
__metadata("design:type", DamagedProductsRequestsDetails_1.DamagedProductsRequestDetails)
|
|
68
|
+
], Attachement.prototype, "damagedProductsRequestDetails", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typeorm_1.ManyToOne)(() => LeaveRequests_1.LeaveRequests, (leaveRequest) => leaveRequest.attachment),
|
|
71
|
+
(0, typeorm_1.JoinColumn)({ name: 'leave_request_id' }),
|
|
72
|
+
__metadata("design:type", LeaveRequests_1.LeaveRequests)
|
|
73
|
+
], Attachement.prototype, "leaveRequest", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, typeorm_1.ManyToOne)(() => BeatPlanCheckIns_1.BeatPlanCheckins, (bp) => bp.attachment),
|
|
76
|
+
(0, typeorm_1.JoinColumn)({ name: 'beat_plan_checkIns_id' }),
|
|
77
|
+
__metadata("design:type", LeaveRequests_1.LeaveRequests)
|
|
78
|
+
], Attachement.prototype, "beatPlanCheckIns", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, typeorm_1.OneToOne)(() => InventoryDetails_1.InventoryDetails, (inventoryDetails) => inventoryDetails.attachment),
|
|
81
|
+
(0, typeorm_1.JoinColumn)({ name: 'inventory_details_id' }),
|
|
82
|
+
__metadata("design:type", InventoryDetails_1.InventoryDetails)
|
|
83
|
+
], Attachement.prototype, "inventoryDetails", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, typeorm_1.OneToOne)(() => StockRequestDetails_1.StockRequestDetails, (stockRequestDetails) => stockRequestDetails.attachment),
|
|
86
|
+
(0, typeorm_1.JoinColumn)({ name: 'stock_request_details_id' }),
|
|
87
|
+
__metadata("design:type", StockRequestDetails_1.StockRequestDetails)
|
|
88
|
+
], Attachement.prototype, "stockRequestDetails", void 0);
|
|
89
|
+
exports.Attachement = Attachement = __decorate([
|
|
90
|
+
(0, typeorm_1.Entity)({ name: 'attachement' }),
|
|
91
|
+
(0, typeorm_1.Index)('IDX_attachement_damaged_request', ['damagedProductsRequestDetails']),
|
|
92
|
+
(0, typeorm_1.Index)('IDX_attachement_analysis_id', ['analysis']),
|
|
93
|
+
(0, typeorm_1.Index)('IDX_attachement_posm_request_details_id', ['posmRequestDetails']),
|
|
94
|
+
(0, typeorm_1.Index)('IDX_attachement_beat_plan_checkin_id', ['beatPlanCheckIns'])
|
|
95
|
+
], Attachement);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { BaseEntity } from 'typeorm';
|
|
2
|
+
import { Users } from './Users';
|
|
3
|
+
import { LogType } from './Enum/LogType';
|
|
4
|
+
export declare class AttendanceDetails extends BaseEntity {
|
|
5
|
+
id: string;
|
|
6
|
+
userId?: string | null;
|
|
7
|
+
logInTime?: Date;
|
|
8
|
+
logOutTime?: Date;
|
|
9
|
+
logInLatitude?: string;
|
|
10
|
+
logInLongitude?: string;
|
|
11
|
+
logOutLatitude?: string;
|
|
12
|
+
logOutLongitude?: string;
|
|
13
|
+
logInAddresss?: string;
|
|
14
|
+
logOutAddress?: string;
|
|
15
|
+
logInState?: string;
|
|
16
|
+
logOutState?: string;
|
|
17
|
+
logInCity?: string;
|
|
18
|
+
logOutCity?: string;
|
|
19
|
+
sessionId?: string;
|
|
20
|
+
status?: number;
|
|
21
|
+
created_at: Date;
|
|
22
|
+
updated_at: Date;
|
|
23
|
+
log_type?: LogType;
|
|
24
|
+
user?: Users;
|
|
25
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
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.AttendanceDetails = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const Users_1 = require("./Users");
|
|
15
|
+
const LogType_1 = require("./Enum/LogType");
|
|
16
|
+
let AttendanceDetails = class AttendanceDetails extends typeorm_1.BaseEntity {
|
|
17
|
+
};
|
|
18
|
+
exports.AttendanceDetails = AttendanceDetails;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({ type: 'bigint', name: 'id' }),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], AttendanceDetails.prototype, "id", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)('bigint', { name: 'user_id', nullable: true }),
|
|
25
|
+
__metadata("design:type", Object)
|
|
26
|
+
], AttendanceDetails.prototype, "userId", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)('timestamp', { name: 'log_in_time', nullable: true }),
|
|
29
|
+
__metadata("design:type", Date)
|
|
30
|
+
], AttendanceDetails.prototype, "logInTime", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)('timestamp', { name: 'log_out_time', nullable: true }),
|
|
33
|
+
__metadata("design:type", Date)
|
|
34
|
+
], AttendanceDetails.prototype, "logOutTime", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)('varchar', { name: 'log_in_latitude', nullable: true, length: 255 }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], AttendanceDetails.prototype, "logInLatitude", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)('varchar', { name: 'log_in_longitude', nullable: true, length: 255 }),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], AttendanceDetails.prototype, "logInLongitude", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)('varchar', { name: 'log_out_latitude', nullable: true, length: 255 }),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], AttendanceDetails.prototype, "logOutLatitude", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)('varchar', { name: 'log_out_longitude', nullable: true, length: 255 }),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], AttendanceDetails.prototype, "logOutLongitude", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, typeorm_1.Column)('varchar', { name: 'log_in_addresss', nullable: true, length: 255 }),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], AttendanceDetails.prototype, "logInAddresss", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.Column)('varchar', { name: 'log_out_address', nullable: true, length: 255 }),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], AttendanceDetails.prototype, "logOutAddress", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.Column)('varchar', { name: 'log_in_state', nullable: true, length: 255 }),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], AttendanceDetails.prototype, "logInState", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.Column)('varchar', { name: 'log_out_state', nullable: true, length: 255 }),
|
|
65
|
+
__metadata("design:type", String)
|
|
66
|
+
], AttendanceDetails.prototype, "logOutState", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.Column)('varchar', { name: 'log_in_city', nullable: true, length: 255 }),
|
|
69
|
+
__metadata("design:type", String)
|
|
70
|
+
], AttendanceDetails.prototype, "logInCity", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, typeorm_1.Column)('varchar', { name: 'log_out_city', nullable: true, length: 255 }),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], AttendanceDetails.prototype, "logOutCity", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, typeorm_1.Column)('varchar', { name: 'session_id', nullable: true, length: 255 }),
|
|
77
|
+
__metadata("design:type", String)
|
|
78
|
+
], AttendanceDetails.prototype, "sessionId", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, typeorm_1.Column)('tinyint', { name: 'status', nullable: true }),
|
|
81
|
+
__metadata("design:type", Number)
|
|
82
|
+
], AttendanceDetails.prototype, "status", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, typeorm_1.CreateDateColumn)({ type: 'datetime' }),
|
|
85
|
+
__metadata("design:type", Date)
|
|
86
|
+
], AttendanceDetails.prototype, "created_at", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, typeorm_1.UpdateDateColumn)({ type: 'datetime' }),
|
|
89
|
+
__metadata("design:type", Date)
|
|
90
|
+
], AttendanceDetails.prototype, "updated_at", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, typeorm_1.Column)({
|
|
93
|
+
type: 'enum',
|
|
94
|
+
enum: LogType_1.LogType,
|
|
95
|
+
default: LogType_1.LogType.NOTACTIVE,
|
|
96
|
+
}),
|
|
97
|
+
__metadata("design:type", String)
|
|
98
|
+
], AttendanceDetails.prototype, "log_type", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, typeorm_1.ManyToOne)(() => Users_1.Users, (users) => users.attendanceDetails, {
|
|
101
|
+
onDelete: 'NO ACTION',
|
|
102
|
+
onUpdate: 'NO ACTION',
|
|
103
|
+
}),
|
|
104
|
+
(0, typeorm_1.JoinColumn)([{ name: 'user_id', referencedColumnName: 'id' }]),
|
|
105
|
+
__metadata("design:type", Users_1.Users)
|
|
106
|
+
], AttendanceDetails.prototype, "user", void 0);
|
|
107
|
+
exports.AttendanceDetails = AttendanceDetails = __decorate([
|
|
108
|
+
(0, typeorm_1.Index)('fk_attendance_details_1_idx', ['userId'], {}),
|
|
109
|
+
(0, typeorm_1.Index)('IDX_attendance_details_log_in_time', ['logInTime']),
|
|
110
|
+
(0, typeorm_1.Entity)('attendance_details')
|
|
111
|
+
], AttendanceDetails);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { BaseEntity } from 'typeorm';
|
|
2
|
+
import { BeatPlanVisits } from './BeatPlanVisits';
|
|
3
|
+
import { Users } from './Users';
|
|
4
|
+
import { BeatPlanLogType } from './Enum/LogType';
|
|
5
|
+
import { Attachement } from './Attachments';
|
|
6
|
+
export declare class BeatPlanCheckins extends BaseEntity {
|
|
7
|
+
id: string;
|
|
8
|
+
beat_plan_visit_id: string;
|
|
9
|
+
user_id: string;
|
|
10
|
+
check_in_latitude: number;
|
|
11
|
+
check_in_longitude: number;
|
|
12
|
+
check_out_latitude?: number;
|
|
13
|
+
check_out_longitude?: number;
|
|
14
|
+
check_in_time: Date;
|
|
15
|
+
check_out_time?: Date;
|
|
16
|
+
remarks?: string;
|
|
17
|
+
type: BeatPlanLogType;
|
|
18
|
+
created_at: Date;
|
|
19
|
+
updatedAt: Date;
|
|
20
|
+
beatPlanVisit: BeatPlanVisits;
|
|
21
|
+
user: Users;
|
|
22
|
+
attachment: Attachement;
|
|
23
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
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.BeatPlanCheckins = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BeatPlanVisits_1 = require("./BeatPlanVisits");
|
|
15
|
+
const Users_1 = require("./Users");
|
|
16
|
+
const LogType_1 = require("./Enum/LogType");
|
|
17
|
+
const Attachments_1 = require("./Attachments");
|
|
18
|
+
let BeatPlanCheckins = class BeatPlanCheckins extends typeorm_1.BaseEntity {
|
|
19
|
+
};
|
|
20
|
+
exports.BeatPlanCheckins = BeatPlanCheckins;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({ type: 'bigint' }),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], BeatPlanCheckins.prototype, "id", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)({ type: 'string', nullable: false }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], BeatPlanCheckins.prototype, "beat_plan_visit_id", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ type: 'string', nullable: false }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], BeatPlanCheckins.prototype, "user_id", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 8 }),
|
|
35
|
+
__metadata("design:type", Number)
|
|
36
|
+
], BeatPlanCheckins.prototype, "check_in_latitude", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 8 }),
|
|
39
|
+
__metadata("design:type", Number)
|
|
40
|
+
], BeatPlanCheckins.prototype, "check_in_longitude", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 8, nullable: true }),
|
|
43
|
+
__metadata("design:type", Number)
|
|
44
|
+
], BeatPlanCheckins.prototype, "check_out_latitude", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 8, nullable: true }),
|
|
47
|
+
__metadata("design:type", Number)
|
|
48
|
+
], BeatPlanCheckins.prototype, "check_out_longitude", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({ type: 'datetime' }),
|
|
51
|
+
__metadata("design:type", Date)
|
|
52
|
+
], BeatPlanCheckins.prototype, "check_in_time", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({ type: 'datetime', nullable: true }),
|
|
55
|
+
__metadata("design:type", Date)
|
|
56
|
+
], BeatPlanCheckins.prototype, "check_out_time", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], BeatPlanCheckins.prototype, "remarks", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.Column)({
|
|
63
|
+
type: 'enum',
|
|
64
|
+
enum: LogType_1.BeatPlanLogType,
|
|
65
|
+
default: null,
|
|
66
|
+
nullable: true,
|
|
67
|
+
}),
|
|
68
|
+
__metadata("design:type", String)
|
|
69
|
+
], BeatPlanCheckins.prototype, "type", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, typeorm_1.CreateDateColumn)({ type: 'datetime' }),
|
|
72
|
+
__metadata("design:type", Date)
|
|
73
|
+
], BeatPlanCheckins.prototype, "created_at", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, typeorm_1.UpdateDateColumn)({ name: 'updated_at', type: 'datetime' }),
|
|
76
|
+
__metadata("design:type", Date)
|
|
77
|
+
], BeatPlanCheckins.prototype, "updatedAt", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, typeorm_1.ManyToOne)(() => BeatPlanVisits_1.BeatPlanVisits, (visit) => visit.checkins),
|
|
80
|
+
(0, typeorm_1.JoinColumn)({ name: 'beat_plan_visit_id' }),
|
|
81
|
+
__metadata("design:type", BeatPlanVisits_1.BeatPlanVisits)
|
|
82
|
+
], BeatPlanCheckins.prototype, "beatPlanVisit", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, typeorm_1.ManyToOne)(() => Users_1.Users, (user) => user.beatPlanCheckins),
|
|
85
|
+
(0, typeorm_1.JoinColumn)({ name: 'user_id' }),
|
|
86
|
+
__metadata("design:type", Users_1.Users)
|
|
87
|
+
], BeatPlanCheckins.prototype, "user", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, typeorm_1.OneToMany)(() => Attachments_1.Attachement, (attachement) => attachement.beatPlanCheckIns),
|
|
90
|
+
__metadata("design:type", Attachments_1.Attachement)
|
|
91
|
+
], BeatPlanCheckins.prototype, "attachment", void 0);
|
|
92
|
+
exports.BeatPlanCheckins = BeatPlanCheckins = __decorate([
|
|
93
|
+
(0, typeorm_1.Entity)({ name: 'beat_plan_checkins' }),
|
|
94
|
+
(0, typeorm_1.Index)('IDX_beat_plan_checkins_user_checkout', ['user_id', 'check_out_time']),
|
|
95
|
+
(0, typeorm_1.Index)('IDX_beat_plan_checkins_visit', ['beat_plan_visit_id'])
|
|
96
|
+
], BeatPlanCheckins);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BaseEntity } from 'typeorm';
|
|
2
|
+
import { Stores } from './Stores';
|
|
3
|
+
import { Users } from './Users';
|
|
4
|
+
import { Brands } from './Brands';
|
|
5
|
+
import { BeatPlanCheckins } from './BeatPlanCheckIns';
|
|
6
|
+
import { StockRequest } from './StockRequest';
|
|
7
|
+
export declare class BeatPlanVisits extends BaseEntity {
|
|
8
|
+
id: string;
|
|
9
|
+
storeId: string;
|
|
10
|
+
assignedBy: string;
|
|
11
|
+
assignedTo: string;
|
|
12
|
+
visitDate: Date | string;
|
|
13
|
+
visitStartTime: string;
|
|
14
|
+
visitEndTime: string;
|
|
15
|
+
status?: number;
|
|
16
|
+
checkInTime?: Date;
|
|
17
|
+
checkOutTime?: Date;
|
|
18
|
+
remarks?: string;
|
|
19
|
+
brandId: string;
|
|
20
|
+
createdAt: Date;
|
|
21
|
+
updatedAt: Date;
|
|
22
|
+
store: Stores;
|
|
23
|
+
assignedToUser: Users;
|
|
24
|
+
assignedByUser: Users;
|
|
25
|
+
brand: Brands;
|
|
26
|
+
stockRequests: StockRequest[];
|
|
27
|
+
checkins: BeatPlanCheckins[];
|
|
28
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
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.BeatPlanVisits = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const Stores_1 = require("./Stores");
|
|
15
|
+
const Users_1 = require("./Users");
|
|
16
|
+
const Brands_1 = require("./Brands");
|
|
17
|
+
const BeatPlanCheckIns_1 = require("./BeatPlanCheckIns");
|
|
18
|
+
const StockRequest_1 = require("./StockRequest");
|
|
19
|
+
let BeatPlanVisits = class BeatPlanVisits extends typeorm_1.BaseEntity {
|
|
20
|
+
};
|
|
21
|
+
exports.BeatPlanVisits = BeatPlanVisits;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({ type: 'bigint' }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], BeatPlanVisits.prototype, "id", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)({ name: 'store_id', type: 'bigint', nullable: false }),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], BeatPlanVisits.prototype, "storeId", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({ name: 'assigned_by', type: 'bigint', nullable: false }),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], BeatPlanVisits.prototype, "assignedBy", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ name: 'assigned_to', type: 'bigint', nullable: false }),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], BeatPlanVisits.prototype, "assignedTo", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ name: 'visit_date', type: 'date' }),
|
|
40
|
+
__metadata("design:type", Object)
|
|
41
|
+
], BeatPlanVisits.prototype, "visitDate", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ name: 'visit_start_time', type: 'time' }),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], BeatPlanVisits.prototype, "visitStartTime", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ name: 'visit_end_time', type: 'time' }),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], BeatPlanVisits.prototype, "visitEndTime", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({ type: 'tinyint', default: 0 }),
|
|
52
|
+
__metadata("design:type", Number)
|
|
53
|
+
], BeatPlanVisits.prototype, "status", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({ name: 'check_in_time', type: 'datetime', nullable: true }),
|
|
56
|
+
__metadata("design:type", Date)
|
|
57
|
+
], BeatPlanVisits.prototype, "checkInTime", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({ name: 'check_out_time', type: 'datetime', nullable: true }),
|
|
60
|
+
__metadata("design:type", Date)
|
|
61
|
+
], BeatPlanVisits.prototype, "checkOutTime", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
64
|
+
__metadata("design:type", String)
|
|
65
|
+
], BeatPlanVisits.prototype, "remarks", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, typeorm_1.Column)({ name: 'brand_id', type: 'bigint', nullable: false }),
|
|
68
|
+
__metadata("design:type", String)
|
|
69
|
+
], BeatPlanVisits.prototype, "brandId", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, typeorm_1.CreateDateColumn)({ name: 'created_at', type: 'datetime' }),
|
|
72
|
+
__metadata("design:type", Date)
|
|
73
|
+
], BeatPlanVisits.prototype, "createdAt", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, typeorm_1.UpdateDateColumn)({ name: 'updated_at', type: 'datetime' }),
|
|
76
|
+
__metadata("design:type", Date)
|
|
77
|
+
], BeatPlanVisits.prototype, "updatedAt", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, typeorm_1.ManyToOne)(() => Stores_1.Stores, (store) => store.beatPlanVisit),
|
|
80
|
+
(0, typeorm_1.JoinColumn)({ name: 'store_id' }),
|
|
81
|
+
__metadata("design:type", Stores_1.Stores)
|
|
82
|
+
], BeatPlanVisits.prototype, "store", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, typeorm_1.ManyToOne)(() => Users_1.Users, (user) => user.beatPlanVisitsAssignedTo),
|
|
85
|
+
(0, typeorm_1.JoinColumn)({ name: 'assigned_to' }),
|
|
86
|
+
__metadata("design:type", Users_1.Users)
|
|
87
|
+
], BeatPlanVisits.prototype, "assignedToUser", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, typeorm_1.ManyToOne)(() => Users_1.Users, (user) => user.beatPlanVisitsAssignedBy),
|
|
90
|
+
(0, typeorm_1.JoinColumn)({ name: 'assigned_by' }),
|
|
91
|
+
__metadata("design:type", Users_1.Users)
|
|
92
|
+
], BeatPlanVisits.prototype, "assignedByUser", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, typeorm_1.ManyToOne)(() => Brands_1.Brands, (brand) => brand.visits),
|
|
95
|
+
(0, typeorm_1.JoinColumn)({ name: 'brand_id' }),
|
|
96
|
+
__metadata("design:type", Brands_1.Brands)
|
|
97
|
+
], BeatPlanVisits.prototype, "brand", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, typeorm_1.OneToMany)(() => StockRequest_1.StockRequest, (stockRequest) => stockRequest.beatPlanVisit),
|
|
100
|
+
__metadata("design:type", Array)
|
|
101
|
+
], BeatPlanVisits.prototype, "stockRequests", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, typeorm_1.OneToMany)(() => BeatPlanCheckIns_1.BeatPlanCheckins, (checkin) => checkin.beatPlanVisit),
|
|
104
|
+
__metadata("design:type", Array)
|
|
105
|
+
], BeatPlanVisits.prototype, "checkins", void 0);
|
|
106
|
+
exports.BeatPlanVisits = BeatPlanVisits = __decorate([
|
|
107
|
+
(0, typeorm_1.Entity)({ name: 'beat_plan_visits' }),
|
|
108
|
+
(0, typeorm_1.Index)('IDX_beat_plan_visits_assigned_date_start', ['assignedTo', 'visitDate', 'visitStartTime'])
|
|
109
|
+
], BeatPlanVisits);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseEntity } from 'typeorm';
|
|
2
|
+
import { Users } from './Users';
|
|
3
|
+
import { Brands } from './Brands';
|
|
4
|
+
export declare class BranchManagerBrandsMappings extends BaseEntity {
|
|
5
|
+
id: string;
|
|
6
|
+
status?: number;
|
|
7
|
+
created_at: Date;
|
|
8
|
+
updated_at: Date;
|
|
9
|
+
branchManager: Users;
|
|
10
|
+
brands: Brands;
|
|
11
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
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.BranchManagerBrandsMappings = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const Users_1 = require("./Users");
|
|
15
|
+
const Brands_1 = require("./Brands");
|
|
16
|
+
let BranchManagerBrandsMappings = class BranchManagerBrandsMappings extends typeorm_1.BaseEntity {
|
|
17
|
+
};
|
|
18
|
+
exports.BranchManagerBrandsMappings = BranchManagerBrandsMappings;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({ type: 'bigint', name: 'id' }),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], BranchManagerBrandsMappings.prototype, "id", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)('tinyint', { name: 'status', nullable: true, default: 0 }),
|
|
25
|
+
__metadata("design:type", Number)
|
|
26
|
+
], BranchManagerBrandsMappings.prototype, "status", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.CreateDateColumn)({ type: 'datetime' }),
|
|
29
|
+
__metadata("design:type", Date)
|
|
30
|
+
], BranchManagerBrandsMappings.prototype, "created_at", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.UpdateDateColumn)({ type: 'datetime' }),
|
|
33
|
+
__metadata("design:type", Date)
|
|
34
|
+
], BranchManagerBrandsMappings.prototype, "updated_at", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.ManyToOne)(() => Users_1.Users, (users) => users.branchManagerBrandsMappings, {
|
|
37
|
+
onDelete: 'NO ACTION',
|
|
38
|
+
onUpdate: 'NO ACTION',
|
|
39
|
+
}),
|
|
40
|
+
(0, typeorm_1.JoinColumn)([{ name: 'branch_manager_id', referencedColumnName: 'id' }]),
|
|
41
|
+
__metadata("design:type", Users_1.Users)
|
|
42
|
+
], BranchManagerBrandsMappings.prototype, "branchManager", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.ManyToOne)(() => Brands_1.Brands, (brands) => brands.branchManagerBrandsMappings, {
|
|
45
|
+
onDelete: 'NO ACTION',
|
|
46
|
+
onUpdate: 'NO ACTION',
|
|
47
|
+
}),
|
|
48
|
+
(0, typeorm_1.JoinColumn)([{ name: 'brands_id', referencedColumnName: 'id' }]),
|
|
49
|
+
__metadata("design:type", Brands_1.Brands)
|
|
50
|
+
], BranchManagerBrandsMappings.prototype, "brands", void 0);
|
|
51
|
+
exports.BranchManagerBrandsMappings = BranchManagerBrandsMappings = __decorate([
|
|
52
|
+
(0, typeorm_1.Entity)('branch_manager_brands_mappings')
|
|
53
|
+
], BranchManagerBrandsMappings);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseEntity } from 'typeorm';
|
|
2
|
+
import { Users } from './Users';
|
|
3
|
+
export declare class BranchManagerMerchandiserMappings extends BaseEntity {
|
|
4
|
+
id: string;
|
|
5
|
+
branchManagerId: string;
|
|
6
|
+
merchandiserId: string;
|
|
7
|
+
status?: number;
|
|
8
|
+
created_at: Date;
|
|
9
|
+
updated_at: Date;
|
|
10
|
+
merchandiser: Users;
|
|
11
|
+
branchManager: Users;
|
|
12
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
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.BranchManagerMerchandiserMappings = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const Users_1 = require("./Users");
|
|
15
|
+
let BranchManagerMerchandiserMappings = class BranchManagerMerchandiserMappings extends typeorm_1.BaseEntity {
|
|
16
|
+
};
|
|
17
|
+
exports.BranchManagerMerchandiserMappings = BranchManagerMerchandiserMappings;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, typeorm_1.PrimaryGeneratedColumn)({ type: 'bigint', name: 'id' }),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], BranchManagerMerchandiserMappings.prototype, "id", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.Column)('bigint', { name: 'branch_manager_id', nullable: false }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], BranchManagerMerchandiserMappings.prototype, "branchManagerId", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)('bigint', { name: 'merchandiser_id', nullable: false }),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], BranchManagerMerchandiserMappings.prototype, "merchandiserId", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)('tinyint', { name: 'status', nullable: true, default: 0 }),
|
|
32
|
+
__metadata("design:type", Number)
|
|
33
|
+
], BranchManagerMerchandiserMappings.prototype, "status", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.CreateDateColumn)({ type: 'datetime' }),
|
|
36
|
+
__metadata("design:type", Date)
|
|
37
|
+
], BranchManagerMerchandiserMappings.prototype, "created_at", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.UpdateDateColumn)({ type: 'datetime' }),
|
|
40
|
+
__metadata("design:type", Date)
|
|
41
|
+
], BranchManagerMerchandiserMappings.prototype, "updated_at", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.ManyToOne)(() => Users_1.Users, (users) => users.merchandiserMappings, {
|
|
44
|
+
onDelete: 'NO ACTION',
|
|
45
|
+
onUpdate: 'NO ACTION',
|
|
46
|
+
}),
|
|
47
|
+
(0, typeorm_1.JoinColumn)([{ name: 'merchandiser_id', referencedColumnName: 'id' }]),
|
|
48
|
+
__metadata("design:type", Users_1.Users)
|
|
49
|
+
], BranchManagerMerchandiserMappings.prototype, "merchandiser", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.ManyToOne)(() => Users_1.Users, (users) => users.branchManagerMappings, {
|
|
52
|
+
onDelete: 'NO ACTION',
|
|
53
|
+
onUpdate: 'NO ACTION',
|
|
54
|
+
}),
|
|
55
|
+
(0, typeorm_1.JoinColumn)([{ name: 'branch_manager_id', referencedColumnName: 'id' }]),
|
|
56
|
+
__metadata("design:type", Users_1.Users)
|
|
57
|
+
], BranchManagerMerchandiserMappings.prototype, "branchManager", void 0);
|
|
58
|
+
exports.BranchManagerMerchandiserMappings = BranchManagerMerchandiserMappings = __decorate([
|
|
59
|
+
(0, typeorm_1.Index)('branch_manager_merchandiser_ibfk_1', ['merchandiserId'], {}),
|
|
60
|
+
(0, typeorm_1.Index)('branch_manager_merchandiser_ibfk_2', ['branchManagerId'], {}),
|
|
61
|
+
(0, typeorm_1.Entity)('branch_manager_merchandiser_mappings')
|
|
62
|
+
], BranchManagerMerchandiserMappings);
|
|
63
|
+
// @ManyToOne(() => Users, (users) => users.branchManagerMappings, {
|
|
64
|
+
// onDelete: "CASCADE",
|
|
65
|
+
// onUpdate: "CASCADE",
|
|
66
|
+
// })
|
|
67
|
+
// @JoinColumn([{ name: "branch_manager_id", referencedColumnName: "id" }])
|
|
68
|
+
// branchManager!: Users;
|
|
69
|
+
// // ✅ Corrected ManyToOne relation with Users (Merchandiser)
|
|
70
|
+
// @ManyToOne(() => Users, (users) => users.merchandiserMappings, {
|
|
71
|
+
// onDelete: "CASCADE",
|
|
72
|
+
// onUpdate: "CASCADE",
|
|
73
|
+
// })
|
|
74
|
+
// @JoinColumn([{ name: "merchandiser_id", referencedColumnName: "id" }])
|
|
75
|
+
// merchandiser!: Users;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseEntity } from 'typeorm';
|
|
2
|
+
import { Brands } from './Brands';
|
|
3
|
+
import { Catagory } from './Category';
|
|
4
|
+
export declare class BrandWiseCategory extends BaseEntity {
|
|
5
|
+
id: number;
|
|
6
|
+
brand: Brands[];
|
|
7
|
+
subCategoryProducts: Catagory;
|
|
8
|
+
created_at: Date;
|
|
9
|
+
updated_at: Date;
|
|
10
|
+
}
|