plac-micro-common 1.2.37 → 1.2.38
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/models/core/index.d.ts +3 -2
- package/dist/models/core/index.js +4 -2
- package/dist/models/core/number_series.entity.d.ts +16 -0
- package/dist/models/core/number_series.entity.js +70 -0
- package/dist/types/business.type.d.ts +6 -0
- package/dist/types/business.type.js +8 -1
- package/dist/types/general.type.d.ts +6 -0
- package/dist/types/general.type.js +8 -1
- package/package.json +1 -1
|
@@ -4,6 +4,7 @@ import { GeoCommuneEntity } from "./geo_commune.entity";
|
|
|
4
4
|
import { GeoVillageEntity } from "./geo_village.entity";
|
|
5
5
|
import { MaritalStatusEntity } from "./marital_status.entity";
|
|
6
6
|
import { NationalityEntity } from "./nationality.entity";
|
|
7
|
+
import { NumberSeriesEntity } from "./number_series.entity";
|
|
7
8
|
import { OrganizationEntity } from "./organization.entity";
|
|
8
9
|
import { OrganizationBranchEntity } from "./org_branch.entity";
|
|
9
10
|
import { OrganizationChannelEntity } from "./org_channel.entity";
|
|
@@ -12,7 +13,7 @@ import { OrganizationPositionEntity } from "./org_position.entity";
|
|
|
12
13
|
import { OrganizationStaffEntity } from "./org_staff.entity";
|
|
13
14
|
import { OrganizationStaffBranchEntity } from "./org_staff_branches.entity";
|
|
14
15
|
import { OrganizationStaffReportingLineEntity } from "./org_staff_reporting_lines.entity";
|
|
15
|
-
import { StaffEntity } from "./staffs.entity";
|
|
16
16
|
import { RelationshipEntity } from "./relationship.entity";
|
|
17
|
-
|
|
17
|
+
import { StaffEntity } from "./staffs.entity";
|
|
18
|
+
export declare const CORE_ENTITIES: readonly [typeof GeoProvinceEntity, typeof GeoDistrictEntity, typeof GeoCommuneEntity, typeof GeoVillageEntity, typeof MaritalStatusEntity, typeof NationalityEntity, typeof NumberSeriesEntity, typeof OrganizationEntity, typeof OrganizationBranchEntity, typeof OrganizationChannelEntity, typeof OrganizationDepartmentEntity, typeof OrganizationPositionEntity, typeof OrganizationStaffEntity, typeof OrganizationStaffBranchEntity, typeof OrganizationStaffReportingLineEntity, typeof RelationshipEntity, typeof StaffEntity];
|
|
18
19
|
export { GeoProvinceEntity, GeoDistrictEntity, GeoCommuneEntity, GeoVillageEntity, MaritalStatusEntity, NationalityEntity, OrganizationEntity, OrganizationBranchEntity, OrganizationChannelEntity, OrganizationDepartmentEntity, OrganizationPositionEntity, OrganizationStaffEntity, OrganizationStaffBranchEntity, OrganizationStaffReportingLineEntity, RelationshipEntity, StaffEntity, };
|
|
@@ -13,6 +13,7 @@ const marital_status_entity_1 = require("./marital_status.entity");
|
|
|
13
13
|
Object.defineProperty(exports, "MaritalStatusEntity", { enumerable: true, get: function () { return marital_status_entity_1.MaritalStatusEntity; } });
|
|
14
14
|
const nationality_entity_1 = require("./nationality.entity");
|
|
15
15
|
Object.defineProperty(exports, "NationalityEntity", { enumerable: true, get: function () { return nationality_entity_1.NationalityEntity; } });
|
|
16
|
+
const number_series_entity_1 = require("./number_series.entity");
|
|
16
17
|
const organization_entity_1 = require("./organization.entity");
|
|
17
18
|
Object.defineProperty(exports, "OrganizationEntity", { enumerable: true, get: function () { return organization_entity_1.OrganizationEntity; } });
|
|
18
19
|
const org_branch_entity_1 = require("./org_branch.entity");
|
|
@@ -29,10 +30,10 @@ const org_staff_branches_entity_1 = require("./org_staff_branches.entity");
|
|
|
29
30
|
Object.defineProperty(exports, "OrganizationStaffBranchEntity", { enumerable: true, get: function () { return org_staff_branches_entity_1.OrganizationStaffBranchEntity; } });
|
|
30
31
|
const org_staff_reporting_lines_entity_1 = require("./org_staff_reporting_lines.entity");
|
|
31
32
|
Object.defineProperty(exports, "OrganizationStaffReportingLineEntity", { enumerable: true, get: function () { return org_staff_reporting_lines_entity_1.OrganizationStaffReportingLineEntity; } });
|
|
32
|
-
const staffs_entity_1 = require("./staffs.entity");
|
|
33
|
-
Object.defineProperty(exports, "StaffEntity", { enumerable: true, get: function () { return staffs_entity_1.StaffEntity; } });
|
|
34
33
|
const relationship_entity_1 = require("./relationship.entity");
|
|
35
34
|
Object.defineProperty(exports, "RelationshipEntity", { enumerable: true, get: function () { return relationship_entity_1.RelationshipEntity; } });
|
|
35
|
+
const staffs_entity_1 = require("./staffs.entity");
|
|
36
|
+
Object.defineProperty(exports, "StaffEntity", { enumerable: true, get: function () { return staffs_entity_1.StaffEntity; } });
|
|
36
37
|
exports.CORE_ENTITIES = [
|
|
37
38
|
geo_province_entity_1.GeoProvinceEntity,
|
|
38
39
|
geo_district_entity_1.GeoDistrictEntity,
|
|
@@ -41,6 +42,7 @@ exports.CORE_ENTITIES = [
|
|
|
41
42
|
//
|
|
42
43
|
marital_status_entity_1.MaritalStatusEntity,
|
|
43
44
|
nationality_entity_1.NationalityEntity,
|
|
45
|
+
number_series_entity_1.NumberSeriesEntity,
|
|
44
46
|
//
|
|
45
47
|
organization_entity_1.OrganizationEntity,
|
|
46
48
|
org_branch_entity_1.OrganizationBranchEntity,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { _BaseEntity } from "../_base_entity";
|
|
2
|
+
import { DocumentType, ResetScope } from "../../types";
|
|
3
|
+
export declare class NumberSeriesEntity extends _BaseEntity {
|
|
4
|
+
id: string;
|
|
5
|
+
org_id: string | null;
|
|
6
|
+
doc_type: DocumentType;
|
|
7
|
+
prefix: string | null;
|
|
8
|
+
suffix: string | null;
|
|
9
|
+
padding: number;
|
|
10
|
+
next_no: string;
|
|
11
|
+
reset_scope: ResetScope;
|
|
12
|
+
reset_key: string | null;
|
|
13
|
+
min_no: string;
|
|
14
|
+
max_no: string | null;
|
|
15
|
+
is_active: boolean;
|
|
16
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
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.NumberSeriesEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const _base_entity_1 = require("../_base_entity");
|
|
15
|
+
const types_1 = require("../../types");
|
|
16
|
+
let NumberSeriesEntity = class NumberSeriesEntity extends _base_entity_1._BaseEntity {
|
|
17
|
+
};
|
|
18
|
+
exports.NumberSeriesEntity = NumberSeriesEntity;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], NumberSeriesEntity.prototype, "id", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
25
|
+
__metadata("design:type", Object)
|
|
26
|
+
], NumberSeriesEntity.prototype, "org_id", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 30 }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], NumberSeriesEntity.prototype, "doc_type", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 50, nullable: true }),
|
|
33
|
+
__metadata("design:type", Object)
|
|
34
|
+
], NumberSeriesEntity.prototype, "prefix", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 50, nullable: true }),
|
|
37
|
+
__metadata("design:type", Object)
|
|
38
|
+
], NumberSeriesEntity.prototype, "suffix", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ type: "smallint", default: 6 }),
|
|
41
|
+
__metadata("design:type", Number)
|
|
42
|
+
], NumberSeriesEntity.prototype, "padding", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ type: "bigint", default: 1 }),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], NumberSeriesEntity.prototype, "next_no", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 10, default: types_1.ResetScope.None }),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], NumberSeriesEntity.prototype, "reset_scope", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 20, nullable: true }),
|
|
53
|
+
__metadata("design:type", Object)
|
|
54
|
+
], NumberSeriesEntity.prototype, "reset_key", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.Column)({ type: "bigint", default: 1 }),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], NumberSeriesEntity.prototype, "min_no", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({ type: "bigint", nullable: true }),
|
|
61
|
+
__metadata("design:type", Object)
|
|
62
|
+
], NumberSeriesEntity.prototype, "max_no", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.Column)({ type: "boolean", default: true }),
|
|
65
|
+
__metadata("design:type", Boolean)
|
|
66
|
+
], NumberSeriesEntity.prototype, "is_active", void 0);
|
|
67
|
+
exports.NumberSeriesEntity = NumberSeriesEntity = __decorate([
|
|
68
|
+
(0, typeorm_1.Entity)({ schema: "core", name: "number_series" }),
|
|
69
|
+
(0, typeorm_1.Index)(["org_id", "doc_type"], { unique: true })
|
|
70
|
+
], NumberSeriesEntity);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ChannelType = exports.OrgType = void 0;
|
|
3
|
+
exports.DocumentType = exports.ChannelType = exports.OrgType = void 0;
|
|
4
4
|
var OrgType;
|
|
5
5
|
(function (OrgType) {
|
|
6
6
|
OrgType["Internal"] = "internal";
|
|
@@ -20,3 +20,10 @@ var ChannelType;
|
|
|
20
20
|
ChannelType["Telesales"] = "telesales";
|
|
21
21
|
ChannelType["Other"] = "other";
|
|
22
22
|
})(ChannelType || (exports.ChannelType = ChannelType = {}));
|
|
23
|
+
var DocumentType;
|
|
24
|
+
(function (DocumentType) {
|
|
25
|
+
DocumentType["Application"] = "application";
|
|
26
|
+
DocumentType["Policy"] = "policy";
|
|
27
|
+
DocumentType["Claim"] = "claim";
|
|
28
|
+
DocumentType["Quotation"] = "quotation";
|
|
29
|
+
})(DocumentType || (exports.DocumentType = DocumentType = {}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IdentifierType = exports.AddressType = exports.ContactType = exports.MaritalStatus = exports.Gender = void 0;
|
|
3
|
+
exports.ResetScope = exports.IdentifierType = exports.AddressType = exports.ContactType = exports.MaritalStatus = exports.Gender = void 0;
|
|
4
4
|
var Gender;
|
|
5
5
|
(function (Gender) {
|
|
6
6
|
Gender["Male"] = "M";
|
|
@@ -36,3 +36,10 @@ var IdentifierType;
|
|
|
36
36
|
IdentifierType["CompanyRegistration"] = "comp_reg";
|
|
37
37
|
IdentifierType["Other"] = "other";
|
|
38
38
|
})(IdentifierType || (exports.IdentifierType = IdentifierType = {}));
|
|
39
|
+
var ResetScope;
|
|
40
|
+
(function (ResetScope) {
|
|
41
|
+
ResetScope["None"] = "none";
|
|
42
|
+
ResetScope["Year"] = "year";
|
|
43
|
+
ResetScope["Month"] = "month";
|
|
44
|
+
ResetScope["Day"] = "day";
|
|
45
|
+
})(ResetScope || (exports.ResetScope = ResetScope = {}));
|