from django.db import models
from django.utils.translation import gettext_lazy as _  # 添加导入
from .common import ConfigCommonModel


class DebugSetting(ConfigCommonModel):
    # 系统调试设置（单例）
    debug_mode = models.BooleanField(default=False, verbose_name=_("调试模式"))

    internal_ips = models.TextField(
        default="127.0.0.1",
        verbose_name=_("内部IP列表"),
        help_text=_("'127.0.0.1'不需要添加，我们将追加其他IP。多个IP用英文逗号分隔"))

    class Meta:
        verbose_name = _("调试设置")
        verbose_name_plural = _("调试设置")

    def __str__(self):
        return str(_("系统调试设置"))
