law-common 1.0.27 → 1.1.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/dist/entities/index.d.ts +1 -0
- package/dist/entities/index.js +1 -0
- package/dist/entities/interface/designation.entity.interface.d.ts +13 -0
- package/dist/entities/interface/designation.entity.interface.js +2 -0
- package/dist/entities/interface/entity.utils.interface.d.ts +10 -1
- package/dist/entities/interface/user.entity.interface.d.ts +12 -12
- package/dist/entities/model/designation.entity.model.d.ts +11 -0
- package/dist/entities/model/designation.entity.model.js +15 -0
- package/dist/misc/interface/optional.interface.d.ts +2 -0
- package/dist/misc/interface/optional.interface.js +27 -0
- package/package.json +1 -1
package/dist/entities/index.d.ts
CHANGED
|
@@ -8,3 +8,4 @@ export * from "./interface/entity.utils.interface";
|
|
|
8
8
|
export * from "./interface/task.entity.interface";
|
|
9
9
|
export * from "./interface/user.entity.interface";
|
|
10
10
|
export * from "./interface/organization.entity.interface";
|
|
11
|
+
export * from "./interface/designation.entity.interface";
|
package/dist/entities/index.js
CHANGED
|
@@ -24,3 +24,4 @@ __exportStar(require("./interface/entity.utils.interface"), exports);
|
|
|
24
24
|
__exportStar(require("./interface/task.entity.interface"), exports);
|
|
25
25
|
__exportStar(require("./interface/user.entity.interface"), exports);
|
|
26
26
|
__exportStar(require("./interface/organization.entity.interface"), exports);
|
|
27
|
+
__exportStar(require("./interface/designation.entity.interface"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IAuditColumnEntity } from "./audit-column.entity.interface";
|
|
2
|
+
import { IEntityApiResponse, IEntityCreateDto, IEntityUpdateDto } from "./entity.utils.interface";
|
|
3
|
+
export interface IDesignationEntity extends IAuditColumnEntity {
|
|
4
|
+
id: number;
|
|
5
|
+
name: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface IDesignationEntityCreateDto extends IEntityCreateDto<IDesignationEntity> {
|
|
9
|
+
}
|
|
10
|
+
export interface IDesignationEntityUpdateDto extends IEntityUpdateDto<IDesignationEntity> {
|
|
11
|
+
}
|
|
12
|
+
export interface IDesignationApiResponse extends IEntityApiResponse<IDesignationEntity> {
|
|
13
|
+
}
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { Modify } from "../../misc/interface/modify.interface";
|
|
2
|
-
export type IApiEntity<T
|
|
2
|
+
export type IApiEntity<T extends {
|
|
3
|
+
createdOn: Date;
|
|
4
|
+
updatedOn: Date;
|
|
5
|
+
}> = Modify<T, {
|
|
3
6
|
createdOn: string;
|
|
4
7
|
updatedOn: string;
|
|
5
8
|
}>;
|
|
9
|
+
export type IEntityCreateDto<T> = Omit<T, 'id' | 'updatedOn' | 'updatedBy' | 'createdBy' | 'createdOn'>;
|
|
10
|
+
export type IEntityUpdateDto<T> = Omit<Partial<T>, 'id' | 'updatedOn' | 'updatedBy' | 'createdBy' | 'createdOn'>;
|
|
11
|
+
export type IEntityApiResponse<T extends {
|
|
12
|
+
createdOn: Date;
|
|
13
|
+
updatedOn: Date;
|
|
14
|
+
}> = IApiEntity<T>;
|
|
@@ -6,20 +6,20 @@ export interface IUserEntity extends IAuditColumnEntity {
|
|
|
6
6
|
name: string;
|
|
7
7
|
email: string;
|
|
8
8
|
contactNo: string;
|
|
9
|
-
secondaryContactNo
|
|
9
|
+
secondaryContactNo?: string;
|
|
10
10
|
password: string;
|
|
11
|
-
userCode
|
|
12
|
-
joiningDate
|
|
13
|
-
endDate
|
|
14
|
-
address
|
|
15
|
-
zipCode
|
|
16
|
-
country
|
|
11
|
+
userCode?: string;
|
|
12
|
+
joiningDate?: Date;
|
|
13
|
+
endDate?: Date;
|
|
14
|
+
address?: string;
|
|
15
|
+
zipCode?: number;
|
|
16
|
+
country?: CountryEnum;
|
|
17
17
|
designation: string;
|
|
18
|
-
panNo
|
|
19
|
-
panDocumentUrl
|
|
20
|
-
aadharNo
|
|
21
|
-
aadharDocumentUrl
|
|
18
|
+
panNo?: string;
|
|
19
|
+
panDocumentUrl?: string;
|
|
20
|
+
aadharNo?: string;
|
|
21
|
+
aadharDocumentUrl?: string;
|
|
22
22
|
role: UserRoleEnum;
|
|
23
23
|
status: UserStatusEnum;
|
|
24
|
-
organizationId
|
|
24
|
+
organizationId?: number;
|
|
25
25
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IDesignationEntity } from "../interface/designation.entity.interface";
|
|
2
|
+
export declare class DesignationEntityModel implements IDesignationEntity {
|
|
3
|
+
id: number;
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
createdBy: number;
|
|
7
|
+
createdOn: Date;
|
|
8
|
+
updatedBy: number;
|
|
9
|
+
updatedOn: Date;
|
|
10
|
+
constructor(data: IDesignationEntity);
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DesignationEntityModel = void 0;
|
|
4
|
+
class DesignationEntityModel {
|
|
5
|
+
constructor(data) {
|
|
6
|
+
this.id = data.id;
|
|
7
|
+
this.name = data.name;
|
|
8
|
+
this.description = data.description;
|
|
9
|
+
this.createdBy = data.createdBy;
|
|
10
|
+
this.createdOn = data.createdOn;
|
|
11
|
+
this.updatedBy = data.updatedBy;
|
|
12
|
+
this.updatedOn = data.updatedOn;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.DesignationEntityModel = DesignationEntityModel;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const entities_1 = require("../../entities");
|
|
4
|
+
const userDTO = {
|
|
5
|
+
contactNo: '',
|
|
6
|
+
secondaryContactNo: '',
|
|
7
|
+
password: '',
|
|
8
|
+
userCode: '',
|
|
9
|
+
joiningDate: new Date(),
|
|
10
|
+
endDate: new Date(),
|
|
11
|
+
address: '',
|
|
12
|
+
zipCode: 0,
|
|
13
|
+
country: entities_1.CountryEnum.India,
|
|
14
|
+
designation: '',
|
|
15
|
+
role: entities_1.UserRoleEnum.employee,
|
|
16
|
+
createdOn: new Date(),
|
|
17
|
+
updatedOn: new Date(),
|
|
18
|
+
createdBy: 1,
|
|
19
|
+
updatedBy: 1,
|
|
20
|
+
panDocumentUrl: '',
|
|
21
|
+
aadharDocumentUrl: '',
|
|
22
|
+
panNo: '',
|
|
23
|
+
aadharNo: '',
|
|
24
|
+
status: entities_1.UserStatusEnum.active,
|
|
25
|
+
organizationId: 1,
|
|
26
|
+
};
|
|
27
|
+
console.log(userDTO);
|