@new-hros/libs-sql 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/company.entity.d.ts +19 -20
- package/dist/common/company.entity.js +67 -72
- package/dist/common/company.entity.js.map +1 -1
- package/dist/common/department.entity.d.ts +11 -5
- package/dist/common/department.entity.js +53 -18
- package/dist/common/department.entity.js.map +1 -1
- package/dist/common/enums.d.ts +9 -0
- package/dist/common/enums.js +15 -0
- package/dist/common/enums.js.map +1 -0
- package/dist/common/grade.entity.d.ts +11 -1
- package/dist/common/grade.entity.js +55 -3
- package/dist/common/grade.entity.js.map +1 -1
- package/dist/common/index.d.ts +1 -0
- package/dist/common/index.js +1 -0
- package/dist/common/index.js.map +1 -1
- package/dist/common/job-title.entity.d.ts +10 -1
- package/dist/common/job-title.entity.js +52 -5
- package/dist/common/job-title.entity.js.map +1 -1
- package/dist/common/location.entity.d.ts +11 -12
- package/dist/common/location.entity.js +47 -51
- package/dist/common/location.entity.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,30 +1,29 @@
|
|
|
1
1
|
import { BaseEntity } from '../base.entity';
|
|
2
|
+
import { CompanyStatus } from './enums';
|
|
2
3
|
import { Department } from './department.entity';
|
|
3
4
|
import { Grade } from './grade.entity';
|
|
4
5
|
import { JobTitle } from './job-title.entity';
|
|
5
6
|
import { Location } from './location.entity';
|
|
6
7
|
export declare class Company extends BaseEntity {
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
tenantId?: string;
|
|
9
|
+
companyCode: string;
|
|
9
10
|
legalName: string;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
holding?: Company | null;
|
|
27
|
-
subsidiaries?: Company[];
|
|
11
|
+
displayName?: string | null;
|
|
12
|
+
status: CompanyStatus;
|
|
13
|
+
isTemplate: boolean;
|
|
14
|
+
registrationNumber?: string | null;
|
|
15
|
+
taxRegistrationNumber?: string | null;
|
|
16
|
+
countryCode?: string | null;
|
|
17
|
+
legalAddress?: Record<string, unknown> | null;
|
|
18
|
+
timezone: string;
|
|
19
|
+
locale?: string | null;
|
|
20
|
+
currencyCode?: string | null;
|
|
21
|
+
informationCompletedAt?: Date | null;
|
|
22
|
+
informationCompletedBy?: string | null;
|
|
23
|
+
activatedAt?: Date | null;
|
|
24
|
+
activatedBy?: string | null;
|
|
25
|
+
createdBy?: string | null;
|
|
26
|
+
updatedBy?: string | null;
|
|
28
27
|
departments?: Department[];
|
|
29
28
|
locations?: Location[];
|
|
30
29
|
grades?: Grade[];
|
|
@@ -12,32 +12,31 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.Company = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const base_entity_1 = require("../base.entity");
|
|
15
|
+
const enums_1 = require("./enums");
|
|
15
16
|
const department_entity_1 = require("./department.entity");
|
|
16
17
|
const grade_entity_1 = require("./grade.entity");
|
|
17
18
|
const job_title_entity_1 = require("./job-title.entity");
|
|
18
19
|
const location_entity_1 = require("./location.entity");
|
|
19
20
|
let Company = class Company extends base_entity_1.BaseEntity {
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
tenantId;
|
|
22
|
+
companyCode;
|
|
22
23
|
legalName;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
holding;
|
|
40
|
-
subsidiaries;
|
|
24
|
+
displayName;
|
|
25
|
+
status;
|
|
26
|
+
isTemplate;
|
|
27
|
+
registrationNumber;
|
|
28
|
+
taxRegistrationNumber;
|
|
29
|
+
countryCode;
|
|
30
|
+
legalAddress;
|
|
31
|
+
timezone;
|
|
32
|
+
locale;
|
|
33
|
+
currencyCode;
|
|
34
|
+
informationCompletedAt;
|
|
35
|
+
informationCompletedBy;
|
|
36
|
+
activatedAt;
|
|
37
|
+
activatedBy;
|
|
38
|
+
createdBy;
|
|
39
|
+
updatedBy;
|
|
41
40
|
departments;
|
|
42
41
|
locations;
|
|
43
42
|
grades;
|
|
@@ -45,91 +44,87 @@ let Company = class Company extends base_entity_1.BaseEntity {
|
|
|
45
44
|
};
|
|
46
45
|
exports.Company = Company;
|
|
47
46
|
__decorate([
|
|
48
|
-
(0, typeorm_1.Column)({ name: '
|
|
47
|
+
(0, typeorm_1.Column)({ name: 'tenant_id', type: 'uuid', nullable: true }),
|
|
49
48
|
__metadata("design:type", String)
|
|
50
|
-
], Company.prototype, "
|
|
49
|
+
], Company.prototype, "tenantId", void 0);
|
|
51
50
|
__decorate([
|
|
52
|
-
(0, typeorm_1.
|
|
53
|
-
(0, typeorm_1.Column)({ name: 'status', type: 'varchar', length: 32, default: 'pending' }),
|
|
51
|
+
(0, typeorm_1.Column)({ name: 'company_code', type: 'varchar', length: 64 }),
|
|
54
52
|
__metadata("design:type", String)
|
|
55
|
-
], Company.prototype, "
|
|
53
|
+
], Company.prototype, "companyCode", void 0);
|
|
56
54
|
__decorate([
|
|
57
55
|
(0, typeorm_1.Column)({ name: 'legal_name', type: 'varchar', length: 255 }),
|
|
58
56
|
__metadata("design:type", String)
|
|
59
57
|
], Company.prototype, "legalName", void 0);
|
|
60
58
|
__decorate([
|
|
61
|
-
(0, typeorm_1.Column)({ name: '
|
|
62
|
-
__metadata("design:type",
|
|
63
|
-
], Company.prototype, "
|
|
64
|
-
__decorate([
|
|
65
|
-
(0, typeorm_1.Column)({ name: 'tax_id', type: 'varchar', length: 100 }),
|
|
66
|
-
__metadata("design:type", String)
|
|
67
|
-
], Company.prototype, "taxId", void 0);
|
|
68
|
-
__decorate([
|
|
69
|
-
(0, typeorm_1.Column)({ name: 'website', type: 'varchar', length: 255 }),
|
|
70
|
-
__metadata("design:type", String)
|
|
71
|
-
], Company.prototype, "website", void 0);
|
|
59
|
+
(0, typeorm_1.Column)({ name: 'display_name', type: 'varchar', length: 255, nullable: true }),
|
|
60
|
+
__metadata("design:type", Object)
|
|
61
|
+
], Company.prototype, "displayName", void 0);
|
|
72
62
|
__decorate([
|
|
73
|
-
(0, typeorm_1.
|
|
63
|
+
(0, typeorm_1.Index)('idx_company_status'),
|
|
64
|
+
(0, typeorm_1.Column)({
|
|
65
|
+
name: 'status',
|
|
66
|
+
type: 'varchar',
|
|
67
|
+
length: 32,
|
|
68
|
+
default: enums_1.CompanyStatus.PENDING,
|
|
69
|
+
}),
|
|
74
70
|
__metadata("design:type", String)
|
|
75
|
-
], Company.prototype, "
|
|
71
|
+
], Company.prototype, "status", void 0);
|
|
76
72
|
__decorate([
|
|
77
|
-
(0, typeorm_1.Column)({ name: '
|
|
78
|
-
__metadata("design:type",
|
|
79
|
-
], Company.prototype, "
|
|
73
|
+
(0, typeorm_1.Column)({ name: 'is_template', type: 'boolean', default: false }),
|
|
74
|
+
__metadata("design:type", Boolean)
|
|
75
|
+
], Company.prototype, "isTemplate", void 0);
|
|
80
76
|
__decorate([
|
|
81
|
-
(0, typeorm_1.Column)({ name: '
|
|
82
|
-
__metadata("design:type",
|
|
83
|
-
], Company.prototype, "
|
|
84
|
-
__decorate([
|
|
85
|
-
(0, typeorm_1.Column)({ name: 'founded_date', type: 'date' }),
|
|
86
|
-
__metadata("design:type", Date)
|
|
87
|
-
], Company.prototype, "foundedDate", void 0);
|
|
77
|
+
(0, typeorm_1.Column)({ name: 'registration_number', type: 'varchar', length: 128, nullable: true }),
|
|
78
|
+
__metadata("design:type", Object)
|
|
79
|
+
], Company.prototype, "registrationNumber", void 0);
|
|
88
80
|
__decorate([
|
|
89
|
-
(0, typeorm_1.Column)({ name: '
|
|
81
|
+
(0, typeorm_1.Column)({ name: 'tax_registration_number', type: 'varchar', length: 128, nullable: true }),
|
|
90
82
|
__metadata("design:type", Object)
|
|
91
|
-
], Company.prototype, "
|
|
83
|
+
], Company.prototype, "taxRegistrationNumber", void 0);
|
|
92
84
|
__decorate([
|
|
93
|
-
(0, typeorm_1.Column)({ name: '
|
|
85
|
+
(0, typeorm_1.Column)({ name: 'country_code', type: 'char', length: 2, nullable: true }),
|
|
94
86
|
__metadata("design:type", Object)
|
|
95
|
-
], Company.prototype, "
|
|
87
|
+
], Company.prototype, "countryCode", void 0);
|
|
96
88
|
__decorate([
|
|
97
|
-
(0, typeorm_1.Column)({ name: '
|
|
89
|
+
(0, typeorm_1.Column)({ name: 'legal_address', type: 'jsonb', nullable: true }),
|
|
98
90
|
__metadata("design:type", Object)
|
|
99
|
-
], Company.prototype, "
|
|
91
|
+
], Company.prototype, "legalAddress", void 0);
|
|
100
92
|
__decorate([
|
|
101
|
-
(0, typeorm_1.Column)({ name: '
|
|
93
|
+
(0, typeorm_1.Column)({ name: 'timezone', type: 'varchar', length: 64, default: 'UTC' }),
|
|
94
|
+
__metadata("design:type", String)
|
|
95
|
+
], Company.prototype, "timezone", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
(0, typeorm_1.Column)({ name: 'locale', type: 'varchar', length: 32, nullable: true }),
|
|
102
98
|
__metadata("design:type", Object)
|
|
103
|
-
], Company.prototype, "
|
|
99
|
+
], Company.prototype, "locale", void 0);
|
|
104
100
|
__decorate([
|
|
105
|
-
(0, typeorm_1.Column)({ name: '
|
|
101
|
+
(0, typeorm_1.Column)({ name: 'currency_code', type: 'char', length: 3, nullable: true }),
|
|
106
102
|
__metadata("design:type", Object)
|
|
107
|
-
], Company.prototype, "
|
|
103
|
+
], Company.prototype, "currencyCode", void 0);
|
|
108
104
|
__decorate([
|
|
109
|
-
(0, typeorm_1.Column)({ name: '
|
|
105
|
+
(0, typeorm_1.Column)({ name: 'information_completed_at', type: 'timestamptz', nullable: true }),
|
|
110
106
|
__metadata("design:type", Object)
|
|
111
|
-
], Company.prototype, "
|
|
107
|
+
], Company.prototype, "informationCompletedAt", void 0);
|
|
112
108
|
__decorate([
|
|
113
|
-
(0, typeorm_1.Column)({ name: '
|
|
109
|
+
(0, typeorm_1.Column)({ name: 'information_completed_by', type: 'uuid', nullable: true }),
|
|
114
110
|
__metadata("design:type", Object)
|
|
115
|
-
], Company.prototype, "
|
|
111
|
+
], Company.prototype, "informationCompletedBy", void 0);
|
|
116
112
|
__decorate([
|
|
117
|
-
(0, typeorm_1.Column)({ name: '
|
|
113
|
+
(0, typeorm_1.Column)({ name: 'activated_at', type: 'timestamptz', nullable: true }),
|
|
118
114
|
__metadata("design:type", Object)
|
|
119
|
-
], Company.prototype, "
|
|
115
|
+
], Company.prototype, "activatedAt", void 0);
|
|
120
116
|
__decorate([
|
|
121
|
-
(0, typeorm_1.Column)({ name: '
|
|
117
|
+
(0, typeorm_1.Column)({ name: 'activated_by', type: 'uuid', nullable: true }),
|
|
122
118
|
__metadata("design:type", Object)
|
|
123
|
-
], Company.prototype, "
|
|
119
|
+
], Company.prototype, "activatedBy", void 0);
|
|
124
120
|
__decorate([
|
|
125
|
-
(0, typeorm_1.
|
|
126
|
-
(0, typeorm_1.JoinColumn)({ name: 'holding_id' }),
|
|
121
|
+
(0, typeorm_1.Column)({ name: 'created_by', type: 'uuid', nullable: true }),
|
|
127
122
|
__metadata("design:type", Object)
|
|
128
|
-
], Company.prototype, "
|
|
123
|
+
], Company.prototype, "createdBy", void 0);
|
|
129
124
|
__decorate([
|
|
130
|
-
(0, typeorm_1.
|
|
131
|
-
__metadata("design:type",
|
|
132
|
-
], Company.prototype, "
|
|
125
|
+
(0, typeorm_1.Column)({ name: 'updated_by', type: 'uuid', nullable: true }),
|
|
126
|
+
__metadata("design:type", Object)
|
|
127
|
+
], Company.prototype, "updatedBy", void 0);
|
|
133
128
|
__decorate([
|
|
134
129
|
(0, typeorm_1.OneToMany)(() => department_entity_1.Department, (dept) => dept.company),
|
|
135
130
|
__metadata("design:type", Array)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"company.entity.js","sourceRoot":"","sources":["../../src/common/company.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"company.entity.js","sourceRoot":"","sources":["../../src/common/company.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAKiB;AACjB,gDAA4C;AAC5C,mCAAwC;AACxC,2DAAiD;AACjD,iDAAuC;AACvC,yDAA8C;AAC9C,uDAA6C;AAGtC,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,wBAAU;IAErC,QAAQ,CAAU;IAGlB,WAAW,CAAS;IAGpB,SAAS,CAAS;IAGlB,WAAW,CAAiB;IAS5B,MAAM,CAAgB;IAGtB,UAAU,CAAU;IAGpB,kBAAkB,CAAiB;IAGnC,qBAAqB,CAAiB;IAGtC,WAAW,CAAiB;IAG5B,YAAY,CAAkC;IAG9C,QAAQ,CAAS;IAGjB,MAAM,CAAiB;IAGvB,YAAY,CAAiB;IAG7B,sBAAsB,CAAe;IAGrC,sBAAsB,CAAiB;IAGvC,WAAW,CAAe;IAG1B,WAAW,CAAiB;IAG5B,SAAS,CAAiB;IAG1B,SAAS,CAAiB;IAI1B,WAAW,CAAgB;IAG3B,SAAS,CAAc;IAGvB,MAAM,CAAW;IAGjB,SAAS,CAAc;CACxB,CAAA;AA5EY,0BAAO;AAElB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCAC1C;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;4CAC1C;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,YAA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IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,0BAAQ,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC;;0CACzB;AAGvB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,oBAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC;;uCAChC;AAGjB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,2BAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC;;0CACnC;kBA3EZ,OAAO;IADnB,IAAA,gBAAM,EAAC,WAAW,CAAC;GACP,OAAO,CA4EnB"}
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
import { BaseEntity } from '../base.entity';
|
|
2
2
|
import { Company } from './company.entity';
|
|
3
3
|
import { JobTitle } from './job-title.entity';
|
|
4
|
+
import { MasterDataStatus } from './enums';
|
|
4
5
|
export declare class Department extends BaseEntity {
|
|
6
|
+
tenantId?: string;
|
|
5
7
|
companyId: string;
|
|
6
8
|
code: string;
|
|
7
|
-
name
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
name: string;
|
|
10
|
+
description?: string | null;
|
|
11
|
+
parentDepartmentId?: string | null;
|
|
12
|
+
status: MasterDataStatus;
|
|
13
|
+
effectiveAt: Date;
|
|
14
|
+
createdBy?: string | null;
|
|
15
|
+
updatedBy?: string | null;
|
|
10
16
|
company?: Company;
|
|
11
|
-
|
|
12
|
-
|
|
17
|
+
parentDepartment?: Department | null;
|
|
18
|
+
children?: Department[];
|
|
13
19
|
jobTitles?: JobTitle[];
|
|
14
20
|
}
|
|
@@ -14,18 +14,28 @@ const typeorm_1 = require("typeorm");
|
|
|
14
14
|
const base_entity_1 = require("../base.entity");
|
|
15
15
|
const company_entity_1 = require("./company.entity");
|
|
16
16
|
const job_title_entity_1 = require("./job-title.entity");
|
|
17
|
+
const enums_1 = require("./enums");
|
|
17
18
|
let Department = class Department extends base_entity_1.BaseEntity {
|
|
19
|
+
tenantId;
|
|
18
20
|
companyId;
|
|
19
21
|
code;
|
|
20
22
|
name;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
description;
|
|
24
|
+
parentDepartmentId;
|
|
25
|
+
status;
|
|
26
|
+
effectiveAt;
|
|
27
|
+
createdBy;
|
|
28
|
+
updatedBy;
|
|
23
29
|
company;
|
|
24
|
-
|
|
25
|
-
|
|
30
|
+
parentDepartment;
|
|
31
|
+
children;
|
|
26
32
|
jobTitles;
|
|
27
33
|
};
|
|
28
34
|
exports.Department = Department;
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ name: 'tenant_id', type: 'uuid', nullable: true }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], Department.prototype, "tenantId", void 0);
|
|
29
39
|
__decorate([
|
|
30
40
|
(0, typeorm_1.Column)({ name: 'company_id', type: 'uuid' }),
|
|
31
41
|
__metadata("design:type", String)
|
|
@@ -35,36 +45,61 @@ __decorate([
|
|
|
35
45
|
__metadata("design:type", String)
|
|
36
46
|
], Department.prototype, "code", void 0);
|
|
37
47
|
__decorate([
|
|
38
|
-
(0, typeorm_1.Column)({ name: 'name', type: 'varchar', length: 255
|
|
39
|
-
__metadata("design:type",
|
|
48
|
+
(0, typeorm_1.Column)({ name: 'name', type: 'varchar', length: 255 }),
|
|
49
|
+
__metadata("design:type", String)
|
|
40
50
|
], Department.prototype, "name", void 0);
|
|
41
51
|
__decorate([
|
|
42
|
-
(0, typeorm_1.Column)({ name: '
|
|
43
|
-
__metadata("design:type",
|
|
44
|
-
], Department.prototype, "
|
|
52
|
+
(0, typeorm_1.Column)({ name: 'description', type: 'text', nullable: true }),
|
|
53
|
+
__metadata("design:type", Object)
|
|
54
|
+
], Department.prototype, "description", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.Column)({ name: 'parent_department_id', type: 'uuid', nullable: true }),
|
|
57
|
+
__metadata("design:type", Object)
|
|
58
|
+
], Department.prototype, "parentDepartmentId", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({
|
|
61
|
+
name: 'status',
|
|
62
|
+
type: 'varchar',
|
|
63
|
+
length: 32,
|
|
64
|
+
default: enums_1.MasterDataStatus.SCHEDULED,
|
|
65
|
+
}),
|
|
66
|
+
__metadata("design:type", String)
|
|
67
|
+
], Department.prototype, "status", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, typeorm_1.Column)({ name: 'effective_at', type: 'timestamptz', nullable: true }),
|
|
70
|
+
__metadata("design:type", Date)
|
|
71
|
+
], Department.prototype, "effectiveAt", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, typeorm_1.Column)({ name: 'created_by', type: 'uuid', nullable: true }),
|
|
74
|
+
__metadata("design:type", Object)
|
|
75
|
+
], Department.prototype, "createdBy", void 0);
|
|
45
76
|
__decorate([
|
|
46
|
-
(0, typeorm_1.Column)({ name: '
|
|
77
|
+
(0, typeorm_1.Column)({ name: 'updated_by', type: 'uuid', nullable: true }),
|
|
47
78
|
__metadata("design:type", Object)
|
|
48
|
-
], Department.prototype, "
|
|
79
|
+
], Department.prototype, "updatedBy", void 0);
|
|
49
80
|
__decorate([
|
|
50
|
-
(0, typeorm_1.ManyToOne)(() => company_entity_1.Company, (company) => company.departments),
|
|
81
|
+
(0, typeorm_1.ManyToOne)(() => company_entity_1.Company, (company) => company.departments, { onDelete: 'CASCADE' }),
|
|
51
82
|
(0, typeorm_1.JoinColumn)({ name: 'company_id' }),
|
|
52
83
|
__metadata("design:type", company_entity_1.Company)
|
|
53
84
|
], Department.prototype, "company", void 0);
|
|
54
85
|
__decorate([
|
|
55
|
-
(0, typeorm_1.ManyToOne)(() => Department, (dept) => dept.
|
|
56
|
-
|
|
86
|
+
(0, typeorm_1.ManyToOne)(() => Department, (dept) => dept.children, {
|
|
87
|
+
nullable: true,
|
|
88
|
+
onDelete: 'RESTRICT',
|
|
89
|
+
}),
|
|
90
|
+
(0, typeorm_1.JoinColumn)({ name: 'parent_department_id' }),
|
|
57
91
|
__metadata("design:type", Object)
|
|
58
|
-
], Department.prototype, "
|
|
92
|
+
], Department.prototype, "parentDepartment", void 0);
|
|
59
93
|
__decorate([
|
|
60
|
-
(0, typeorm_1.OneToMany)(() => Department, (dept) => dept.
|
|
94
|
+
(0, typeorm_1.OneToMany)(() => Department, (dept) => dept.parentDepartment),
|
|
61
95
|
__metadata("design:type", Array)
|
|
62
|
-
], Department.prototype, "
|
|
96
|
+
], Department.prototype, "children", void 0);
|
|
63
97
|
__decorate([
|
|
64
98
|
(0, typeorm_1.OneToMany)(() => job_title_entity_1.JobTitle, (jobTitle) => jobTitle.department),
|
|
65
99
|
__metadata("design:type", Array)
|
|
66
100
|
], Department.prototype, "jobTitles", void 0);
|
|
67
101
|
exports.Department = Department = __decorate([
|
|
68
|
-
(0, typeorm_1.Entity)('departments')
|
|
102
|
+
(0, typeorm_1.Entity)('departments'),
|
|
103
|
+
(0, typeorm_1.Index)('idx_departments_parent', ['parentDepartmentId'])
|
|
69
104
|
], Department);
|
|
70
105
|
//# sourceMappingURL=department.entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"department.entity.js","sourceRoot":"","sources":["../../src/common/department.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"department.entity.js","sourceRoot":"","sources":["../../src/common/department.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAOiB;AACjB,gDAA4C;AAC5C,qDAA2C;AAC3C,yDAA8C;AAC9C,mCAA2C;AAIpC,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,wBAAU;IAExC,QAAQ,CAAU;IAGlB,SAAS,CAAS;IAGlB,IAAI,CAAS;IAGb,IAAI,CAAS;IAGb,WAAW,CAAiB;IAG5B,kBAAkB,CAAiB;IAQnC,MAAM,CAAmB;IAGzB,WAAW,CA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|
|
5
|
+
(function (CompanyStatus) {
|
|
6
|
+
CompanyStatus["PENDING"] = "pending";
|
|
7
|
+
CompanyStatus["ACTIVE"] = "active";
|
|
8
|
+
})(CompanyStatus || (exports.CompanyStatus = CompanyStatus = {}));
|
|
9
|
+
var MasterDataStatus;
|
|
10
|
+
(function (MasterDataStatus) {
|
|
11
|
+
MasterDataStatus["SCHEDULED"] = "scheduled";
|
|
12
|
+
MasterDataStatus["ACTIVE"] = "active";
|
|
13
|
+
MasterDataStatus["INACTIVE"] = "inactive";
|
|
14
|
+
})(MasterDataStatus || (exports.MasterDataStatus = MasterDataStatus = {}));
|
|
15
|
+
//# sourceMappingURL=enums.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../src/common/enums.ts"],"names":[],"mappings":";;;AAAA,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,oCAAmB,CAAA;IACnB,kCAAiB,CAAA;AACnB,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB;AAED,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,2CAAuB,CAAA;IACvB,qCAAiB,CAAA;IACjB,yCAAqB,CAAA;AACvB,CAAC,EAJW,gBAAgB,gCAAhB,gBAAgB,QAI3B"}
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import { BaseEntity } from '../base.entity';
|
|
2
2
|
import { Company } from './company.entity';
|
|
3
3
|
import { JobTitle } from './job-title.entity';
|
|
4
|
+
import { MasterDataStatus } from './enums';
|
|
4
5
|
export declare class Grade extends BaseEntity {
|
|
6
|
+
tenantId?: string;
|
|
5
7
|
companyId: string;
|
|
6
8
|
code: string;
|
|
7
|
-
name
|
|
9
|
+
name: string;
|
|
10
|
+
description?: string | null;
|
|
11
|
+
rankOrder?: number | null;
|
|
12
|
+
sourceGradeId?: string | null;
|
|
13
|
+
status: MasterDataStatus;
|
|
14
|
+
effectiveAt: Date;
|
|
15
|
+
createdBy?: string | null;
|
|
16
|
+
updatedBy?: string | null;
|
|
8
17
|
company?: Company;
|
|
18
|
+
sourceGrade?: Grade | null;
|
|
9
19
|
jobTitles?: JobTitle[];
|
|
10
20
|
}
|
|
@@ -14,14 +14,28 @@ const typeorm_1 = require("typeorm");
|
|
|
14
14
|
const base_entity_1 = require("../base.entity");
|
|
15
15
|
const company_entity_1 = require("./company.entity");
|
|
16
16
|
const job_title_entity_1 = require("./job-title.entity");
|
|
17
|
+
const enums_1 = require("./enums");
|
|
17
18
|
let Grade = class Grade extends base_entity_1.BaseEntity {
|
|
19
|
+
tenantId;
|
|
18
20
|
companyId;
|
|
19
21
|
code;
|
|
20
22
|
name;
|
|
23
|
+
description;
|
|
24
|
+
rankOrder;
|
|
25
|
+
sourceGradeId;
|
|
26
|
+
status;
|
|
27
|
+
effectiveAt;
|
|
28
|
+
createdBy;
|
|
29
|
+
updatedBy;
|
|
21
30
|
company;
|
|
31
|
+
sourceGrade;
|
|
22
32
|
jobTitles;
|
|
23
33
|
};
|
|
24
34
|
exports.Grade = Grade;
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ name: 'tenant_id', type: 'uuid', nullable: true }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], Grade.prototype, "tenantId", void 0);
|
|
25
39
|
__decorate([
|
|
26
40
|
(0, typeorm_1.Column)({ name: 'company_id', type: 'uuid' }),
|
|
27
41
|
__metadata("design:type", String)
|
|
@@ -31,14 +45,52 @@ __decorate([
|
|
|
31
45
|
__metadata("design:type", String)
|
|
32
46
|
], Grade.prototype, "code", void 0);
|
|
33
47
|
__decorate([
|
|
34
|
-
(0, typeorm_1.Column)({ name: 'name', type: 'varchar', length: 255
|
|
35
|
-
__metadata("design:type",
|
|
48
|
+
(0, typeorm_1.Column)({ name: 'name', type: 'varchar', length: 255 }),
|
|
49
|
+
__metadata("design:type", String)
|
|
36
50
|
], Grade.prototype, "name", void 0);
|
|
37
51
|
__decorate([
|
|
38
|
-
(0, typeorm_1.
|
|
52
|
+
(0, typeorm_1.Column)({ name: 'description', type: 'text', nullable: true }),
|
|
53
|
+
__metadata("design:type", Object)
|
|
54
|
+
], Grade.prototype, "description", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.Column)({ name: 'rank_order', type: 'integer', nullable: true }),
|
|
57
|
+
__metadata("design:type", Object)
|
|
58
|
+
], Grade.prototype, "rankOrder", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({ name: 'source_grade_id', type: 'uuid', nullable: true }),
|
|
61
|
+
__metadata("design:type", Object)
|
|
62
|
+
], Grade.prototype, "sourceGradeId", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.Column)({
|
|
65
|
+
name: 'status',
|
|
66
|
+
type: 'varchar',
|
|
67
|
+
length: 32,
|
|
68
|
+
default: enums_1.MasterDataStatus.SCHEDULED,
|
|
69
|
+
}),
|
|
70
|
+
__metadata("design:type", String)
|
|
71
|
+
], Grade.prototype, "status", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, typeorm_1.Column)({ name: 'effective_at', type: 'timestamptz', nullable: true }),
|
|
74
|
+
__metadata("design:type", Date)
|
|
75
|
+
], Grade.prototype, "effectiveAt", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, typeorm_1.Column)({ name: 'created_by', type: 'uuid', nullable: true }),
|
|
78
|
+
__metadata("design:type", Object)
|
|
79
|
+
], Grade.prototype, "createdBy", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, typeorm_1.Column)({ name: 'updated_by', type: 'uuid', nullable: true }),
|
|
82
|
+
__metadata("design:type", Object)
|
|
83
|
+
], Grade.prototype, "updatedBy", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, typeorm_1.ManyToOne)(() => company_entity_1.Company, (company) => company.grades, { onDelete: 'CASCADE' }),
|
|
39
86
|
(0, typeorm_1.JoinColumn)({ name: 'company_id' }),
|
|
40
87
|
__metadata("design:type", company_entity_1.Company)
|
|
41
88
|
], Grade.prototype, "company", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, typeorm_1.ManyToOne)(() => Grade, { onDelete: 'SET NULL', nullable: true }),
|
|
91
|
+
(0, typeorm_1.JoinColumn)({ name: 'source_grade_id' }),
|
|
92
|
+
__metadata("design:type", Object)
|
|
93
|
+
], Grade.prototype, "sourceGrade", void 0);
|
|
42
94
|
__decorate([
|
|
43
95
|
(0, typeorm_1.OneToMany)(() => job_title_entity_1.JobTitle, (jobTitle) => jobTitle.grade),
|
|
44
96
|
__metadata("design:type", Array)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grade.entity.js","sourceRoot":"","sources":["../../src/common/grade.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"grade.entity.js","sourceRoot":"","sources":["../../src/common/grade.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAMiB;AACjB,gDAA4C;AAC5C,qDAA2C;AAC3C,yDAA8C;AAC9C,mCAA2C;AAGpC,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,wBAAU;IAEnC,QAAQ,CAAU;IAGlB,SAAS,CAAS;IAGlB,IAAI,CAAS;IAGb,IAAI,CAAS;IAGb,WAAW,CAAiB;IAG5B,SAAS,CAAiB;IAG1B,aAAa,CAAiB;IAQ9B,MAAM,CAAmB;IAGzB,WAAW,CAAO;IAGlB,SAAS,CAAiB;IAG1B,SAAS,CAAiB;IAK1B,OAAO,CAAW;IAIlB,WAAW,CAAgB;IAG3B,SAAS,CAAc;CACxB,CAAA;AAlDY,sBAAK;AAEhB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCAC1C;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,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EAAC,GAAG,EAAE,CAAC,wBAAO,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAC9E,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;8BACzB,wBAAO;sCAAC;AAIlB;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAChE,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;;0CACb;AAG3B;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,2BAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC;;wCACjC;gBAjDZ,KAAK;IADjB,IAAA,gBAAM,EAAC,QAAQ,CAAC;GACJ,KAAK,CAkDjB"}
|
package/dist/common/index.d.ts
CHANGED
package/dist/common/index.js
CHANGED
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./enums"), exports);
|
|
17
18
|
__exportStar(require("./company.entity"), exports);
|
|
18
19
|
__exportStar(require("./department.entity"), exports);
|
|
19
20
|
__exportStar(require("./location.entity"), exports);
|
package/dist/common/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,sDAAoC;AACpC,oDAAkC;AAClC,iDAA+B;AAC/B,qDAAmC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,mDAAiC;AACjC,sDAAoC;AACpC,oDAAkC;AAClC,iDAA+B;AAC/B,qDAAmC"}
|
|
@@ -2,13 +2,22 @@ import { BaseEntity } from '../base.entity';
|
|
|
2
2
|
import { Company } from './company.entity';
|
|
3
3
|
import { Department } from './department.entity';
|
|
4
4
|
import { Grade } from './grade.entity';
|
|
5
|
+
import { MasterDataStatus } from './enums';
|
|
5
6
|
export declare class JobTitle extends BaseEntity {
|
|
7
|
+
tenantId?: string;
|
|
6
8
|
companyId: string;
|
|
7
9
|
departmentId: string;
|
|
8
10
|
gradeId: string;
|
|
9
11
|
code: string;
|
|
10
|
-
name
|
|
12
|
+
name: string;
|
|
13
|
+
description?: string | null;
|
|
14
|
+
sourceJobTitleId?: string | null;
|
|
15
|
+
status: MasterDataStatus;
|
|
16
|
+
effectiveAt: Date;
|
|
17
|
+
createdBy?: string | null;
|
|
18
|
+
updatedBy?: string | null;
|
|
11
19
|
company?: Company;
|
|
12
20
|
department?: Department;
|
|
13
21
|
grade?: Grade;
|
|
22
|
+
sourceJobTitle?: JobTitle | null;
|
|
14
23
|
}
|
|
@@ -15,17 +15,30 @@ const base_entity_1 = require("../base.entity");
|
|
|
15
15
|
const company_entity_1 = require("./company.entity");
|
|
16
16
|
const department_entity_1 = require("./department.entity");
|
|
17
17
|
const grade_entity_1 = require("./grade.entity");
|
|
18
|
+
const enums_1 = require("./enums");
|
|
18
19
|
let JobTitle = class JobTitle extends base_entity_1.BaseEntity {
|
|
20
|
+
tenantId;
|
|
19
21
|
companyId;
|
|
20
22
|
departmentId;
|
|
21
23
|
gradeId;
|
|
22
24
|
code;
|
|
23
25
|
name;
|
|
26
|
+
description;
|
|
27
|
+
sourceJobTitleId;
|
|
28
|
+
status;
|
|
29
|
+
effectiveAt;
|
|
30
|
+
createdBy;
|
|
31
|
+
updatedBy;
|
|
24
32
|
company;
|
|
25
33
|
department;
|
|
26
34
|
grade;
|
|
35
|
+
sourceJobTitle;
|
|
27
36
|
};
|
|
28
37
|
exports.JobTitle = JobTitle;
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ name: 'tenant_id', type: 'uuid', nullable: true }),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], JobTitle.prototype, "tenantId", void 0);
|
|
29
42
|
__decorate([
|
|
30
43
|
(0, typeorm_1.Column)({ name: 'company_id', type: 'uuid' }),
|
|
31
44
|
__metadata("design:type", String)
|
|
@@ -43,24 +56,58 @@ __decorate([
|
|
|
43
56
|
__metadata("design:type", String)
|
|
44
57
|
], JobTitle.prototype, "code", void 0);
|
|
45
58
|
__decorate([
|
|
46
|
-
(0, typeorm_1.Column)({ name: 'name', type: 'varchar', length: 255
|
|
47
|
-
__metadata("design:type",
|
|
59
|
+
(0, typeorm_1.Column)({ name: 'name', type: 'varchar', length: 255 }),
|
|
60
|
+
__metadata("design:type", String)
|
|
48
61
|
], JobTitle.prototype, "name", void 0);
|
|
49
62
|
__decorate([
|
|
50
|
-
(0, typeorm_1.
|
|
63
|
+
(0, typeorm_1.Column)({ name: 'description', type: 'text', nullable: true }),
|
|
64
|
+
__metadata("design:type", Object)
|
|
65
|
+
], JobTitle.prototype, "description", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, typeorm_1.Column)({ name: 'source_job_title_id', type: 'uuid', nullable: true }),
|
|
68
|
+
__metadata("design:type", Object)
|
|
69
|
+
], JobTitle.prototype, "sourceJobTitleId", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, typeorm_1.Column)({
|
|
72
|
+
name: 'status',
|
|
73
|
+
type: 'varchar',
|
|
74
|
+
length: 32,
|
|
75
|
+
default: enums_1.MasterDataStatus.SCHEDULED,
|
|
76
|
+
}),
|
|
77
|
+
__metadata("design:type", String)
|
|
78
|
+
], JobTitle.prototype, "status", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, typeorm_1.Column)({ name: 'effective_at', type: 'timestamptz', nullable: true }),
|
|
81
|
+
__metadata("design:type", Date)
|
|
82
|
+
], JobTitle.prototype, "effectiveAt", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, typeorm_1.Column)({ name: 'created_by', type: 'uuid', nullable: true }),
|
|
85
|
+
__metadata("design:type", Object)
|
|
86
|
+
], JobTitle.prototype, "createdBy", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, typeorm_1.Column)({ name: 'updated_by', type: 'uuid', nullable: true }),
|
|
89
|
+
__metadata("design:type", Object)
|
|
90
|
+
], JobTitle.prototype, "updatedBy", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, typeorm_1.ManyToOne)(() => company_entity_1.Company, (company) => company.jobTitles, { onDelete: 'CASCADE' }),
|
|
51
93
|
(0, typeorm_1.JoinColumn)({ name: 'company_id' }),
|
|
52
94
|
__metadata("design:type", company_entity_1.Company)
|
|
53
95
|
], JobTitle.prototype, "company", void 0);
|
|
54
96
|
__decorate([
|
|
55
|
-
(0, typeorm_1.ManyToOne)(() => department_entity_1.Department, (dept) => dept.jobTitles),
|
|
97
|
+
(0, typeorm_1.ManyToOne)(() => department_entity_1.Department, (dept) => dept.jobTitles, { onDelete: 'RESTRICT' }),
|
|
56
98
|
(0, typeorm_1.JoinColumn)({ name: 'department_id' }),
|
|
57
99
|
__metadata("design:type", department_entity_1.Department)
|
|
58
100
|
], JobTitle.prototype, "department", void 0);
|
|
59
101
|
__decorate([
|
|
60
|
-
(0, typeorm_1.ManyToOne)(() => grade_entity_1.Grade, (grade) => grade.jobTitles),
|
|
102
|
+
(0, typeorm_1.ManyToOne)(() => grade_entity_1.Grade, (grade) => grade.jobTitles, { onDelete: 'RESTRICT' }),
|
|
61
103
|
(0, typeorm_1.JoinColumn)({ name: 'grade_id' }),
|
|
62
104
|
__metadata("design:type", grade_entity_1.Grade)
|
|
63
105
|
], JobTitle.prototype, "grade", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
(0, typeorm_1.ManyToOne)(() => JobTitle, { onDelete: 'SET NULL', nullable: true }),
|
|
108
|
+
(0, typeorm_1.JoinColumn)({ name: 'source_job_title_id' }),
|
|
109
|
+
__metadata("design:type", Object)
|
|
110
|
+
], JobTitle.prototype, "sourceJobTitle", void 0);
|
|
64
111
|
exports.JobTitle = JobTitle = __decorate([
|
|
65
112
|
(0, typeorm_1.Entity)('job_titles')
|
|
66
113
|
], JobTitle);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"job-title.entity.js","sourceRoot":"","sources":["../../src/common/job-title.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgE;AAChE,gDAA4C;AAC5C,qDAA2C;AAC3C,2DAAiD;AACjD,iDAAuC;
|
|
1
|
+
{"version":3,"file":"job-title.entity.js","sourceRoot":"","sources":["../../src/common/job-title.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgE;AAChE,gDAA4C;AAC5C,qDAA2C;AAC3C,2DAAiD;AACjD,iDAAuC;AACvC,mCAA2C;AAGpC,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,wBAAU;IAEtC,QAAQ,CAAU;IAGlB,SAAS,CAAS;IAGlB,YAAY,CAAS;IAGrB,OAAO,CAAS;IAGhB,IAAI,CAAS;IAGb,IAAI,CAAS;IAGb,WAAW,CAAiB;IAG5B,gBAAgB,CAAiB;IAQjC,MAAM,CAAmB;IAGzB,WAAW,CAAO;IAGlB,SAAS,CAAiB;IAG1B,SAAS,CAAiB;IAK1B,OAAO,CAAW;IAIlB,UAAU,CAAc;IAIxB,KAAK,CAAS;IAId,cAAc,CAAmB;CAClC,CAAA;AA1DY,4BAAQ;AAEnB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CAC1C;AAGlB;IADC,IAAA,gBAAM,EAAC,E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I,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACnC;AAK1B;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,wBAAO,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IACjF,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;8BACzB,wBAAO;yCAAC;AAIlB;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,8BAAU,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;IAC/E,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;8BACzB,8BAAU;4CAAC;AAIxB;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,oBAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;IAC5E,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;8BACzB,oBAAK;uCAAC;AAId;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACnE,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,qBAAqB,EAAE,CAAC;;gDACX;mBAzDtB,QAAQ;IADpB,IAAA,gBAAM,EAAC,YAAY,CAAC;GACR,QAAQ,CA0DpB"}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { BaseEntity } from '../base.entity';
|
|
2
2
|
import { Company } from './company.entity';
|
|
3
|
+
import { MasterDataStatus } from './enums';
|
|
3
4
|
export declare class Location extends BaseEntity {
|
|
5
|
+
tenantId?: string;
|
|
4
6
|
companyId: string;
|
|
7
|
+
code: string;
|
|
5
8
|
name: string;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
zipCode: string;
|
|
11
|
-
timezone: string;
|
|
12
|
-
contactName?: string | null;
|
|
13
|
-
contactEmail?: string | null;
|
|
14
|
-
contactPhone?: string | null;
|
|
15
|
-
contactTitle?: string | null;
|
|
16
|
-
mapUrl?: string | null;
|
|
9
|
+
description?: string | null;
|
|
10
|
+
countryCode?: string | null;
|
|
11
|
+
timezone?: string | null;
|
|
12
|
+
address?: Record<string, unknown> | null;
|
|
17
13
|
isHeadquarter: boolean;
|
|
18
|
-
|
|
14
|
+
status: MasterDataStatus;
|
|
15
|
+
effectiveAt: Date;
|
|
16
|
+
createdBy?: string | null;
|
|
17
|
+
updatedBy?: string | null;
|
|
19
18
|
company?: Company;
|
|
20
19
|
}
|
|
@@ -13,87 +13,83 @@ exports.Location = void 0;
|
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const base_entity_1 = require("../base.entity");
|
|
15
15
|
const company_entity_1 = require("./company.entity");
|
|
16
|
+
const enums_1 = require("./enums");
|
|
16
17
|
let Location = class Location extends base_entity_1.BaseEntity {
|
|
18
|
+
tenantId;
|
|
17
19
|
companyId;
|
|
20
|
+
code;
|
|
18
21
|
name;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
state;
|
|
22
|
-
country;
|
|
23
|
-
zipCode;
|
|
22
|
+
description;
|
|
23
|
+
countryCode;
|
|
24
24
|
timezone;
|
|
25
|
-
|
|
26
|
-
contactEmail;
|
|
27
|
-
contactPhone;
|
|
28
|
-
contactTitle;
|
|
29
|
-
mapUrl;
|
|
25
|
+
address;
|
|
30
26
|
isHeadquarter;
|
|
31
|
-
|
|
27
|
+
status;
|
|
28
|
+
effectiveAt;
|
|
29
|
+
createdBy;
|
|
30
|
+
updatedBy;
|
|
32
31
|
company;
|
|
33
32
|
};
|
|
34
33
|
exports.Location = Location;
|
|
35
34
|
__decorate([
|
|
36
|
-
(0, typeorm_1.Column)({ name: '
|
|
37
|
-
__metadata("design:type", String)
|
|
38
|
-
], Location.prototype, "companyId", void 0);
|
|
39
|
-
__decorate([
|
|
40
|
-
(0, typeorm_1.Column)({ name: 'name', type: 'varchar', length: 64 }),
|
|
41
|
-
__metadata("design:type", String)
|
|
42
|
-
], Location.prototype, "name", void 0);
|
|
43
|
-
__decorate([
|
|
44
|
-
(0, typeorm_1.Column)({ name: 'address_line', type: 'varchar', length: 255 }),
|
|
45
|
-
__metadata("design:type", String)
|
|
46
|
-
], Location.prototype, "addressLine", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
(0, typeorm_1.Column)({ name: 'city', type: 'varchar', length: 255 }),
|
|
35
|
+
(0, typeorm_1.Column)({ name: 'tenant_id', type: 'uuid', nullable: true }),
|
|
49
36
|
__metadata("design:type", String)
|
|
50
|
-
], Location.prototype, "
|
|
37
|
+
], Location.prototype, "tenantId", void 0);
|
|
51
38
|
__decorate([
|
|
52
|
-
(0, typeorm_1.Column)({ name: '
|
|
53
|
-
__metadata("design:type", String)
|
|
54
|
-
], Location.prototype, "state", void 0);
|
|
55
|
-
__decorate([
|
|
56
|
-
(0, typeorm_1.Column)({ name: 'country', type: 'varchar', length: 100 }),
|
|
39
|
+
(0, typeorm_1.Column)({ name: 'company_id', type: 'uuid' }),
|
|
57
40
|
__metadata("design:type", String)
|
|
58
|
-
], Location.prototype, "
|
|
41
|
+
], Location.prototype, "companyId", void 0);
|
|
59
42
|
__decorate([
|
|
60
|
-
(0, typeorm_1.Column)({ name: '
|
|
43
|
+
(0, typeorm_1.Column)({ name: 'code', type: 'varchar', length: 64 }),
|
|
61
44
|
__metadata("design:type", String)
|
|
62
|
-
], Location.prototype, "
|
|
45
|
+
], Location.prototype, "code", void 0);
|
|
63
46
|
__decorate([
|
|
64
|
-
(0, typeorm_1.Column)({ name: '
|
|
47
|
+
(0, typeorm_1.Column)({ name: 'name', type: 'varchar', length: 255 }),
|
|
65
48
|
__metadata("design:type", String)
|
|
66
|
-
], Location.prototype, "
|
|
67
|
-
__decorate([
|
|
68
|
-
(0, typeorm_1.Column)({ name: 'contact_name', type: 'varchar', length: 255, nullable: true }),
|
|
69
|
-
__metadata("design:type", Object)
|
|
70
|
-
], Location.prototype, "contactName", void 0);
|
|
49
|
+
], Location.prototype, "name", void 0);
|
|
71
50
|
__decorate([
|
|
72
|
-
(0, typeorm_1.Column)({ name: '
|
|
51
|
+
(0, typeorm_1.Column)({ name: 'description', type: 'text', nullable: true }),
|
|
73
52
|
__metadata("design:type", Object)
|
|
74
|
-
], Location.prototype, "
|
|
53
|
+
], Location.prototype, "description", void 0);
|
|
75
54
|
__decorate([
|
|
76
|
-
(0, typeorm_1.Column)({ name: '
|
|
55
|
+
(0, typeorm_1.Column)({ name: 'country_code', type: 'char', length: 2, nullable: true }),
|
|
77
56
|
__metadata("design:type", Object)
|
|
78
|
-
], Location.prototype, "
|
|
57
|
+
], Location.prototype, "countryCode", void 0);
|
|
79
58
|
__decorate([
|
|
80
|
-
(0, typeorm_1.Column)({ name: '
|
|
59
|
+
(0, typeorm_1.Column)({ name: 'timezone', type: 'varchar', length: 64, nullable: true }),
|
|
81
60
|
__metadata("design:type", Object)
|
|
82
|
-
], Location.prototype, "
|
|
61
|
+
], Location.prototype, "timezone", void 0);
|
|
83
62
|
__decorate([
|
|
84
|
-
(0, typeorm_1.Column)({ name: '
|
|
63
|
+
(0, typeorm_1.Column)({ name: 'address', type: 'jsonb', nullable: true }),
|
|
85
64
|
__metadata("design:type", Object)
|
|
86
|
-
], Location.prototype, "
|
|
65
|
+
], Location.prototype, "address", void 0);
|
|
87
66
|
__decorate([
|
|
88
67
|
(0, typeorm_1.Column)({ name: 'is_headquarter', type: 'boolean', default: false }),
|
|
89
68
|
__metadata("design:type", Boolean)
|
|
90
69
|
], Location.prototype, "isHeadquarter", void 0);
|
|
91
70
|
__decorate([
|
|
92
|
-
(0, typeorm_1.Column)({
|
|
93
|
-
|
|
94
|
-
|
|
71
|
+
(0, typeorm_1.Column)({
|
|
72
|
+
name: 'status',
|
|
73
|
+
type: 'varchar',
|
|
74
|
+
length: 32,
|
|
75
|
+
default: enums_1.MasterDataStatus.SCHEDULED,
|
|
76
|
+
}),
|
|
77
|
+
__metadata("design:type", String)
|
|
78
|
+
], Location.prototype, "status", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, typeorm_1.Column)({ name: 'effective_at', type: 'timestamptz', nullable: true }),
|
|
81
|
+
__metadata("design:type", Date)
|
|
82
|
+
], Location.prototype, "effectiveAt", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, typeorm_1.Column)({ name: 'created_by', type: 'uuid', nullable: true }),
|
|
85
|
+
__metadata("design:type", Object)
|
|
86
|
+
], Location.prototype, "createdBy", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, typeorm_1.Column)({ name: 'updated_by', type: 'uuid', nullable: true }),
|
|
89
|
+
__metadata("design:type", Object)
|
|
90
|
+
], Location.prototype, "updatedBy", void 0);
|
|
95
91
|
__decorate([
|
|
96
|
-
(0, typeorm_1.ManyToOne)(() => company_entity_1.Company, (company) => company.locations),
|
|
92
|
+
(0, typeorm_1.ManyToOne)(() => company_entity_1.Company, (company) => company.locations, { onDelete: 'CASCADE' }),
|
|
97
93
|
(0, typeorm_1.JoinColumn)({ name: 'company_id' }),
|
|
98
94
|
__metadata("design:type", company_entity_1.Company)
|
|
99
95
|
], Location.prototype, "company", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"location.entity.js","sourceRoot":"","sources":["../../src/common/location.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgE;AAChE,gDAA4C;AAC5C,qDAA2C;AAGpC,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,wBAAU;IAEtC,
|
|
1
|
+
{"version":3,"file":"location.entity.js","sourceRoot":"","sources":["../../src/common/location.ent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|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@new-hros/libs-sql",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "NestJS multi-tenant platform foundation - SQL Database Layer",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -36,4 +36,4 @@
|
|
|
36
36
|
"jest": "^29.7.0",
|
|
37
37
|
"ts-jest": "^29.1.1"
|
|
38
38
|
}
|
|
39
|
-
}
|
|
39
|
+
}
|