service_cate.php 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'service_cate',
  6. # 显示给用户看的名称
  7. 'lang' => '业务分类',
  8. # 后台菜单排序
  9. 'order' => 9,
  10. 'menu' => false,
  11. # 数据结构
  12. 'struct' => array
  13. (
  14. 'id' => array
  15. (
  16. 'type' => 'int-11',
  17. 'name' => 'ID',
  18. 'default' => '',
  19. 'desc' => '',
  20. 'match' => 'is_numeric',
  21. 'search' => 'order',
  22. 'list' => true,
  23. 'order' => 'desc',
  24. ),
  25. 'name' => array
  26. (
  27. 'type' => 'varchar-32',
  28. 'name' => '分类名称',
  29. 'default' => '',
  30. 'desc' => '请输入名称',
  31. 'match' => 'is_string',
  32. 'update' => 'text',
  33. 'search' => 'fulltext',
  34. 'list' => true,
  35. ),
  36. 'desc' => array
  37. (
  38. 'type' => 'varchar-500',
  39. 'name' => '分类描述',
  40. 'default' => '',
  41. 'desc' => '描述',
  42. 'match' => 'is_string',
  43. 'update' => 'textarea',
  44. ),
  45. 'top' => array
  46. (
  47. 'type' => 'varchar-150',
  48. 'name' => '顶部图',
  49. 'default' => '',
  50. 'desc' => '顶部图',
  51. 'match' => 'option',
  52. 'update' => 'image',
  53. 'key' => '1',
  54. 'place' => '882*147',
  55. ),
  56. 'reorder' => array
  57. (
  58. 'type' => 'int-11',
  59. 'name' => '排序(数值越大越靠前)',
  60. 'default' => '1',
  61. 'desc' => '请输入排序',
  62. 'match' => 'option',
  63. 'update' => 'text',
  64. 'search' => 'order',
  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. 'default' => array
  90. (
  91. 'col' => 'name,reorder,cdate',
  92. 'value' => array
  93. (
  94. '"默认分类",100,' . time(),
  95. ),
  96. ),
  97. 'manage' => array
  98. (
  99. 'lang' => 'name',
  100. 'insert' => false,
  101. 'edit' => false,
  102. # 自定义快捷新增和编辑
  103. 'button' => array
  104. (
  105. '新增' => array('fast'),
  106. ),
  107. # 快捷更新
  108. 'list_button' => array
  109. (
  110. 'edit' => array('编辑'),
  111. ),
  112. ),
  113. 'request' => array
  114. (
  115. 'getAll' => array
  116. (
  117. # 匹配的正则或函数 选填项
  118. 'option' => array
  119. (
  120. 'state' => 1,
  121. ),
  122. 'type' => 'all',
  123. 'order' => array('reorder' => 'desc','id' => 'desc'),
  124. 'col' => '*',
  125. ),
  126. 'getFive' => array
  127. (
  128. # 匹配的正则或函数 选填项
  129. 'option' => array
  130. (
  131. 'state' => 1,
  132. ),
  133. 'type' => 'all',
  134. 'order' => array('reorder' => 'desc', 'cdate' => 'desc'),
  135. 'limit' => '0,5',
  136. 'col' => '*',
  137. ),
  138. ),
  139. );