RedisKeyConstant.py 807 B

12345678910111213141516171819202122232425262728
  1. # -*- encoding: utf-8 -*-
  2. """
  3. @File : RedisKeyConstant.py
  4. @Time : 2024/11/20 15:13
  5. @Author : stephen
  6. @Email : zhangdongming@asj6.wecom.work
  7. @Software: PyCharm
  8. """
  9. from enum import Enum
  10. class RedisKeyConstant(Enum):
  11. # 设备版本信息
  12. ZOSI_DEVICE_VERSION_INFO = 'ZOSI:DEVICE:VERSION:'
  13. # 优惠券id锁
  14. COUPON_ID_LOCK = 'COUPON:ID:LOCK:'
  15. # 云存优惠券
  16. CLOUD_STORAGE_COUPONS = 'cloud_storage_coupons_'
  17. # 发放优惠券锁
  18. GRANT_COUPONS_LOCK = 'grant_coupons_lock_'
  19. # 基础模块用户优惠券
  20. BASIC_CLOUD_COUPON = 'BASIC:CLOUD:COUPON:'
  21. # Redis 过期时间常量(秒)
  22. EXPIRE_TIME_60_SECONDS = 60 # 60秒
  23. EXPIRE_TIME_30_MINUTES = 1800 # 30分钟
  24. EXPIRE_TIME_1_HOUR = 3600 # 1小时
  25. EXPIRE_TIME_24_HOURS = 86400 # 24小时