meeting.php 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391
  1. <?php
  2. $author = function()
  3. {
  4. $array = array();
  5. $author = Dever::load('set/author-state');
  6. if($author)
  7. {
  8. $array += $author;
  9. }
  10. return $array;
  11. };
  12. $info = function()
  13. {
  14. $array = array();
  15. $info = Dever::load('set/info-state');
  16. if($info)
  17. {
  18. $array += $info;
  19. }
  20. return $array;
  21. };
  22. $cate = function()
  23. {
  24. $array = array();
  25. $cate = Dever::load('content/meeting_cate-state');
  26. if($cate)
  27. {
  28. $array += $cate;
  29. }
  30. return $array;
  31. };
  32. return array
  33. (
  34. # 表名
  35. 'name' => 'meeting',
  36. # 显示给用户看的名称
  37. 'lang' => '会议管理',
  38. 'order' => 170,
  39. # 数据结构
  40. 'struct' => array
  41. (
  42. 'id' => array
  43. (
  44. 'type' => 'int-11',
  45. 'name' => 'ID',
  46. 'default' => '',
  47. 'desc' => '',
  48. 'match' => 'is_numeric',
  49. 'search' => 'order',
  50. 'list' => true,
  51. ),
  52. 'name' => array
  53. (
  54. 'type' => 'varchar-80',
  55. 'name' => '标题',
  56. 'default' => '',
  57. 'desc' => '请输入标题',
  58. 'match' => 'is_string',
  59. 'update' => 'text',
  60. 'search' => 'fulltext',
  61. 'list' => true,
  62. ),
  63. 'info_id' => array
  64. (
  65. 'type' => 'int-11',
  66. 'name' => '所属小程序',
  67. 'default' => '1',
  68. 'desc' => '请选择所属小程序',
  69. 'match' => 'is_numeric',
  70. 'update' => 'select',
  71. 'option' => $info,
  72. 'search' => 'select',
  73. 'list' => '{info_id} > 0 ? Dever::load("set/info-one#name", {info_id}) : "未知"',
  74. ),
  75. 'cate_id' => array
  76. (
  77. 'type' => 'int-11',
  78. 'name' => '会议分类',
  79. 'default' => '1',
  80. 'desc' => '请选择会议分类',
  81. 'match' => 'is_numeric',
  82. 'update' => 'select',
  83. 'option' => $cate,
  84. 'search' => 'select',
  85. 'list' => '{cate_id} > 0 ? Dever::load("content/meeting_cate-one#name", {cate_id}) : "未知"',
  86. ),
  87. 'desc' => array
  88. (
  89. 'type' => 'varchar-255',
  90. 'name' => '描述',
  91. 'default' => '',
  92. 'desc' => '请输入描述',
  93. 'match' => 'option',
  94. 'update' => 'textarea',
  95. 'search' => 'fulltext',
  96. //'list' => true,
  97. ),
  98. 'pic' => array
  99. (
  100. 'type' => 'varchar-150',
  101. 'name' => '封面',
  102. 'default' => '',
  103. 'desc' => '请选择封面',
  104. 'match' => 'is_string',
  105. 'update' => 'image',
  106. 'key' => '1',
  107. 'place' => '150',
  108. ),
  109. 'link' => array
  110. (
  111. 'type' => 'varchar-200',
  112. 'name' => '链接-填写此项则直接跳转到该链接',
  113. 'default' => '',
  114. 'desc' => '请输入标题',
  115. 'match' => 'option',
  116. 'update' => 'text',
  117. 'search' => 'fulltext',
  118. //'list' => true,
  119. ),
  120. 'top' => array
  121. (
  122. 'type' => 'varchar-150',
  123. 'name' => '头图',
  124. 'default' => '',
  125. 'desc' => '请选择头图',
  126. 'match' => 'option',
  127. 'update' => 'image',
  128. 'key' => '1',
  129. 'place' => '150',
  130. ),
  131. 'sdate' => array
  132. (
  133. 'type' => 'int-11',
  134. 'name' => '开始时间-头部的正在进行的会议按照开始时间和结束时间判定',
  135. 'match' => 'is_numeric',
  136. 'desc' => '开始时间',
  137. 'update' => 'date',
  138. //'list' => 'date("Y-m-d H:i:s", {sdate})',
  139. 'callback' => 'maketime',
  140. ),
  141. 'edate' => array
  142. (
  143. 'type' => 'int-11',
  144. 'name' => '结束时间',
  145. 'match' => 'is_numeric',
  146. 'desc' => '结束时间',
  147. 'update' => 'date',
  148. //'list' => 'date("Y-m-d H:i:s", {edate})',
  149. 'callback' => 'maketime',
  150. ),
  151. 'num' => array
  152. (
  153. 'type' => 'varchar-80',
  154. 'name' => '参会人数',
  155. 'default' => '',
  156. 'desc' => '请输入参会人数',
  157. 'match' => 'option',
  158. 'update' => 'text',
  159. //'search' => 'fulltext',
  160. 'list' => true,
  161. 'edit' => true,
  162. ),
  163. 'num_add_view' => array
  164. (
  165. 'type' => 'int-11',
  166. 'name' => '手动增加浏览量pv',
  167. 'default' => '0',
  168. 'desc' => '请填写手动增加浏览量pv',
  169. 'match' => 'option',
  170. 'update' => 'text',
  171. ),
  172. 'num_up' => array
  173. (
  174. 'type' => 'int-11',
  175. 'name' => '赞数',
  176. 'default' => '0',
  177. 'desc' => '请填写赞数',
  178. 'match' => 'option',
  179. //'search' => 'order',
  180. 'list' => '"赞数:{num_up}<br />浏览量:{num_view}+{num_add_view}<br />回复数:{num_review}<br />"',
  181. 'list_name' => '统计数字',
  182. ),
  183. 'num_view' => array
  184. (
  185. 'type' => 'int-11',
  186. 'name' => '浏览量pv',
  187. 'default' => '0',
  188. 'desc' => '请填写浏览量pv',
  189. 'match' => 'option',
  190. 'search' => 'order',
  191. //'list' => '{num_view}+{num_add_view}',
  192. ),
  193. 'num_review' => array
  194. (
  195. 'type' => 'int-11',
  196. 'name' => '回复数',
  197. 'default' => '0',
  198. 'desc' => '请填写回复数',
  199. 'search' => 'order',
  200. 'match' => 'option',
  201. //'list' => true,
  202. ),
  203. 'content' => array
  204. (
  205. 'type' => 'text-800',
  206. 'name' => '内容',
  207. 'default' => '',
  208. 'desc' => '请输入内容',
  209. 'match' => 'option',
  210. 'update' => 'editor',
  211. 'key' => 1,
  212. ),
  213. 'reorder' => array
  214. (
  215. 'type' => 'int-11',
  216. 'name' => '排序(数值越大越靠前)',
  217. 'default' => '1',
  218. 'desc' => '请输入排序',
  219. 'match' => 'option',
  220. 'update' => 'text',
  221. 'search' => 'order',
  222. 'list_name' => '排序',
  223. 'list' => true,
  224. 'order' => 'desc',
  225. 'edit' => true,
  226. ),
  227. 'state' => array
  228. (
  229. 'type' => 'tinyint-1',
  230. 'name' => '状态',
  231. 'default' => '1',
  232. 'desc' => '请选择状态',
  233. 'match' => 'is_numeric',
  234. ),
  235. 'cdate' => array
  236. (
  237. 'type' => 'int-11',
  238. 'name' => '录入时间',
  239. 'match' => array('is_numeric', time()),
  240. 'desc' => '',
  241. # 只有insert时才生效
  242. 'insert' => true,
  243. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  244. ),
  245. ),
  246. # 管理功能
  247. 'manage' => array
  248. (
  249. ),
  250. # request 请求接口定义
  251. 'request' => array
  252. (
  253. 'getAll' => array
  254. (
  255. # 匹配的正则或函数 选填项
  256. 'option' => array
  257. (
  258. 'info_id' => 'yes',
  259. 'cate_id' => 'yes',
  260. 'ids' => array('yes-id', '!='),
  261. ),
  262. 'type' => 'all',
  263. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  264. 'page' => array(10, 'list'),
  265. 'col' => '*,(num_view+num_add_view) as num_view',
  266. ),
  267. 'getOld' => array
  268. (
  269. # 匹配的正则或函数 选填项
  270. 'option' => array
  271. (
  272. 'info_id' => 'yes',
  273. 'cate_id' => 'yes',
  274. 'end' => array('yes-edate', '<'),
  275. ),
  276. 'type' => 'all',
  277. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  278. 'page' => array(10, 'list'),
  279. 'col' => '*',
  280. ),
  281. 'getCur' => array
  282. (
  283. # 匹配的正则或函数 选填项
  284. 'option' => array
  285. (
  286. 'info_id' => 'yes',
  287. 'start' => array('yes-sdate', '<='),
  288. 'end' => array('yes-edate', '>='),
  289. ),
  290. 'type' => 'all',
  291. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  292. 'col' => '*',
  293. ),
  294. 'getWei' => array
  295. (
  296. # 匹配的正则或函数 选填项
  297. 'option' => array
  298. (
  299. 'info_id' => 'yes',
  300. 'start' => array('yes-sdate', '>'),
  301. ),
  302. 'type' => 'all',
  303. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  304. 'col' => '*',
  305. ),
  306. # 更新浏览量
  307. 'addView' => array
  308. (
  309. 'type' => 'update',
  310. 'where' => array
  311. (
  312. 'id' => 'yes',
  313. ),
  314. 'set' => array
  315. (
  316. 'num_view' => array('1', '+='),
  317. ),
  318. ),
  319. # 更新回复数
  320. 'addReview' => array
  321. (
  322. 'type' => 'update',
  323. 'where' => array
  324. (
  325. 'id' => 'yes',
  326. ),
  327. 'set' => array
  328. (
  329. 'num_review' => array('1', '+='),
  330. ),
  331. ),
  332. # 更新点赞数
  333. 'addUp' => array
  334. (
  335. 'type' => 'update',
  336. 'where' => array
  337. (
  338. 'id' => 'yes',
  339. ),
  340. 'set' => array
  341. (
  342. 'num_up' => array('1', '+='),
  343. ),
  344. ),
  345. # 更新点赞数
  346. 'desUp' => array
  347. (
  348. 'type' => 'update',
  349. 'where' => array
  350. (
  351. 'id' => 'yes',
  352. ),
  353. 'set' => array
  354. (
  355. 'num_up' => array('1', '-='),
  356. ),
  357. ),
  358. ),
  359. );