您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

phpcms为何要将文章的”审核“状态专门放一个表呢?

2024/3/9 15:15:02发布30次查看
文章表news都有字段status,为何还要另外做一个表,将处于审核状态的文章复制到这个审核表,直接修改文章表的status字段不是一样的吗?
news 12为字段status
1 id mediumint(8) unsigned 2 catid smallint(5) unsigned 3 typeid smallint(5) unsigned 4 title varchar(200) utf8_general_ci 5 style char(24) utf8_general_ci 6 thumb varchar(100) utf8_general_ci 7 keywords varchar(80) utf8_general_ci 8 description mediumtext utf8_general_ci 9 posids tinyint(1) unsigned 10 url char(100) utf8_general_ci 11 listorder tinyint(3) unsigned 12 status tinyint(2) unsigned 13 sysadd tinyint(1) unsigned 14 islink tinyint(1) unsigned 15 username char(20) utf8_general_ci 16 inputtime int(10) unsigned 17 updatetime int(10) unsigned

content_check 7为字段status
1 checkid char(15) utf8_general_ci 2 catid smallint(5) unsigned 3 siteid smallint(5) unsigned 4 title char(80) utf8_general_ci 5 username char(20) utf8_general_ci 6 inputtime int(10) unsigned 7 status tinyint(1)

回复内容: 文章表news都有字段status,为何还要另外做一个表,将处于审核状态的文章复制到这个审核表,直接修改文章表的status字段不是一样的吗?
news 12为字段status
1 id mediumint(8) unsigned 2 catid smallint(5) unsigned 3 typeid smallint(5) unsigned 4 title varchar(200) utf8_general_ci 5 style char(24) utf8_general_ci 6 thumb varchar(100) utf8_general_ci 7 keywords varchar(80) utf8_general_ci 8 description mediumtext utf8_general_ci 9 posids tinyint(1) unsigned 10 url char(100) utf8_general_ci 11 listorder tinyint(3) unsigned 12 status tinyint(2) unsigned 13 sysadd tinyint(1) unsigned 14 islink tinyint(1) unsigned 15 username char(20) utf8_general_ci 16 inputtime int(10) unsigned 17 updatetime int(10) unsigned

content_check 7为字段status
1 checkid char(15) utf8_general_ci 2 catid smallint(5) unsigned 3 siteid smallint(5) unsigned 4 title char(80) utf8_general_ci 5 username char(20) utf8_general_ci 6 inputtime int(10) unsigned 7 status tinyint(1)

待审核文章数量肯定不大,但文章表可能有非常多的文章,甚至需要分表。
单独看表结构意义不大,我也没用过phpcms,我觉得这样可能是为了更容易对审核机制进行扩展开发。
例如,某刊物使用phpcms发布电子版,按照流程,文案要经过组长、副主编、主编三道审核,对于类似的情况下:
首先,从权限控制上来说,分表后权限管理就更清晰了,审核权限不包含对原文的修改,同时避免编辑原稿污染了受审核的数据。
其次,审核者可以在内容上批注意见,因为是内容副本,所以不影响原文。
最后,该表有独立的status字段,可以扩展出初审、复审、申诉等审核流程。
补充,有的cms将草稿也是独立存放的,其实也没有什么特别的好与坏的问题,我觉得是和设计者的性格有关。有的人喜欢把问题集中起来,攻关之后一马平川,有的人喜欢把问题分散开,避免复杂度的叠加减弱项目开发进度的掌控力。就像是审核表这样,不创建单独的表其实也能完成预定的任务,就是程序逻辑要复杂的多而已。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product