refs #6434 feat: rename id key by token
This commit is contained in:
parent
301533b0ca
commit
c6b5d7f5a4
|
@ -51,7 +51,7 @@ module.exports = Self => {
|
||||||
}
|
}
|
||||||
const validateLogin = await Self.validateLogin(user, password);
|
const validateLogin = await Self.validateLogin(user, password);
|
||||||
await Self.app.models.SignInLog.create({
|
await Self.app.models.SignInLog.create({
|
||||||
id: validateLogin.token,
|
token: validateLogin.token,
|
||||||
userFk: vnUser.id,
|
userFk: vnUser.id,
|
||||||
ip: ctx.req.ip
|
ip: ctx.req.ip
|
||||||
});
|
});
|
||||||
|
|
|
@ -8,7 +8,7 @@ DROP TABLE IF EXISTS `account`.`signInLog`;
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
/*!40101 SET character_set_client = utf8 */;
|
||||||
CREATE TABLE `account`.`signInLog` (
|
CREATE TABLE `account`.`signInLog` (
|
||||||
`id` varchar(10) NOT NULL ,
|
`token` varchar(255) NOT NULL ,
|
||||||
`userFk` int(10) unsigned DEFAULT NULL,
|
`userFk` int(10) unsigned DEFAULT NULL,
|
||||||
`creationDate` timestamp NULL DEFAULT current_timestamp(),
|
`creationDate` timestamp NULL DEFAULT current_timestamp(),
|
||||||
`ip` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
|
`ip` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
|
||||||
|
|
|
@ -7,13 +7,16 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"properties": {
|
"properties": {
|
||||||
"id": {
|
"token": {
|
||||||
"type": "string"
|
"required": true,
|
||||||
|
"type": "string",
|
||||||
|
"description": "Token's user"
|
||||||
},
|
},
|
||||||
"creationDate": {
|
"creationDate": {
|
||||||
"type": "date"
|
"type": "date"
|
||||||
},
|
},
|
||||||
"userFk": {
|
"userFk": {
|
||||||
|
"required": true,
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"ip": {
|
"ip": {
|
||||||
|
|
Loading…
Reference in New Issue