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);
|
const user = await models.VnUser.findById(client.id, null, myOptions);
|
||||||
await user.updateAttribute('email', args.email, myOptions);
|
await user.updateAttribute('email', args.email, myOptions);
|
||||||
|
|
||||||
await models.Worker.rawSql(
|
await models.Worker.create({
|
||||||
'CALL vn.workerCreate(?, ?, ?, ?, ?, ?, ?)',
|
id: client.id,
|
||||||
[
|
code: args.code,
|
||||||
args.firstName,
|
firstName: args.firstName,
|
||||||
args.lastNames,
|
lastName: args.lastNames,
|
||||||
args.code,
|
bossFk: args.bossFk,
|
||||||
args.bossFk,
|
fi: args.fi,
|
||||||
client.id,
|
birth: args.birth,
|
||||||
args.fi,
|
|
||||||
args.birth,
|
}, myOptions);
|
||||||
],
|
|
||||||
myOptions
|
|
||||||
);
|
|
||||||
|
|
||||||
if (tx) await tx.commit();
|
if (tx) await tx.commit();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
|
@ -48,6 +48,12 @@
|
||||||
"locker": {
|
"locker": {
|
||||||
"type" : "number"
|
"type" : "number"
|
||||||
},
|
},
|
||||||
|
"fi": {
|
||||||
|
"type" : "string"
|
||||||
|
},
|
||||||
|
"birth": {
|
||||||
|
"type" : "date"
|
||||||
|
},
|
||||||
"isF11Allowed": {
|
"isF11Allowed": {
|
||||||
"type" : "boolean"
|
"type" : "boolean"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue