add message
This commit is contained in:
parent
0c6f2d31f6
commit
4dbfe71f70
|
@ -54,7 +54,7 @@ class Notice(models.Model):
|
||||||
|
|
||||||
class Task(models.Model):
|
class Task(models.Model):
|
||||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||||
created_by = models.ForeignKey(User, on_delete=models.SET_NULL)
|
created_by = models.ForeignKey(User, on_delete=models.CASCADE)
|
||||||
groups = models.ManyToManyField(Group)
|
groups = models.ManyToManyField(Group)
|
||||||
content = models.TextField('内容', null=True, blank=True)
|
content = models.TextField('内容', null=True, blank=True)
|
||||||
added = models.DateTimeField(auto_now_add=True)
|
added = models.DateTimeField(auto_now_add=True)
|
||||||
|
@ -110,7 +110,6 @@ class Message(models.Model):
|
||||||
send_to = models.ForeignKey(Group, on_delete=models.CASCADE)
|
send_to = models.ForeignKey(Group, on_delete=models.CASCADE)
|
||||||
content = models.TextField('内容', null=True, blank=True)
|
content = models.TextField('内容', null=True, blank=True)
|
||||||
task = models.ForeignKey(Task, on_delete=models.CASCADE)
|
task = models.ForeignKey(Task, on_delete=models.CASCADE)
|
||||||
addition = models.ForeignKey(MessageAddition, on_delete=models.CASCADE)
|
|
||||||
|
|
||||||
added = models.DateTimeField(auto_now_add=True)
|
added = models.DateTimeField(auto_now_add=True)
|
||||||
updated = models.DateTimeField(auto_now=True)
|
updated = models.DateTimeField(auto_now=True)
|
||||||
|
@ -119,7 +118,7 @@ class Message(models.Model):
|
||||||
ordering = ["-added"]
|
ordering = ["-added"]
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.send_from + ':' + self.send_to
|
return self.send_from + ':' + self.send_toÒ
|
||||||
|
|
||||||
|
|
||||||
class MessageAddition(models.Model):
|
class MessageAddition(models.Model):
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -7,4 +7,5 @@ aliyun-python-sdk-core-v3
|
||||||
channels
|
channels
|
||||||
requests
|
requests
|
||||||
parsel
|
parsel
|
||||||
django-summernote
|
django-summernote
|
||||||
|
python-dateutil
|
Loading…
Reference in New Issue