meeting.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  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. return array
  23. (
  24. # 表名
  25. 'name' => 'meeting',
  26. # 显示给用户看的名称
  27. 'lang' => '会议管理',
  28. 'order' => 170,
  29. # 数据结构
  30. 'struct' => array
  31. (
  32. 'id' => array
  33. (
  34. 'type' => 'int-11',
  35. 'name' => 'ID',
  36. 'default' => '',
  37. 'desc' => '',
  38. 'match' => 'is_numeric',
  39. 'search' => 'order',
  40. 'list' => true,
  41. ),
  42. 'name' => array
  43. (
  44. 'type' => 'varchar-80',
  45. 'name' => '标题',
  46. 'default' => '',
  47. 'desc' => '请输入标题',
  48. 'match' => 'is_string',
  49. 'update' => 'text',
  50. 'search' => 'fulltext',
  51. 'list' => true,
  52. ),
  53. 'info_id' => array
  54. (
  55. 'type' => 'int-11',
  56. 'name' => '所属小程序',
  57. 'default' => '1',
  58. 'desc' => '请选择所属小程序',
  59. 'match' => 'is_numeric',
  60. 'update' => 'select',
  61. 'option' => $info,
  62. 'search' => 'select',
  63. 'list' => '{info_id} > 0 ? Dever::load("set/info-one#name", {info_id}) : "未知"',
  64. ),
  65. 'desc' => array
  66. (
  67. 'type' => 'varchar-255',
  68. 'name' => '描述',
  69. 'default' => '',
  70. 'desc' => '请输入描述',
  71. 'match' => 'is_string',
  72. 'update' => 'textarea',
  73. 'search' => 'fulltext',
  74. 'list' => true,
  75. ),
  76. 'pic' => array
  77. (
  78. 'type' => 'varchar-150',
  79. 'name' => '封面',
  80. 'default' => '',
  81. 'desc' => '请选择封面',
  82. 'match' => 'is_string',
  83. 'update' => 'image',
  84. 'key' => '1',
  85. 'place' => '150',
  86. ),
  87. 'link' => array
  88. (
  89. 'type' => 'varchar-200',
  90. 'name' => '链接-填写此项则直接跳转到该链接',
  91. 'default' => '',
  92. 'desc' => '请输入标题',
  93. 'match' => 'is_string',
  94. 'update' => 'text',
  95. 'search' => 'fulltext',
  96. 'list' => true,
  97. ),
  98. 'top' => array
  99. (
  100. 'type' => 'varchar-150',
  101. 'name' => '头图',
  102. 'default' => '',
  103. 'desc' => '请选择头图',
  104. 'match' => 'option',
  105. 'update' => 'image',
  106. 'key' => '1',
  107. 'place' => '150',
  108. ),
  109. 'sdate' => array
  110. (
  111. 'type' => 'int-11',
  112. 'name' => '开始时间-头部的正在进行的会议按照开始时间和结束时间判定',
  113. 'match' => 'is_numeric',
  114. 'desc' => '开始时间',
  115. 'update' => 'date',
  116. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  117. 'callback' => 'maketime',
  118. ),
  119. 'edate' => array
  120. (
  121. 'type' => 'int-11',
  122. 'name' => '结束时间',
  123. 'match' => 'is_numeric',
  124. 'desc' => '结束时间',
  125. 'update' => 'date',
  126. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  127. 'callback' => 'maketime',
  128. ),
  129. 'content' => array
  130. (
  131. 'type' => 'text-800',
  132. 'name' => '内容',
  133. 'default' => '',
  134. 'desc' => '请输入内容',
  135. 'match' => 'option',
  136. 'update' => 'editor',
  137. 'key' => 1,
  138. ),
  139. 'reorder' => array
  140. (
  141. 'type' => 'int-11',
  142. 'name' => '排序(数值越大越靠前)',
  143. 'default' => '1',
  144. 'desc' => '请输入排序',
  145. 'match' => 'option',
  146. 'update' => 'text',
  147. 'search' => 'order',
  148. 'list_name' => '排序',
  149. 'list' => true,
  150. 'order' => 'desc',
  151. 'edit' => true,
  152. ),
  153. 'state' => array
  154. (
  155. 'type' => 'tinyint-1',
  156. 'name' => '状态',
  157. 'default' => '1',
  158. 'desc' => '请选择状态',
  159. 'match' => 'is_numeric',
  160. ),
  161. 'cdate' => array
  162. (
  163. 'type' => 'int-11',
  164. 'name' => '录入时间',
  165. 'match' => array('is_numeric', time()),
  166. 'desc' => '',
  167. # 只有insert时才生效
  168. 'insert' => true,
  169. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  170. ),
  171. ),
  172. # 管理功能
  173. 'manage' => array
  174. (
  175. ),
  176. # request 请求接口定义
  177. 'request' => array
  178. (
  179. 'getAll' => array
  180. (
  181. # 匹配的正则或函数 选填项
  182. 'option' => array
  183. (
  184. 'info_id' => 'yes',
  185. 'ids' => array('yes', '!='),
  186. ),
  187. 'type' => 'all',
  188. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  189. 'page' => array(10, 'list'),
  190. 'col' => '*',
  191. ),
  192. 'getCur' => array
  193. (
  194. # 匹配的正则或函数 选填项
  195. 'option' => array
  196. (
  197. 'info_id' => 'yes',
  198. 'start' => array('yes-sdate', '>='),
  199. 'end' => array('yes-edate', '<='),
  200. ),
  201. 'type' => 'all',
  202. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  203. 'col' => '*',
  204. ),
  205. ),
  206. );