refs #6434 feat: rename id key by token

This commit is contained in:
Javier Segarra 2023-11-16 08:30:01 +01:00
parent 301533b0ca
commit c6b5d7f5a4
3 changed files with 8 additions and 5 deletions

View File

@ -51,7 +51,7 @@ module.exports = Self => {
}
const validateLogin = await Self.validateLogin(user, password);
await Self.app.models.SignInLog.create({
id: validateLogin.token,
token: validateLogin.token,
userFk: vnUser.id,
ip: ctx.req.ip
});

View File

@ -8,7 +8,7 @@ DROP TABLE IF EXISTS `account`.`signInLog`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `account`.`signInLog` (
`id` varchar(10) NOT NULL ,
`token` varchar(255) NOT NULL ,
`userFk` int(10) unsigned DEFAULT NULL,
`creationDate` timestamp NULL DEFAULT current_timestamp(),
`ip` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,

View File

@ -7,13 +7,16 @@
}
},
"properties": {
"id": {
"type": "string"
"token": {
"required": true,
"type": "string",
"description": "Token's user"
},
"creationDate": {
"type": "date"
},
"userFk": {
"required": true,
"type": "number"
},
"ip": {