meeting.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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. 'top' => array
  88. (
  89. 'type' => 'varchar-150',
  90. 'name' => '头图',
  91. 'default' => '',
  92. 'desc' => '请选择头图',
  93. 'match' => 'is_string',
  94. 'update' => 'image',
  95. 'key' => '1',
  96. 'place' => '150',
  97. ),
  98. 'sdate' => array
  99. (
  100. 'type' => 'int-11',
  101. 'name' => '开始时间',
  102. 'match' => 'is_numeric',
  103. 'desc' => '开始时间',
  104. 'update' => 'date',
  105. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  106. 'callback' => 'maketime',
  107. ),
  108. 'edate' => array
  109. (
  110. 'type' => 'int-11',
  111. 'name' => '结束时间',
  112. 'match' => 'is_numeric',
  113. 'desc' => '结束时间',
  114. 'update' => 'date',
  115. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  116. 'callback' => 'maketime',
  117. ),
  118. 'content' => array
  119. (
  120. 'type' => 'text-800',
  121. 'name' => '内容',
  122. 'default' => '',
  123. 'desc' => '请输入内容',
  124. 'match' => 'is_string',
  125. 'update' => 'editor',
  126. 'key' => 1,
  127. ),
  128. 'reorder' => array
  129. (
  130. 'type' => 'int-11',
  131. 'name' => '排序(数值越大越靠前)',
  132. 'default' => '1',
  133. 'desc' => '请输入排序',
  134. 'match' => 'option',
  135. 'update' => 'text',
  136. 'search' => 'order',
  137. 'list_name' => '排序',
  138. 'list' => true,
  139. 'order' => 'desc',
  140. 'edit' => true,
  141. ),
  142. 'state' => array
  143. (
  144. 'type' => 'tinyint-1',
  145. 'name' => '状态',
  146. 'default' => '1',
  147. 'desc' => '请选择状态',
  148. 'match' => 'is_numeric',
  149. ),
  150. 'cdate' => array
  151. (
  152. 'type' => 'int-11',
  153. 'name' => '录入时间',
  154. 'match' => array('is_numeric', time()),
  155. 'desc' => '',
  156. # 只有insert时才生效
  157. 'insert' => true,
  158. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  159. ),
  160. ),
  161. # 管理功能
  162. 'manage' => array
  163. (
  164. ),
  165. # request 请求接口定义
  166. 'request' => array
  167. (
  168. 'getAll' => array
  169. (
  170. # 匹配的正则或函数 选填项
  171. 'option' => array
  172. (
  173. 'info_id' => 'yes',
  174. ),
  175. 'type' => 'all',
  176. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  177. 'page' => array(10, 'list'),
  178. 'col' => '*',
  179. ),
  180. ),
  181. );