This commit is contained in:
parent
b285c3e37a
commit
7176191193
|
@ -223,19 +223,15 @@ 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,
|
||||||
[
|
firstName: args.firstName,
|
||||||
args.firstName,
|
lastName: args.lastNames,
|
||||||
args.lastNames,
|
code: args.code,
|
||||||
args.code,
|
bossFk: args.bossFk,
|
||||||
args.bossFk,
|
fi: args.fi,
|
||||||
client.id,
|
birth: args.birth
|
||||||
args.fi,
|
}, myOptions);
|
||||||
args.birth,
|
|
||||||
],
|
|
||||||
myOptions
|
|
||||||
);
|
|
||||||
|
|
||||||
if (tx) await tx.commit();
|
if (tx) await tx.commit();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
|
@ -25,8 +25,7 @@
|
||||||
"type" : "string"
|
"type" : "string"
|
||||||
},
|
},
|
||||||
"userFk": {
|
"userFk": {
|
||||||
"type" : "number",
|
"type" : "number"
|
||||||
"required": true
|
|
||||||
},
|
},
|
||||||
"bossFk": {
|
"bossFk": {
|
||||||
"type" : "number"
|
"type" : "number"
|
||||||
|
@ -51,6 +50,12 @@
|
||||||
},
|
},
|
||||||
"locker": {
|
"locker": {
|
||||||
"type" : "number"
|
"type" : "number"
|
||||||
|
},
|
||||||
|
"fi": {
|
||||||
|
"type" : "string"
|
||||||
|
},
|
||||||
|
"birth": {
|
||||||
|
"type" : "date"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"relations": {
|
"relations": {
|
||||||
|
|
Loading…
Reference in New Issue