model.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <?php
  2. $type = array
  3. (
  4. 1 => '图片',
  5. 2 => '文字',
  6. );
  7. return array
  8. (
  9. # 表名
  10. 'name' => 'model',
  11. # 显示给用户看的名称
  12. 'lang' => '模块设置',
  13. 'menu' => false,
  14. 'check' => 'template_id,key',
  15. # 数据结构
  16. 'struct' => array
  17. (
  18. 'id' => array
  19. (
  20. 'type' => 'int-11',
  21. 'name' => 'ID',
  22. 'default' => '',
  23. 'desc' => '',
  24. 'match' => 'is_numeric',
  25. 'search' => 'order',
  26. //'list' => true,
  27. ),
  28. 'template_id' => array
  29. (
  30. 'type' => 'int-11',
  31. 'name' => '所属模板',
  32. 'default' => '1',
  33. 'desc' => '请选择所属模板',
  34. 'match' => 'is_numeric',
  35. 'update' => 'hidden',
  36. 'value' => Dever::input('search_option_template_id')
  37. ),
  38. 'name' => array
  39. (
  40. 'type' => 'varchar-32',
  41. 'name' => '模块名称',
  42. 'default' => '',
  43. 'desc' => '模块名称',
  44. 'match' => 'is_string',
  45. 'update' => 'text',
  46. 'search' => 'fulltext',
  47. 'list' => true,
  48. ),
  49. 'key' => array
  50. (
  51. 'type' => 'varchar-32',
  52. 'name' => '模块标识-设置模块时,使用该标识来设置模块信息',
  53. 'default' => '',
  54. 'desc' => '模块标识',
  55. 'match' => 'is_string',
  56. 'update' => 'text',
  57. 'search' => 'fulltext',
  58. 'list' => true,
  59. ),
  60. 'type' => array
  61. (
  62. 'type' => 'int-11',
  63. 'name' => '模块类型',
  64. 'default' => '1',
  65. 'desc' => '请选择模块类型',
  66. 'match' => 'is_numeric',
  67. 'update' => 'radio',
  68. 'option' => $type,
  69. 'search' => 'select',
  70. 'list' => true,
  71. 'control' => 'type',
  72. ),
  73. 'position' => array
  74. (
  75. 'type' => 'varchar-32',
  76. 'name' => '模块位置-位置为top,left,如100,200',
  77. 'default' => '0,0',
  78. 'desc' => '模块位置',
  79. 'match' => 'is_string',
  80. 'update' => 'text',
  81. ),
  82. 'width' => array
  83. (
  84. 'type' => 'varchar-11',
  85. 'name' => '图片宽度',
  86. 'default' => '200',
  87. 'desc' => '图片宽度',
  88. 'match' => 'is_string',
  89. 'update' => 'text',
  90. 'show' => 'type=1',
  91. ),
  92. 'height' => array
  93. (
  94. 'type' => 'varchar-11',
  95. 'name' => '图片高度',
  96. 'default' => '200',
  97. 'desc' => '图片高度',
  98. 'match' => 'is_string',
  99. 'update' => 'text',
  100. 'show' => 'type=1',
  101. ),
  102. 'color' => array
  103. (
  104. 'type' => 'varchar-10',
  105. 'name' => '文字颜色',
  106. 'default' => '#000000',
  107. 'desc' => '文字颜色',
  108. 'match' => 'is_string',
  109. 'update' => 'text',
  110. 'show' => 'type=2',
  111. ),
  112. 'size' => array
  113. (
  114. 'type' => 'int-11',
  115. 'name' => '文字大小-直接输入像素数字',
  116. 'default' => '16',
  117. 'desc' => '文字大小',
  118. 'match' => 'is_numeric',
  119. 'update' => 'text',
  120. 'show' => 'type=2',
  121. ),
  122. 'angle' => array
  123. (
  124. 'type' => 'int-11',
  125. 'name' => '角度-直接输入数字',
  126. 'default' => '0',
  127. 'desc' => '角度',
  128. 'match' => 'is_numeric',
  129. 'update' => 'text',
  130. 'show' => 'type=2',
  131. ),
  132. 'state' => array
  133. (
  134. 'type' => 'tinyint-1',
  135. 'name' => '状态',
  136. 'default' => '1',
  137. 'desc' => '请选择状态',
  138. 'match' => 'is_numeric',
  139. ),
  140. 'cdate' => array
  141. (
  142. 'type' => 'int-11',
  143. 'name' => '录入时间',
  144. 'match' => array('is_numeric', time()),
  145. 'desc' => '',
  146. # 只有insert时才生效
  147. 'insert' => true,
  148. 'search' => 'date',
  149. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  150. ),
  151. ),
  152. );