From e5ee913548df19725e68a602a73bb6854ad1e06b Mon Sep 17 00:00:00 2001 From: baoliang Date: Sun, 25 Oct 2020 19:49:42 +0800 Subject: [PATCH 1/2] add message --- dashboard/models.py | 28 +++++++++++++++++--- polls/views/__pycache__/user.cpython-38.pyc | Bin 6008 -> 6008 bytes 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/dashboard/models.py b/dashboard/models.py index 2082d5d..d60ed6c 100644 --- a/dashboard/models.py +++ b/dashboard/models.py @@ -33,6 +33,7 @@ class Group(models.Model): ('0', '区域'), ('1', '媒体种类'), ('2', '行业'), + ('3', '管理') ) id = models.UUIDField('id', primary_key=True, default=uuid.uuid4) name = models.CharField('矩阵名称', max_length=256, null=True, blank=True) @@ -79,9 +80,27 @@ class Group_admin(models.Model): # 矩阵成员 +GROUP_USER_STATUS_CHOICES = ( + (0, '已删除'), + (1, '添加申请市级审核中'), + (2, '添加申请省级审核中'), + (3, '正常'), + (4, '注销申请市级审核中'), + (5, '注销申请省级审核中') +) class Group_user(models.Model): + """ + status: + '0': '已删除', + '1': '添加申请市级审核中', + '2': '添加申请省级审核中', + '3': '正常', + '4': '注销申请市级审核中', + '5': '注销申请省级审核中', + """ + id = models.UUIDField('id', primary_key=True, default=uuid.uuid4) user = models.ForeignKey( User, on_delete=models.CASCADE, null=True, blank=True) @@ -126,7 +145,8 @@ class Organization(models.Model): status = models.CharField('状态', max_length=256, null=True, blank=True) # 20201014新添加字段 - id_code = models.CharField('单位唯一标识码', max_length=256, null=True, blank=True) + id_code = models.CharField( + '单位唯一标识码', max_length=256, null=True, blank=True) created = models.DateTimeField('创建时间', auto_now_add=True) updated = models.DateTimeField('更新时间', auto_now=True) @@ -216,7 +236,8 @@ class NewMedia(models.Model): created = models.DateTimeField('创建时间', auto_now_add=True) updated = models.DateTimeField('更新时间', auto_now=True) # 20201015新增字段 - identificationcode = models.CharField('新媒体标识码', max_length=256, null=True, blank=True) + identificationcode = models.CharField( + '新媒体标识码', max_length=256, null=True, blank=True) function = models.CharField('功能', max_length=256, null=True, blank=True) articleurl = models.TextField('文章URL', null=True, blank=True) @@ -660,6 +681,7 @@ class News(models.Model): # 手机验证码验证表 class CheckCode(models.Model): - phone_code = models.CharField('手机验证码', max_length=256, null=True, blank=True) + phone_code = models.CharField( + '手机验证码', max_length=256, null=True, blank=True) phone = models.CharField('电话号', max_length=256, null=True, blank=True) c_time = models.DateTimeField('时间', auto_now_add=True) diff --git a/polls/views/__pycache__/user.cpython-38.pyc b/polls/views/__pycache__/user.cpython-38.pyc index 3071edb48e03e20574ad4a3c55c1dc7150161be8..ccdf190983908c9cf47c16675f8d68dc8d063096 100644 GIT binary patch delta 18 YcmeyN_d|~}l$V!_0SK0D Date: Sun, 25 Oct 2020 20:01:49 +0800 Subject: [PATCH 2/2] add message --- dashboard/models.py | 115 ++++++++++++++++++++++++-------------------- 1 file changed, 62 insertions(+), 53 deletions(-) diff --git a/dashboard/models.py b/dashboard/models.py index b85d96b..1330ae4 100644 --- a/dashboard/models.py +++ b/dashboard/models.py @@ -80,14 +80,6 @@ class Group_admin(models.Model): # 矩阵成员 -GROUP_USER_STATUS_CHOICES = ( - (0, '已删除'), - (1, '添加申请市级审核中'), - (2, '添加申请省级审核中'), - (3, '正常'), - (4, '注销申请市级审核中'), - (5, '注销申请省级审核中') -) class Group_user(models.Model): @@ -106,6 +98,7 @@ class Group_user(models.Model): User, on_delete=models.CASCADE, null=True, blank=True) group = models.ForeignKey( Group, on_delete=models.CASCADE, null=True, blank=True) + status = models.IntegerField('状态', default=1) created = models.DateTimeField('创建时间', auto_now_add=True) updated = models.DateTimeField('更新时间', auto_now=True) @@ -687,70 +680,86 @@ class CheckCode(models.Model): c_time = models.DateTimeField('时间', auto_now_add=True) -#新媒体舆情临时表 +# 新媒体舆情临时表 class NewmediaSentimentWeixin(models.Model): - id = models.UUIDField('id',primary_key=True,default=uuid.uuid4) - code = models.CharField('公众号',max_length=256,null=True,blank=True) - title = models.CharField('标题',max_length=256,null=True,blank=True) - comment_count = models.CharField('评论数',max_length=256,null=True,blank=True) - reply_count = models.CharField('回复数',max_length=256,null=True,blank=True) - date = models.CharField('发布时间',max_length=256,null=True,blank=True) + id = models.UUIDField('id', primary_key=True, default=uuid.uuid4) + code = models.CharField('公众号', max_length=256, null=True, blank=True) + title = models.CharField('标题', max_length=256, null=True, blank=True) + comment_count = models.CharField( + '评论数', max_length=256, null=True, blank=True) + reply_count = models.CharField( + '回复数', max_length=256, null=True, blank=True) + date = models.CharField('发布时间', max_length=256, null=True, blank=True) def __str__(self): return self.title + class NewmediaSentimentWeibo(models.Model): - id = models.UUIDField('id',primary_key=True,default=uuid.uuid4) - code = models.CharField('微博号',max_length=256,null=True,blank=True) - title = models.CharField('标题',max_length=256,null=True,blank=True) - comment_count = models.CharField('评论数',max_length=256,null=True,blank=True) - reply_count = models.CharField('回复数',max_length=256,null=True,blank=True) - date = models.CharField('发布时间',max_length=256,null=True,blank=True) + id = models.UUIDField('id', primary_key=True, default=uuid.uuid4) + code = models.CharField('微博号', max_length=256, null=True, blank=True) + title = models.CharField('标题', max_length=256, null=True, blank=True) + comment_count = models.CharField( + '评论数', max_length=256, null=True, blank=True) + reply_count = models.CharField( + '回复数', max_length=256, null=True, blank=True) + date = models.CharField('发布时间', max_length=256, null=True, blank=True) def __str__(self): return self.title + + class NewmediaSentimentToutiao(models.Model): - id = models.UUIDField('id',primary_key=True,default=uuid.uuid4) - code = models.CharField('头条号',max_length=256,null=True,blank=True) - title = models.CharField('标题',max_length=256,null=True,blank=True) - comment_count = models.CharField('评论数',max_length=256,null=True,blank=True) - reply_count = models.CharField('回复数',max_length=256,null=True,blank=True) - date = models.CharField('发布时间',max_length=256,null=True,blank=True) + id = models.UUIDField('id', primary_key=True, default=uuid.uuid4) + code = models.CharField('头条号', max_length=256, null=True, blank=True) + title = models.CharField('标题', max_length=256, null=True, blank=True) + comment_count = models.CharField( + '评论数', max_length=256, null=True, blank=True) + reply_count = models.CharField( + '回复数', max_length=256, null=True, blank=True) + date = models.CharField('发布时间', max_length=256, null=True, blank=True) def __str__(self): return self.title -#时效性监测临时表 +# 时效性监测临时表 + + class TimelinessMonitoring(models.Model): - id = models.UUIDField('id',primary_key=True,default=uuid.uuid4()) - n_type = models.CharField('新媒体类型',max_length=256,null=True,blank=True) - n_name = models.CharField('新媒体名称',max_length=256,null=True,blank=True) - o_type = models.CharField('主体类型',max_length=256,null=True,blank=True) - o_name = models.CharField('主体名称',max_length=256,null=True,blank=True) - city = models.CharField('市',null=True,blank=True,max_length=256) - counties = models.CharField('县区',max_length=256,null=True,blank=True) - remark = models.CharField('备注',max_length=256,null=True,blank=True) - results = models.CharField('监测结果',max_length=256,null=True,blank=True) - update = models.IntegerField('更新次数',max_length=256,null=True,blank=True) - silet = models.IntegerField('最大连续静默日数',max_length=256,null= True,blank=True) - start_data = models.CharField('开始时间',max_length=256,null=True,blank=True) - end_data = models.CharField('结束时间',max_length=256,null=True,blank=True) - comment = models.IntegerField('评论次数',max_length=256,null=True,blank=True) - date = models.CharField('最近更新时间',max_length=256,null=True,blank=True) + id = models.UUIDField('id', primary_key=True, default=uuid.uuid4()) + n_type = models.CharField('新媒体类型', max_length=256, null=True, blank=True) + n_name = models.CharField('新媒体名称', max_length=256, null=True, blank=True) + o_type = models.CharField('主体类型', max_length=256, null=True, blank=True) + o_name = models.CharField('主体名称', max_length=256, null=True, blank=True) + city = models.CharField('市', null=True, blank=True, max_length=256) + counties = models.CharField('县区', max_length=256, null=True, blank=True) + remark = models.CharField('备注', max_length=256, null=True, blank=True) + results = models.CharField('监测结果', max_length=256, null=True, blank=True) + update = models.IntegerField('更新次数', null=True, blank=True) + silet = models.IntegerField( + '最大连续静默日数', max_length=256, null=True, blank=True) + start_data = models.CharField( + '开始时间', max_length=256, null=True, blank=True) + end_data = models.CharField('结束时间', max_length=256, null=True, blank=True) + comment = models.IntegerField( + '评论次数', null=True, blank=True) + date = models.CharField('最近更新时间', max_length=256, null=True, blank=True) def __str__(self): return self.n_name -#错别字临时表 +# 错别字临时表 + + class Wrongly(models.Model): - id = models.UUIDField('id',primary_key=True,default=uuid.uuid4) - error = models.CharField('错误',max_length=256,null=True,blank=True) - idea = models.CharField('建议',max_length=256,null=True,blank=True) - site = models.TextField('上下文',null=True,blank=True) - n_type = models.CharField('新媒体类型',max_length=256,null=True,blank=True) - n_name = models.CharField('新媒体名称',max_length=256,null=True,blank=True) - date = models.CharField('发布时间',max_length=256,null=True,blank=True) - title = models.CharField('标题',max_length=256,null=True,blank=True) - url = models.CharField('URL',max_length=256,null=True,blank=True) + id = models.UUIDField('id', primary_key=True, default=uuid.uuid4) + error = models.CharField('错误', max_length=256, null=True, blank=True) + idea = models.CharField('建议', max_length=256, null=True, blank=True) + site = models.TextField('上下文', null=True, blank=True) + n_type = models.CharField('新媒体类型', max_length=256, null=True, blank=True) + n_name = models.CharField('新媒体名称', max_length=256, null=True, blank=True) + date = models.CharField('发布时间', max_length=256, null=True, blank=True) + title = models.CharField('标题', max_length=256, null=True, blank=True) + url = models.CharField('URL', max_length=256, null=True, blank=True) def __str__(self): return self.title