Files
xingrin/backend/apps/common/definitions.py
2025-12-12 18:04:57 +08:00

21 lines
545 B
Python

from django.db import models
class ScanStatus(models.TextChoices):
"""扫描任务状态枚举"""
CANCELLED = 'cancelled', '已取消'
COMPLETED = 'completed', '已完成'
FAILED = 'failed', '失败'
INITIATED = 'initiated', '初始化'
RUNNING = 'running', '运行中'
class VulnSeverity(models.TextChoices):
"""漏洞严重性枚举"""
UNKNOWN = 'unknown', '未知'
INFO = 'info', '信息'
LOW = 'low', ''
MEDIUM = 'medium', ''
HIGH = 'high', ''
CRITICAL = 'critical', '危急'