工单列表增加create_by字段

This commit is contained in:
caoqianming 2021-10-12 16:01:37 +08:00
parent 98a07bb27a
commit 39e69ce170
2 changed files with 3 additions and 2 deletions

View File

@ -181,4 +181,5 @@ class TicketFlow(BaseModel):
participant_type = models.IntegerField('处理人类型', default=0, help_text='0.无处理人,1.个人,2.多人', choices=State.type2_choices) participant_type = models.IntegerField('处理人类型', default=0, help_text='0.无处理人,1.个人,2.多人', choices=State.type2_choices)
participant = models.ForeignKey(User, verbose_name='处理人', on_delete=models.SET_NULL, null=True, blank=True, related_name='ticketflow_participant') participant = models.ForeignKey(User, verbose_name='处理人', on_delete=models.SET_NULL, null=True, blank=True, related_name='ticketflow_participant')
state = models.ForeignKey(State, verbose_name='当前状态', default=0, blank=True, on_delete=models.CASCADE) state = models.ForeignKey(State, verbose_name='当前状态', default=0, blank=True, on_delete=models.CASCADE)
ticket_data = models.JSONField('工单数据', default=dict, blank=True, help_text='可以用于记录当前表单数据json格式') ticket_data = models.JSONField('工单数据', default=dict, blank=True, help_text='可以用于记录当前表单数据json格式')
# intervene_type_id = models.IntegerField('干预类型', default=0, help_text='见service.constant_service中定义')

View File

@ -77,7 +77,7 @@ class TicketListSerializer(serializers.ModelSerializer):
class Meta: class Meta:
model = Ticket model = Ticket
fields = ['id', 'title', 'sn', 'workflow', 'workflow_', 'state', 'state_', 'act_state', 'create_time', 'update_time', 'participant_type'] fields = ['id', 'title', 'sn', 'workflow', 'workflow_', 'state', 'state_', 'act_state', 'create_time', 'update_time', 'participant_type', 'create_by']
@staticmethod @staticmethod
def setup_eager_loading(queryset): def setup_eager_loading(queryset):