Beispiel #1
0
class PermissionGroupHasPermission(models.Model):
    """
	权限组拥有的权限
	"""
    group_id = models.IntegerField(default=0)
    permission_id = models.IntegerField(default=0)

    class Meta(object):
        table_name = 'rust_permission_group_has_permission'
Beispiel #2
0
class DynamicApproval(models.Model):
    """
	动态点赞
	"""
    dynamic_id = models.IntegerField(default=0, index=True)  # 动态id
    user_id = models.IntegerField(default=0, index=True)  # 点赞者的user_id

    class Meta(object):
        table_name = 'dynamic_approval'
Beispiel #3
0
class TopicActivity(models.Model):
    """
	话题热度
	"""
    topic_id = models.IntegerField(default=0, index=True)  # 话题id
    user_id = models.IntegerField(default=0, index=True)  # 用户id

    class Meta(object):
        table_name = 'topic_activity'
Beispiel #4
0
class UserLimitedPermission(models.Model):
    """
	用户禁止访问的资源及方法
	"""
    user_id = models.IntegerField(default=0)
    permission_id = models.IntegerField(default=0)
    updated_at = models.DateTimeField()  # 更新时间

    class Meta(object):
        table_name = 'rust_user_limited_permission'
Beispiel #5
0
class PermissionGroupHasUser(models.Model):
    """
	权限组中的用户
	"""
    group_id = models.IntegerField(default=0)
    user_id = models.IntegerField(default=0)
    updated_at = models.DateTimeField(null=False)

    class Meta(object):
        table_name = 'rust_permission_group_has_user'
Beispiel #6
0
class DynamicComment(models.Model):
    """
	动态评论
	"""
    dynamic_id = models.IntegerField(default=0, index=True)  # 动态id
    user_id = models.IntegerField(default=0, index=True)  # 评论者的user_id
    content = models.TextField(default='')  # 评论内容
    created_at = models.DateTimeField(auto_now_add=True)  # 创建时间

    class Meta(object):
        table_name = 'dynamic_comment'
Beispiel #7
0
class DynamicResource(models.Model):
    """
	动态资源
	"""
    dynamic_id = models.IntegerField(default=0, index=True)  # 动态id
    url = models.CharField(max_length=1024)  # 资源url
    size = models.CharField(max_length=64, default='')  # 资源大小
    type = models.IntegerField(default=DYNAMIC_RESOURCE_TYPE['IMAGE'])  # 资源类型

    class Meta(object):
        table_name = 'dynamic_resource'
Beispiel #8
0
class Dynamic(models.Model):
    """
	动态
	"""
    user_id = models.IntegerField(default=0)  # 发布人的user_id
    content = models.TextField(default='')  # 消息内容
    topic_id = models.IntegerField(default=0)  # 话题的id
    longitude = models.FloatField(default=0)  # 发布地点的经度
    latitude = models.FloatField(default=0)  # 发布地点的纬度
    created_at = models.DateTimeField(auto_now_add=True)  # 创建时间
    is_deleted = models.BooleanField(default=False)  # 是否删除

    class Meta(object):
        table_name = 'dynamic_dynamic'