cate.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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. 'ename' => array
  36. (
  37. 'type' => 'varchar-180',
  38. 'name' => '英文栏目名称',
  39. 'default' => '',
  40. 'desc' => '英文栏目名称',
  41. 'match' => 'is_string',
  42. 'update' => 'text',
  43. 'search' => 'fulltext',
  44. 'list' => true,
  45. ),
  46. 'reorder' => array
  47. (
  48. 'type' => 'int-11',
  49. 'name' => '排序(数值越大越靠前)',
  50. 'default' => '1',
  51. 'desc' => '请输入排序',
  52. 'match' => 'option',
  53. 'update' => 'text',
  54. 'search' => 'order',
  55. 'list' => true,
  56. 'order' => 'desc',
  57. 'edit' => true,
  58. ),
  59. 'state' => array
  60. (
  61. 'type' => 'tinyint-1',
  62. 'name' => '状态',
  63. 'default' => '1',
  64. 'desc' => '请选择状态',
  65. 'match' => 'is_numeric',
  66. ),
  67. 'cdate' => array
  68. (
  69. 'type' => 'int-11',
  70. 'name' => '录入时间',
  71. 'match' => array('is_numeric', time()),
  72. 'desc' => '',
  73. # 只有insert时才生效
  74. 'insert' => true,
  75. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  76. ),
  77. ),
  78. # 默认值
  79. 'default' => array
  80. (
  81. 'col' => 'name,ename,reorder,cdate',
  82. 'value' => array
  83. (
  84. '"时装","FASHION",10,' . time(),
  85. '"美容","BEAUTY",9,' . time(),
  86. '"娱乐","RUNWAY",8,' . time(),
  87. '"视频","STAR",7,' . time(),
  88. '"秀场","VIDEO",6,' . time(),
  89. ),
  90. ),
  91. 'manage' => array
  92. (
  93. 'insert' => false,
  94. 'edit' => false,
  95. # 自定义快捷新增和编辑
  96. 'button' => array
  97. (
  98. '新增' => array('fast'),
  99. ),
  100. # 快捷更新
  101. 'list_button' => array
  102. (
  103. 'edit' => array('编辑'),
  104. ),
  105. ),
  106. 'request' => array
  107. (
  108. 'state' => array
  109. (
  110. # 匹配的正则或函数 选填项
  111. 'option' => array
  112. (
  113. 'state' => 1,
  114. ),
  115. 'type' => 'all',
  116. 'order' => array('reorder' => 'desc','id' => 'desc'),
  117. 'col' => '*',
  118. ),
  119. 'getAll' => array
  120. (
  121. # 匹配的正则或函数 选填项
  122. 'option' => array
  123. (
  124. 'state' => 1,
  125. # 小程序去掉视频栏目
  126. 'id_no' => array('yes-id', '!='),
  127. ),
  128. 'type' => 'all',
  129. 'order' => array('reorder' => 'desc','id' => 'desc'),
  130. 'col' => '*',
  131. ),
  132. ),
  133. );