data.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <?php
  2. $type = Dever::config('base')->type;
  3. $audit = Dever::config('base')->audit;
  4. return array
  5. (
  6. # 表名
  7. 'name' => 'data',
  8. # 显示给用户看的名称
  9. 'lang' => '审核管理',
  10. # 后台菜单排序
  11. 'order' => 7,
  12. 'menu' => 'content',
  13. 'end' => array
  14. (
  15. 'update_audit' => 'audit/lib/core.audit',
  16. ),
  17. # 数据结构
  18. 'struct' => array
  19. (
  20. 'id' => array
  21. (
  22. 'type' => 'int-11',
  23. 'name' => 'ID',
  24. 'default' => '',
  25. 'desc' => '',
  26. 'match' => 'is_numeric',
  27. 'search' => 'order',
  28. //'list' => true,
  29. 'order' => 'desc',
  30. ),
  31. 'type' => array
  32. (
  33. 'type' => 'int-11',
  34. 'name' => '类型',
  35. 'default' => '1',
  36. 'desc' => '类型',
  37. 'match' => 'is_numeric',
  38. 'update' => 'radio',
  39. 'option' => $type,
  40. 'search' => 'select',
  41. 'list' => true,
  42. //'edit' => true,
  43. ),
  44. 'data_id' => array
  45. (
  46. 'type' => 'varchar-80',
  47. 'name' => '数据ID',
  48. 'default' => '',
  49. 'desc' => '数据id',
  50. 'match' => 'is_string',
  51. 'update' => 'text',
  52. //'search' => 'fulltext',
  53. //'list' => true,
  54. ),
  55. 'name' => array
  56. (
  57. 'type' => 'varchar-80',
  58. 'name' => '标题',
  59. 'default' => '',
  60. 'desc' => '标题',
  61. 'match' => 'is_string',
  62. 'update' => 'text',
  63. 'search' => 'fulltext',
  64. 'list' => true,
  65. ),
  66. 'audit' => array
  67. (
  68. 'type' => 'int-11',
  69. 'name' => '审核状态',
  70. 'default' => '1',
  71. 'desc' => '审核',
  72. 'match' => 'is_numeric',
  73. 'update' => 'select',
  74. 'option' => $audit,
  75. 'search' => 'select',
  76. 'list' => true,
  77. 'edit' => true,
  78. ),
  79. 'pdate' => array
  80. (
  81. 'type' => 'int-11',
  82. 'name' => '发布时间',
  83. 'match' => 'is_numeric',
  84. 'default' => '',
  85. 'desc' => '',
  86. 'update' => 'date',
  87. 'callback' => 'maketime',
  88. 'list' => 'date("Y-m-d H:i:s", {pdate})',
  89. ),
  90. 'reorder' => array
  91. (
  92. 'type' => 'int-11',
  93. 'name' => '排序(数值越大越靠前)',
  94. 'default' => '1',
  95. 'desc' => '请输入排序',
  96. 'match' => 'option',
  97. 'update' => 'text',
  98. 'search' => 'order',
  99. 'list' => true,
  100. 'order' => 'desc',
  101. //'edit' => true,
  102. ),
  103. 'state' => array
  104. (
  105. 'type' => 'tinyint-1',
  106. 'name' => '状态',
  107. 'default' => '1',
  108. 'desc' => '请选择状态',
  109. 'match' => 'is_numeric',
  110. 'edit' => false,
  111. ),
  112. 'cdate' => array
  113. (
  114. 'type' => 'int-11',
  115. 'name' => '录入时间',
  116. 'match' => array('is_numeric', time()),
  117. 'desc' => '',
  118. # 只有insert时才生效
  119. 'insert' => true,
  120. //'list' => 'date("Y-m-d H:i:s", {cdate})',
  121. ),
  122. ),
  123. 'manage' => array
  124. (
  125. 'delete' => false,
  126. 'edit' => false,
  127. 'insert' => false,
  128. 'mul' => true,
  129. ),
  130. 'request' => array
  131. (
  132. ),
  133. );