Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hit = await VerifLog.findOne({where : {vcode: vcode_received,
- cell: cell,
- cell_country_code: cell_country_code,
- device_id: device_id,
- redeemed: false}});
- hit is : veriflog {
- dataValues:
- { id: 31,
- cell: '6303623200',
- cell_country_code: '1',
- vcode: '90282',
- device_id: '8c9c25711c7d0262',
- redeemed: false,
- user_id: '20',
- createdAt: 2019-04-28T06:10:15.827Z },
- _previousDataValues:
- { id: 31,
- cell: '6303623200',
- cell_country_code: '1',
- vcode: '90282',
- device_id: '8c9c25711c7d0262',
- redeemed: false,
- user_id: '20',
- createdAt: 2019-04-28T06:10:15.827Z },
- _changed: {},
- .......
- const VerifLog = db.define('veriflog', {
- /* id: {type: Sql.INTEGER,
- primaryKey:true,
- autoIncrement: true,
- min: 1}, */
- cell: Sql.STRING,
- cell_country_code: Sql.STRING,
- vcode: Sql.STRING,
- device_id: Sql.STRING,
- redeemed: {
- type: Sql.BOOLEAN,
- default: false
- },
- user_id: Sql.INTEGER,
- }, {
- timestamps: true,
- updatedAt: false,
- indexes: [
- {
- fields: ['cell_country_code', 'cell'],
- },
- {
- fields: ["device_id"],
- },
- {
- fields: ["redeemed"],
- },
- {
- fields: ['user_id'],
- },
- ],
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement