系统设计与任务分配
真德秀团队成员:
WoLykos(3005) hIrokuh(3023)
DoraMike(3026) JanzKing(3007)
JtvDeemo(3044)
1、团队项目码云地址
2、编码规范
(1)首先代码应遵循的总体规范原则是:简明、易读、无二义性。通俗易懂,简洁明了,正确率高,易于维护。
(2)缩进方面可自定义Tab为四个空格,行宽应保持100字符,括号正确利用,能清楚表示优先级。如大括号应独占一行,在多层嵌套的情况下也能看清结构和关系。
(3)多个变量不要定义在同一行上。变量命名方面也要规范,合理使用“匈牙利命名法”,避免可有可无的修饰词。包的命名来说,由每个版块的英文单词构成,首字母大写,合成词的首字母同样须为大写。例如:Chat、WeChat。方法的命名采用动宾结构,以能让读者顾名思义为原则。类和接口的命名是首字母大写
(4)下划线仅用来做前缀或分隔变量名字中的作用域标注或变量的语义。大小写方面采用Pascal形式。
(5)复杂的注释应统一放在函数头。设计的函数仅做到一件事,并且要做好,仅有单一的出口,错误处理要细致做好,利用好断言。
3、数据表与ER图
3.1 数据表
blogs_blog
+---------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+--------------+------+-----+---------+-------+
| id | int(11) | NO | PRI | NULL | |
| title | varchar(255) | YES | | NULL | |
| content | varchar(255) | YES | | NULL | |
| image | varchar(255) | YES | | NULL | |
| user_id | int(11) | YES | MUL | NULL | |
+---------+--------------+------+-----+---------+-------+
blogs_source
+---------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+--------------+------+-----+---------+-------+
| id | int(11) | NO | PRI | NULL | |
| images | varchar(255) | YES | | NULL | |
| blog_id | int(11) | YES | MUL | NULL | |
+---------+--------------+------+-----+---------+-------+
food_cities
+-------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+--------------+------+-----+---------+-------+
| id | int(255) | NO | PRI | NULL | |
| name | varchar(255) | YES | | NULL | |
| desc | varchar(255) | YES | | NULL | |
+-------+--------------+------+-----+---------+-------+
food_food
+------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------+--------------+------+-----+---------+-------+
| id | varchar(255) | NO | PRI | NULL | |
| name | varchar(255) | YES | | NULL | |
| desc | varchar(255) | YES | | NULL | |
| city_id | int(255) | YES | MUL | NULL | |
| area | varchar(255) | YES | | NULL | |
| money | int(10) | YES | | NULL | |
| sale_money | int(10) | YES | | NULL | |
| like_nums | int(10) | YES | | NULL | |
+------------+--------------+------+-----+---------+-------+
operation_blogcomments
+--------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------------+--------------+------+-----+---------+-------+
| id | int(11) | NO | PRI | NULL | |
| foodcomments | varchar(255) | YES | | NULL | |
| user_id | int(11) | YES | MUL | NULL | |
| blog_id | int(11) | YES | MUL | NULL | |
+--------------+--------------+------+-----+---------+-------+
operation_userfavorite
+----------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------+-------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| fav_id | int(11) | NO | | NULL | |
| fav_type | int(11) | NO | | NULL | |
| add_time | datetime(6) | NO | | NULL | |
| user_id | int(11) | NO | MUL | NULL | |
+----------+-------------+------+-----+---------+----------------+
operation_usermessage
+----------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------+--------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| user | int(11) | NO | | NULL | |
| message | varchar(500) | NO | | NULL | |
| has_read | tinyint(1) | NO | | NULL | |
| add_time | datetime(6) | NO | | NULL | |
+----------+--------------+------+-----+---------+----------------+
users_emailverifyrecord
+-----------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------+-------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| code | varchar(20) | NO | | NULL | |
| email | varchar(50) | NO | | NULL | |
| send_type | varchar(10) | NO | | NULL | |
| send_time | datetime(6) | NO | | NULL | |
+-----------+-------------+------+-----+---------+----------------+
desc users_userprofile
+---------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------------+--------------+------+-----+---------+-------+
| id | int(10) | NO | PRI | NULL | |
| password | varchar(255) | YES | | NULL | |
| name | varchar(255) | YES | | NULL | |
| email | varchar(255) | YES | | NULL | |
| image | varchar(255) | YES | | NULL | |
| blog | varchar(255) | YES | | NULL | |
| is_vip | int(2) | YES | | NULL | |
| view_histrory | varchar(255) | YES | | NULL | |
+---------------+--------------+------+-----+---------+-------+
3.2 ER图
4、体系结构设计
4.1 系统运行环境:
4.1.1 硬件环境
(1)处理器:英特尔 CORE i5;
(2)内存:8GB以上
(3)硬盘500G;
4.1.2 软件环境
(1)数据库:MySQL5.6
(2)IDE:Pycharm
(3)Python版本:3.7
(4)操作系统:Win10 64位
4.2 系统功能实现的主要框架:
Django框架
4.3 项目体系结构图:
5、任务分配
WoLykos(3005) | hIrokuh(3023) | DoraMike(3026) | JanzKing(3007) | JtvDeemo(3044) | |
编码规范 | 10% | 10% | 10% | 60% | 10% |
数据表 | 0% | 30% | 30% | 0% | 40% |
ER图 | 0% | 30% | 30% | 10% | 30% |
体系结构图 | 60% | 0% | 10% | 20% | 10% |
最终权重 | 17.5% | 17.5% | 20% | 22.5% | 22.5% |