2021-09-09 06:00:50 +00:00
|
|
|
from django.utils.translation import ugettext_lazy as _
|
|
|
|
from rest_framework import serializers
|
|
|
|
|
|
|
|
__all__ = ['CleaningSerializer']
|
|
|
|
|
|
|
|
|
|
|
|
class CleaningSerializer(serializers.Serializer):
|
|
|
|
LOGIN_LOG_KEEP_DAYS = serializers.IntegerField(
|
2021-09-15 08:22:51 +00:00
|
|
|
min_value=1, max_value=9999,
|
2021-09-09 06:00:50 +00:00
|
|
|
label=_("Login log keep days"), help_text=_("Unit: day")
|
|
|
|
)
|
|
|
|
TASK_LOG_KEEP_DAYS = serializers.IntegerField(
|
2021-09-15 08:22:51 +00:00
|
|
|
min_value=1, max_value=9999,
|
2021-09-09 06:00:50 +00:00
|
|
|
label=_("Task log keep days"), help_text=_("Unit: day")
|
|
|
|
)
|
|
|
|
OPERATE_LOG_KEEP_DAYS = serializers.IntegerField(
|
2021-09-15 08:22:51 +00:00
|
|
|
min_value=1, max_value=9999,
|
2021-09-09 06:00:50 +00:00
|
|
|
label=_("Operate log keep days"), help_text=_("Unit: day")
|
|
|
|
)
|
|
|
|
FTP_LOG_KEEP_DAYS = serializers.IntegerField(
|
2021-09-15 08:22:51 +00:00
|
|
|
min_value=1, max_value=9999,
|
2021-09-09 06:00:50 +00:00
|
|
|
label=_("FTP log keep days"), help_text=_("Unit: day")
|
|
|
|
)
|
|
|
|
CLOUD_SYNC_TASK_EXECUTION_KEEP_DAYS = serializers.IntegerField(
|
2021-09-15 08:22:51 +00:00
|
|
|
min_value=1, max_value=9999,
|
2021-09-09 06:00:50 +00:00
|
|
|
label=_("Cloud sync record keep days"), help_text=_("Unit: day")
|
|
|
|
)
|
2021-11-12 03:04:38 +00:00
|
|
|
TERMINAL_SESSION_KEEP_DURATION = serializers.IntegerField(
|
|
|
|
min_value=1, max_value=99999, required=True, label=_('Session keep duration'),
|
|
|
|
help_text=_('Unit: days, Session, record, command will be delete if more than duration, only in database')
|
|
|
|
)
|
|
|
|
|