system_setting.py 757 B

12345678910111213141516171819202122232425262728293031323334
  1. # coding=utf-8
  2. """
  3. @project: maxkb
  4. @Author:虎
  5. @file: system_management.py
  6. @date:2024/3/19 13:47
  7. @desc: 邮箱管理
  8. """
  9. from django.db import models
  10. from common.mixins.app_model_mixin import AppModelMixin
  11. class SettingType(models.IntegerChoices):
  12. """系统设置类型"""
  13. EMAIL = 0, '邮箱'
  14. RSA = 1, "私钥秘钥"
  15. LOG = 2, "日志清理时间"
  16. class SystemSetting(AppModelMixin):
  17. """
  18. 系统设置
  19. """
  20. type = models.IntegerField(primary_key=True, verbose_name='设置类型', choices=SettingType.choices,
  21. default=SettingType.EMAIL)
  22. meta = models.JSONField(verbose_name="配置数据", default=dict)
  23. class Meta:
  24. db_table = "system_setting"