Skip to content

Commit 7033346

Browse files
added employees personal model
1 parent 54fe5b2 commit 7033346

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

models/employee/emp_personal.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ const employeePersonalSchema = {
6060
previousMiddleName: { type: String },
6161
previousLastName: { type: String },
6262
};
63-
const EmployeePersonal = connector.model("EmplyeePersonalData", employeePersonalSchema)
63+
const EmployeePersonal = connector.model(
64+
"EmplyeePersonalData",
65+
employeePersonalSchema,
66+
);
6467
/// CRUD operations ///
6568

6669
async function create(employeePersonalData) {
@@ -75,7 +78,11 @@ async function read(filter, limit = 1) {
7578
}
7679

7780
async function update(filter, updateObject, options = { multi: true }) {
78-
const updateResult = await EmployeePersonal.updateMany(filter, { $set: updateObject }, options);
81+
const updateResult = await EmployeePersonal.updateMany(
82+
filter,
83+
{ $set: updateObject },
84+
options,
85+
);
7986
return updateResult.acknowledged;
8087
}
8188

@@ -89,4 +96,4 @@ export default {
8996
read,
9097
update,
9198
remove,
92-
};
99+
};

0 commit comments

Comments
 (0)