add taskaddition

This commit is contained in:
baoliang 2020-09-18 15:52:57 +08:00
parent 2d7967b990
commit 89109ed6db
1 changed files with 7 additions and 7 deletions

View File

@ -70,6 +70,13 @@ class Task(models.Model):
ordering = ["-added"] ordering = ["-added"]
MESSAGE_TYPE_CHOICES = (
(0, 'url'),
(1, 'file'),
(2, 'picture')
)
class TaskAddition(models.Model): class TaskAddition(models.Model):
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4) id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
task = models.ForeignKey(Task, on_delete=models.CASCADE) task = models.ForeignKey(Task, on_delete=models.CASCADE)
@ -115,13 +122,6 @@ class Message(models.Model):
return self.send_from + ':' + self.send_to return self.send_from + ':' + self.send_to
MESSAGE_TYPE_CHOICES = (
(0, 'url'),
(1, 'file'),
(2, 'picture')
)
class MessageAddition(models.Model): class MessageAddition(models.Model):
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4) id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
category = models.IntegerField( category = models.IntegerField(