meeting_cate.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <?php
  2. $info = function()
  3. {
  4. $array = array();
  5. $info = Dever::load('set/info-state');
  6. if($info)
  7. {
  8. $array += $info;
  9. }
  10. return $array;
  11. };
  12. return array
  13. (
  14. # 表名
  15. 'name' => 'meeting_cate',
  16. # 显示给用户看的名称
  17. 'lang' => '会议分类管理',
  18. 'order' => 10,
  19. # 数据结构
  20. 'struct' => array
  21. (
  22. 'id' => array
  23. (
  24. 'type' => 'int-11',
  25. 'name' => 'ID',
  26. 'default' => '',
  27. 'desc' => '',
  28. 'match' => 'is_numeric',
  29. 'search' => 'order',
  30. 'list' => true,
  31. ),
  32. 'name' => array
  33. (
  34. 'type' => 'varchar-80',
  35. 'name' => '分类名称',
  36. 'default' => '',
  37. 'desc' => '分类名称',
  38. 'match' => 'is_string',
  39. 'update' => 'text',
  40. 'search' => 'fulltext',
  41. 'list' => true,
  42. ),
  43. 'info_id' => array
  44. (
  45. 'type' => 'int-11',
  46. 'name' => '所属小程序',
  47. 'default' => '1',
  48. 'desc' => '请选择所属小程序',
  49. 'match' => 'is_numeric',
  50. 'update' => 'select',
  51. 'option' => $info,
  52. 'search' => 'select',
  53. 'list' => '{info_id} > 0 ? Dever::load("set/info-one#name", {info_id}) : "未知"',
  54. ),
  55. 'reorder' => array
  56. (
  57. 'type' => 'int-11',
  58. 'name' => '排序(数值越大越靠前)',
  59. 'default' => '1',
  60. 'desc' => '请输入排序',
  61. 'match' => 'option',
  62. 'update' => 'text',
  63. 'search' => 'order',
  64. 'list_name' => '排序',
  65. 'list' => true,
  66. 'order' => 'desc',
  67. 'edit' => true,
  68. ),
  69. 'state' => array
  70. (
  71. 'type' => 'tinyint-1',
  72. 'name' => '状态',
  73. 'default' => '1',
  74. 'desc' => '请选择状态',
  75. 'match' => 'is_numeric',
  76. ),
  77. 'cdate' => array
  78. (
  79. 'type' => 'int-11',
  80. 'name' => '录入时间',
  81. 'match' => array('is_numeric', time()),
  82. 'desc' => '',
  83. # 只有insert时才生效
  84. 'insert' => true,
  85. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  86. ),
  87. ),
  88. # 管理功能
  89. 'manage' => array
  90. (
  91. ),
  92. # request 请求接口定义
  93. 'request' => array
  94. (
  95. 'getAll' => array
  96. (
  97. # 匹配的正则或函数 选填项
  98. 'option' => array
  99. (
  100. 'state' => 1,
  101. ),
  102. 'type' => 'all',
  103. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  104. 'col' => '*',
  105. ),
  106. ),
  107. );