meeting.php 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  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. 'content' => array
  164. (
  165. 'type' => 'text-800',
  166. 'name' => '内容',
  167. 'default' => '',
  168. 'desc' => '请输入内容',
  169. 'match' => 'option',
  170. 'update' => 'editor',
  171. 'key' => 1,
  172. ),
  173. 'reorder' => array
  174. (
  175. 'type' => 'int-11',
  176. 'name' => '排序(数值越大越靠前)',
  177. 'default' => '1',
  178. 'desc' => '请输入排序',
  179. 'match' => 'option',
  180. 'update' => 'text',
  181. 'search' => 'order',
  182. 'list_name' => '排序',
  183. 'list' => true,
  184. 'order' => 'desc',
  185. 'edit' => true,
  186. ),
  187. 'state' => array
  188. (
  189. 'type' => 'tinyint-1',
  190. 'name' => '状态',
  191. 'default' => '1',
  192. 'desc' => '请选择状态',
  193. 'match' => 'is_numeric',
  194. ),
  195. 'cdate' => array
  196. (
  197. 'type' => 'int-11',
  198. 'name' => '录入时间',
  199. 'match' => array('is_numeric', time()),
  200. 'desc' => '',
  201. # 只有insert时才生效
  202. 'insert' => true,
  203. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  204. ),
  205. ),
  206. # 管理功能
  207. 'manage' => array
  208. (
  209. ),
  210. # request 请求接口定义
  211. 'request' => array
  212. (
  213. 'getAll' => array
  214. (
  215. # 匹配的正则或函数 选填项
  216. 'option' => array
  217. (
  218. 'info_id' => 'yes',
  219. 'cate_id' => 'yes',
  220. 'ids' => array('yes-id', '!='),
  221. ),
  222. 'type' => 'all',
  223. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  224. 'page' => array(10, 'list'),
  225. 'col' => '*',
  226. ),
  227. 'getOld' => array
  228. (
  229. # 匹配的正则或函数 选填项
  230. 'option' => array
  231. (
  232. 'info_id' => 'yes',
  233. 'cate_id' => 'yes',
  234. 'end' => array('yes-edate', '<'),
  235. ),
  236. 'type' => 'all',
  237. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  238. 'page' => array(10, 'list'),
  239. 'col' => '*',
  240. ),
  241. 'getCur' => array
  242. (
  243. # 匹配的正则或函数 选填项
  244. 'option' => array
  245. (
  246. 'info_id' => 'yes',
  247. 'start' => array('yes-sdate', '<='),
  248. 'end' => array('yes-edate', '>='),
  249. ),
  250. 'type' => 'all',
  251. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  252. 'col' => '*',
  253. ),
  254. 'getWei' => array
  255. (
  256. # 匹配的正则或函数 选填项
  257. 'option' => array
  258. (
  259. 'info_id' => 'yes',
  260. 'start' => array('yes-sdate', '>'),
  261. ),
  262. 'type' => 'all',
  263. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  264. 'col' => '*',
  265. ),
  266. ),
  267. );