plac-micro-common 1.2.43 → 1.2.44
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.
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { ApplicationEntity } from "./application.entity";
|
|
2
2
|
import { _BaseEntity } from "../_base_entity";
|
|
3
3
|
import { AppPersonRole, Gender, IdentifierType } from "../../types";
|
|
4
|
+
import { CustomerEntity } from "../customer";
|
|
4
5
|
export declare class AppPersonEntity extends _BaseEntity {
|
|
5
6
|
id: string;
|
|
6
7
|
application_id: string;
|
|
7
8
|
role: AppPersonRole;
|
|
8
9
|
sequence_no: number;
|
|
10
|
+
customer_id?: string | null;
|
|
9
11
|
first_name?: string | null;
|
|
10
12
|
last_name?: string | null;
|
|
11
13
|
first_name_kh?: string | null;
|
|
@@ -19,7 +21,10 @@ export declare class AppPersonEntity extends _BaseEntity {
|
|
|
19
21
|
identifier_no?: string | null;
|
|
20
22
|
phone_number?: string | null;
|
|
21
23
|
email?: string | null;
|
|
24
|
+
full_address?: string | null;
|
|
25
|
+
full_address_kh?: string | null;
|
|
22
26
|
relationship_id?: string | null;
|
|
23
27
|
is_active: boolean;
|
|
24
28
|
application: ApplicationEntity;
|
|
29
|
+
customer?: CustomerEntity | null;
|
|
25
30
|
}
|
|
@@ -14,6 +14,7 @@ const typeorm_1 = require("typeorm");
|
|
|
14
14
|
const application_entity_1 = require("./application.entity");
|
|
15
15
|
const _base_entity_1 = require("../_base_entity");
|
|
16
16
|
const types_1 = require("../../types");
|
|
17
|
+
const customer_1 = require("../customer");
|
|
17
18
|
let AppPersonEntity = class AppPersonEntity extends _base_entity_1._BaseEntity {
|
|
18
19
|
};
|
|
19
20
|
exports.AppPersonEntity = AppPersonEntity;
|
|
@@ -35,6 +36,11 @@ __decorate([
|
|
|
35
36
|
(0, typeorm_1.Column)({ type: "int", default: 1 }),
|
|
36
37
|
__metadata("design:type", Number)
|
|
37
38
|
], AppPersonEntity.prototype, "sequence_no", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Index)(),
|
|
41
|
+
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
42
|
+
__metadata("design:type", Object)
|
|
43
|
+
], AppPersonEntity.prototype, "customer_id", void 0);
|
|
38
44
|
__decorate([
|
|
39
45
|
(0, typeorm_1.Column)({ type: "varchar", length: 200, nullable: true }),
|
|
40
46
|
__metadata("design:type", Object)
|
|
@@ -92,6 +98,16 @@ __decorate([
|
|
|
92
98
|
(0, typeorm_1.Column)({ type: "varchar", length: 100, nullable: true }),
|
|
93
99
|
__metadata("design:type", Object)
|
|
94
100
|
], AppPersonEntity.prototype, "email", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
(0, typeorm_1.Index)(),
|
|
103
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 500, nullable: true }),
|
|
104
|
+
__metadata("design:type", Object)
|
|
105
|
+
], AppPersonEntity.prototype, "full_address", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
(0, typeorm_1.Index)(),
|
|
108
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 500, nullable: true }),
|
|
109
|
+
__metadata("design:type", Object)
|
|
110
|
+
], AppPersonEntity.prototype, "full_address_kh", void 0);
|
|
95
111
|
__decorate([
|
|
96
112
|
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
97
113
|
__metadata("design:type", Object)
|
|
@@ -105,6 +121,11 @@ __decorate([
|
|
|
105
121
|
(0, typeorm_1.JoinColumn)({ name: "application_id" }),
|
|
106
122
|
__metadata("design:type", application_entity_1.ApplicationEntity)
|
|
107
123
|
], AppPersonEntity.prototype, "application", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
(0, typeorm_1.ManyToOne)(() => customer_1.CustomerEntity, { onDelete: "SET NULL", nullable: true }),
|
|
126
|
+
(0, typeorm_1.JoinColumn)({ name: "customer_id" }),
|
|
127
|
+
__metadata("design:type", Object)
|
|
128
|
+
], AppPersonEntity.prototype, "customer", void 0);
|
|
108
129
|
exports.AppPersonEntity = AppPersonEntity = __decorate([
|
|
109
130
|
(0, typeorm_1.Entity)({ schema: "application", name: "app_persons" }),
|
|
110
131
|
(0, typeorm_1.Unique)("uq_app_person_role_seq", ["application_id", "role", "sequence_no"])
|