cate.php 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'cate',
  6. # 显示给用户看的名称
  7. 'lang' => '小刊分类设置',
  8. # 后台菜单排序
  9. 'order' => 9,
  10. # 数据结构
  11. 'struct' => array
  12. (
  13. 'id' => array
  14. (
  15. 'type' => 'int-11',
  16. 'name' => 'ID',
  17. 'default' => '',
  18. 'desc' => '',
  19. 'match' => 'is_numeric',
  20. 'search' => 'order',
  21. 'list' => true,
  22. 'order' => 'desc',
  23. ),
  24. 'name' => array
  25. (
  26. 'type' => 'varchar-32',
  27. 'name' => '分类名称',
  28. 'default' => '',
  29. 'desc' => '请输入名称',
  30. 'match' => 'is_string',
  31. 'update' => 'text',
  32. 'search' => 'fulltext',
  33. 'list' => true,
  34. ),
  35. 'title' => array
  36. (
  37. 'type' => 'varchar-32',
  38. 'name' => '页面title-公众号支付中的页面标题',
  39. 'default' => '',
  40. 'desc' => '页面title',
  41. 'match' => 'is_string',
  42. 'update' => 'text',
  43. 'search' => 'fulltext',
  44. // 'list' => true,
  45. ),
  46. 'desc' => array
  47. (
  48. 'type' => 'text-255',
  49. 'name' => '简介',
  50. 'default' => '',
  51. 'desc' => '简介',
  52. 'match' => 'option',
  53. 'update' => 'textarea',
  54. ),
  55. 'cover' => array
  56. (
  57. 'type' => 'varchar-150',
  58. 'name' => '封面图-公众号支付中的封面图,图片尺寸460*759px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
  59. 'default' => '',
  60. 'desc' => '封面图',
  61. 'match' => 'option',
  62. 'update' => 'image',
  63. 'key' => '1',
  64. 'place' => '150',
  65. ),
  66. 'logo' => array
  67. (
  68. 'type' => 'varchar-150',
  69. 'name' => 'logo图-公众号支付中的logo图,图片尺寸100*100px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
  70. 'default' => '',
  71. 'desc' => 'logo图',
  72. 'match' => 'option',
  73. 'update' => 'image',
  74. 'key' => '1',
  75. 'place' => '150',
  76. ),
  77. 'reorder' => array
  78. (
  79. 'type' => 'int-11',
  80. 'name' => '排序(数值越大越靠前)',
  81. 'default' => '1',
  82. 'desc' => '请输入排序',
  83. 'match' => 'option',
  84. 'update' => 'text',
  85. 'search' => 'order',
  86. 'list' => true,
  87. 'order' => 'desc',
  88. 'edit' => true,
  89. ),
  90. 'code_desc' => array
  91. (
  92. 'type' => 'text-255',
  93. 'name' => '兑换说明',
  94. 'default' => '',
  95. 'desc' => '兑换说明',
  96. 'match' => 'option',
  97. 'update' => 'editor',
  98. ),
  99. 'state' => array
  100. (
  101. 'type' => 'tinyint-1',
  102. 'name' => '状态',
  103. 'default' => '1',
  104. 'desc' => '请选择状态',
  105. 'match' => 'is_numeric',
  106. ),
  107. 'cdate' => array
  108. (
  109. 'type' => 'int-11',
  110. 'name' => '录入时间',
  111. 'match' => array('is_numeric', time()),
  112. 'desc' => '',
  113. # 只有insert时才生效
  114. 'insert' => true,
  115. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  116. ),
  117. ),
  118. # 默认值
  119. 'default' => array
  120. (
  121. 'col' => 'name,state,cdate',
  122. 'value' => array
  123. (
  124. '"默认分类",1,' . time(),
  125. ),
  126. ),
  127. 'manage' => array
  128. (
  129. //'insert' => false,
  130. //'edit' => false,
  131. ),
  132. 'request' => array
  133. (
  134. 'getAll' => array
  135. (
  136. # 匹配的正则或函数 选填项
  137. 'option' => array
  138. (
  139. 'state' => 1,
  140. ),
  141. 'type' => 'all',
  142. 'order' => array('reorder' => 'desc','id' => 'desc'),
  143. 'col' => '*',
  144. ),
  145. ),
  146. );