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);
|
||||
await Self.app.models.SignInLog.create({
|
||||
id: validateLogin.token,
|
||||
token: validateLogin.token,
|
||||
userFk: vnUser.id,
|
||||
ip: ctx.req.ip
|
||||
});
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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": {
|
||||
|
|
Loading…
Reference in New Issue