fix chat_id fields

This commit is contained in:
2019-01-28 00:49:17 +03:00
parent 188c8c1b1a
commit 5306a033b2
3 changed files with 28 additions and 5 deletions
+2 -2
View File
@@ -11,14 +11,14 @@ from pyrogram import Chat as PyrogramChat, Message as PyrogramMessage
class AggregationSource(models.Model):
owner = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
title = models.CharField(max_length=64)
chat_id = models.IntegerField(db_index=True)
chat_id = models.CharField(db_index=True, max_length=64)
def __str__(self):
return self.title
class Chat(models.Model):
chat_id = models.IntegerField(db_index=True)
chat_id = models.CharField(db_index=True, max_length=64)
title = models.TextField()
username = models.CharField(max_length=64, null=True, blank=True)
photo = models.ImageField(null=True, blank=True)