Commit 1a498b0e authored by 段英荣's avatar 段英荣

modify

parent da3b27a5
......@@ -17,7 +17,7 @@ class User(models.Model):
db_table = 'user'
app_label = 'api'
id = models.IntegerField(verbose_name="用户ID")
id = models.IntegerField(primary_key=True,verbose_name="用户ID")
name = models.CharField(verbose_name="用户名称")
icon = models.CharField(verbose_name='')
......
......@@ -18,7 +18,7 @@ class UserFollow(models.Model):
app_label = 'api'
#user_id = models.IntegerField(verbose_name="用户ID")
user = models.ForeignKey(User,related_name=u"userfollow",verbose_name="关注用户信息",null=False)
user = models.ForeignKey(User,related_name="userfollow",verbose_name="关注用户信息",null=False)
#user = models.ForeignKey(User, related_name='userFollow',on_delete=models.CASCADE)
follow_id = models.IntegerField(verbose_name="关注的用户ID")
is_online = models.BooleanField(verbose_name="是否上线")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment