2022-06-23 05:52:28 +00:00
|
|
|
from django.db import models
|
|
|
|
from django.utils.translation import gettext_lazy as _
|
|
|
|
|
2022-07-22 08:24:57 +00:00
|
|
|
from .general import Ticket
|
2022-06-23 05:52:28 +00:00
|
|
|
|
|
|
|
__all__ = ['ApplyApplicationTicket']
|
|
|
|
|
|
|
|
|
|
|
|
class ApplyApplicationTicket(Ticket):
|
2022-07-12 07:28:42 +00:00
|
|
|
apply_permission_name = models.CharField(max_length=128, verbose_name=_('Permission name'))
|
2022-06-23 05:52:28 +00:00
|
|
|
# 申请信息
|
|
|
|
apply_category = models.CharField(
|
2022-09-06 11:57:03 +00:00
|
|
|
max_length=16, verbose_name=_('Category')
|
2022-06-23 05:52:28 +00:00
|
|
|
)
|
|
|
|
apply_type = models.CharField(
|
2022-09-06 11:57:03 +00:00
|
|
|
max_length=16, verbose_name=_('Type')
|
2022-06-23 05:52:28 +00:00
|
|
|
)
|
|
|
|
apply_applications = models.ManyToManyField(
|
|
|
|
'applications.Application', verbose_name=_('Apply applications'),
|
|
|
|
)
|
|
|
|
apply_system_users = models.ManyToManyField(
|
|
|
|
'assets.SystemUser', verbose_name=_('Apply system users'),
|
|
|
|
)
|
2022-07-22 08:24:57 +00:00
|
|
|
apply_actions = models.IntegerField(
|
2022-11-18 03:30:31 +00:00
|
|
|
choices=[
|
|
|
|
(255, 'All'), (1, 'Connect'), (2, 'Upload file'), (4, 'Download file'), (6, 'Upload download'),
|
|
|
|
(8, 'Clipboard copy'), (16, 'Clipboard paste'), (24, 'Clipboard copy paste')
|
|
|
|
], default=255, verbose_name=_('Actions')
|
2022-07-22 08:24:57 +00:00
|
|
|
)
|
2022-06-23 05:52:28 +00:00
|
|
|
apply_date_start = models.DateTimeField(verbose_name=_('Date start'), null=True)
|
|
|
|
apply_date_expired = models.DateTimeField(verbose_name=_('Date expired'), null=True)
|