cate.php 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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. 'cover' => array
  47. (
  48. 'type' => 'varchar-150',
  49. 'name' => '封面图-公众号支付中的封面图,图片尺寸460*759px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
  50. 'default' => '',
  51. 'desc' => '封面图',
  52. 'match' => 'option',
  53. 'update' => 'image',
  54. 'key' => '1',
  55. 'place' => '150',
  56. ),
  57. 'logo' => array
  58. (
  59. 'type' => 'varchar-150',
  60. 'name' => 'logo图-公众号支付中的logo图,图片尺寸100*100px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
  61. 'default' => '',
  62. 'desc' => 'logo图',
  63. 'match' => 'option',
  64. 'update' => 'image',
  65. 'key' => '1',
  66. 'place' => '150',
  67. ),
  68. 'reorder' => array
  69. (
  70. 'type' => 'int-11',
  71. 'name' => '排序(数值越大越靠前)',
  72. 'default' => '1',
  73. 'desc' => '请输入排序',
  74. 'match' => 'option',
  75. 'update' => 'text',
  76. 'search' => 'order',
  77. 'list' => true,
  78. 'order' => 'desc',
  79. 'edit' => true,
  80. ),
  81. 'state' => array
  82. (
  83. 'type' => 'tinyint-1',
  84. 'name' => '状态',
  85. 'default' => '1',
  86. 'desc' => '请选择状态',
  87. 'match' => 'is_numeric',
  88. ),
  89. 'cdate' => array
  90. (
  91. 'type' => 'int-11',
  92. 'name' => '录入时间',
  93. 'match' => array('is_numeric', time()),
  94. 'desc' => '',
  95. # 只有insert时才生效
  96. 'insert' => true,
  97. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  98. ),
  99. ),
  100. # 默认值
  101. 'default' => array
  102. (
  103. 'col' => 'name,state,cdate',
  104. 'value' => array
  105. (
  106. '"默认分类",1,' . time(),
  107. ),
  108. ),
  109. 'manage' => array
  110. (
  111. //'insert' => false,
  112. //'edit' => false,
  113. ),
  114. 'request' => array
  115. (
  116. 'getAll' => array
  117. (
  118. # 匹配的正则或函数 选填项
  119. 'option' => array
  120. (
  121. 'state' => 1,
  122. ),
  123. 'type' => 'all',
  124. 'order' => array('reorder' => 'desc','id' => 'desc'),
  125. 'col' => '*',
  126. ),
  127. ),
  128. );