template.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'template',
  6. # 显示给用户看的名称
  7. 'lang' => '模板配置',
  8. # 后台菜单排序
  9. 'order' => 3,
  10. 'menu' => false,
  11. 'check' => 'key',
  12. # 数据结构
  13. 'struct' => array
  14. (
  15. 'id' => array
  16. (
  17. 'type' => 'int-11',
  18. 'name' => 'ID',
  19. 'default' => '',
  20. 'desc' => '',
  21. 'match' => 'is_numeric',
  22. 'search' => 'order',
  23. 'list' => true,
  24. 'order' => 'desc',
  25. ),
  26. 'name' => array
  27. (
  28. 'type' => 'varchar-32',
  29. 'name' => '模板名称',
  30. 'default' => '',
  31. 'desc' => '模板名称',
  32. 'match' => 'is_string',
  33. 'update' => 'text',
  34. 'search' => 'fulltext',
  35. 'list' => true,
  36. ),
  37. 'key' => array
  38. (
  39. 'type' => 'varchar-60',
  40. 'name' => '模板标识',
  41. 'default' => '',
  42. 'desc' => '模板标识',
  43. 'match' => 'is_string',
  44. 'update' => Dever::input('where_id') ? 'hidden' : 'text',
  45. 'search' => 'fulltext',
  46. 'list' => true,
  47. ),
  48. 'desc' => array
  49. (
  50. 'type' => 'varchar-200',
  51. 'name' => '模板描述',
  52. 'default' => '',
  53. 'desc' => '模板描述',
  54. 'match' => 'is_string',
  55. 'update' => 'textarea',
  56. 'search' => 'fulltext',
  57. 'list' => true,
  58. ),
  59. 'pic' => array
  60. (
  61. 'type' => 'varchar-150',
  62. 'name' => '模板图片',
  63. 'default' => '',
  64. 'desc' => '模板图片',
  65. 'match' => 'option',
  66. 'update' => 'image',
  67. 'key' => '1',
  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. 'manage' => array
  89. (
  90. 'lang' => 'name,desc',
  91. 'insert' => false,
  92. 'edit' => false,
  93. # 自定义快捷新增和编辑
  94. 'button' => array
  95. (
  96. '新增' => array('fast'),
  97. ),
  98. # 快捷更新
  99. 'list_button' => array
  100. (
  101. 'edit' => array('编辑'),
  102. ),
  103. ),
  104. 'default' => array
  105. (
  106. 'col' => '`name`,`desc`,`key`,`state`,`cdate`',
  107. 'value' => array
  108. (
  109. '"默认模板","默认模板", "home", 1,' . DEVER_TIME,
  110. ),
  111. ),
  112. 'request' => array
  113. (
  114. ),
  115. );