This commit is contained in:
parent
85baac5c8e
commit
69a54be1a9
|
@ -223,19 +223,16 @@ module.exports = Self => {
|
|||
const user = await models.VnUser.findById(client.id, null, myOptions);
|
||||
await user.updateAttribute('email', args.email, myOptions);
|
||||
|
||||
await models.Worker.rawSql(
|
||||
'CALL vn.workerCreate(?, ?, ?, ?, ?, ?, ?)',
|
||||
[
|
||||
args.firstName,
|
||||
args.lastNames,
|
||||
args.code,
|
||||
args.bossFk,
|
||||
client.id,
|
||||
args.fi,
|
||||
args.birth,
|
||||
],
|
||||
myOptions
|
||||
);
|
||||
await models.Worker.create({
|
||||
id: client.id,
|
||||
code: args.code,
|
||||
firstName: args.firstName,
|
||||
lastName: args.lastNames,
|
||||
bossFk: args.bossFk,
|
||||
fi: args.fi,
|
||||
birth: args.birth,
|
||||
|
||||
}, myOptions);
|
||||
|
||||
if (tx) await tx.commit();
|
||||
} catch (error) {
|
||||
|
|
|
@ -48,6 +48,12 @@
|
|||
"locker": {
|
||||
"type" : "number"
|
||||
},
|
||||
"fi": {
|
||||
"type" : "string"
|
||||
},
|
||||
"birth": {
|
||||
"type" : "date"
|
||||
},
|
||||
"isF11Allowed": {
|
||||
"type" : "boolean"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue