fix some ipinfo table formats
This commit is contained in:
parent
261540422c
commit
e8b6351da0
|
@ -27,11 +27,11 @@ const IPInfo = sequelize.define('IPInfo', {
|
|||
},
|
||||
|
||||
org: {
|
||||
type: DataTypes.CHAR(60),
|
||||
type: `${DataTypes.CHAR(60)} CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci`,
|
||||
},
|
||||
|
||||
descr: {
|
||||
type: DataTypes.CHAR(60),
|
||||
type: `${DataTypes.CHAR(60)} CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci`,
|
||||
},
|
||||
|
||||
asn: {
|
||||
|
@ -49,7 +49,7 @@ const IPInfo = sequelize.define('IPInfo', {
|
|||
* proxycheck
|
||||
*/
|
||||
pcheck: {
|
||||
type: DataTypes.CHAR(60),
|
||||
type: `${DataTypes.CHAR(60)} CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci`,
|
||||
},
|
||||
}, {
|
||||
getterMethods: {
|
||||
|
@ -64,6 +64,11 @@ const IPInfo = sequelize.define('IPInfo', {
|
|||
this.setDataValue('proxy', num);
|
||||
},
|
||||
|
||||
asn(value) {
|
||||
const asn = value.split(',')[0];
|
||||
this.setDataValue('asn', asn);
|
||||
},
|
||||
|
||||
org(value) {
|
||||
this.setDataValue('org', value.slice(0, 60));
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user