Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. hit = await VerifLog.findOne({where : {vcode: vcode_received,
  2. cell: cell,
  3. cell_country_code: cell_country_code,
  4. device_id: device_id,
  5. redeemed: false}});
  6.  
  7. hit is : veriflog {
  8. dataValues:
  9. { id: 31,
  10. cell: '6303623200',
  11. cell_country_code: '1',
  12. vcode: '90282',
  13. device_id: '8c9c25711c7d0262',
  14. redeemed: false,
  15. user_id: '20',
  16. createdAt: 2019-04-28T06:10:15.827Z },
  17. _previousDataValues:
  18. { id: 31,
  19. cell: '6303623200',
  20. cell_country_code: '1',
  21. vcode: '90282',
  22. device_id: '8c9c25711c7d0262',
  23. redeemed: false,
  24. user_id: '20',
  25. createdAt: 2019-04-28T06:10:15.827Z },
  26. _changed: {},
  27. .......
  28.  
  29. const VerifLog = db.define('veriflog', {
  30. /* id: {type: Sql.INTEGER,
  31. primaryKey:true,
  32. autoIncrement: true,
  33. min: 1}, */
  34. cell: Sql.STRING,
  35. cell_country_code: Sql.STRING,
  36. vcode: Sql.STRING,
  37. device_id: Sql.STRING,
  38. redeemed: {
  39. type: Sql.BOOLEAN,
  40. default: false
  41. },
  42. user_id: Sql.INTEGER,
  43. }, {
  44. timestamps: true,
  45. updatedAt: false,
  46. indexes: [
  47. {
  48. fields: ['cell_country_code', 'cell'],
  49. },
  50. {
  51. fields: ["device_id"],
  52. },
  53. {
  54. fields: ["redeemed"],
  55. },
  56. {
  57. fields: ['user_id'],
  58. },
  59. ],
  60. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement