|
@@ -78,19 +78,22 @@ class Ticket(models.Model):
|
|
|
TICKET_TYPES_CHOICES = tuple((item[0], item[1]) for item in TICKET_TYPES)
|
|
|
LIFE_CYCLE_DICT = dict((item[0], item[2]) for item in TICKET_TYPES)
|
|
|
|
|
|
+ # DATA
|
|
|
title = models.CharField(max_length=128)
|
|
|
- ticket_list = models.ForeignKey(TicketList, on_delete=models.CASCADE)
|
|
|
- ticket_type = models.PositiveSmallIntegerField(choices=TICKET_TYPES_CHOICES, default=1)
|
|
|
status = models.PositiveSmallIntegerField(null=True)
|
|
|
created_at = models.DateTimeField(auto_now_add=True, editable=False)
|
|
|
updated_at = models.DateTimeField(auto_now=True)
|
|
|
due_date = models.DateField()
|
|
|
- created_by = models.ForeignKey(get_user_model(), on_delete=models.SET_NULL, null=True, related_name="created_by", editable=False)
|
|
|
- assigned_to = models.ForeignKey(get_user_model(), on_delete=models.SET_NULL, null=True, blank=True, related_name="assigned_to")
|
|
|
note = models.TextField(blank=True, null=True)
|
|
|
json = models.TextField(blank=True, null=True)
|
|
|
priority = models.PositiveSmallIntegerField(default=0)
|
|
|
|
|
|
+ # FK
|
|
|
+ created_by = models.ForeignKey(get_user_model(), on_delete=models.SET_NULL, null=True, related_name="created_by", editable=False)
|
|
|
+ assigned_to = models.ForeignKey(get_user_model(), on_delete=models.SET_NULL, null=True, blank=True, related_name="assigned_to")
|
|
|
+ ticket_list = models.ForeignKey(TicketList, on_delete=models.CASCADE)
|
|
|
+ ticket_type = models.PositiveSmallIntegerField(choices=TICKET_TYPES_CHOICES, default=1)
|
|
|
+
|
|
|
def __str__(self):
|
|
|
return self.title
|
|
|
|