prize.php 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <?php
  2. $type = array
  3. (
  4. //1 => '街道',
  5. 2 => '创客直推佣金',
  6. //3 => '九阳自动炒菜机套餐',
  7. );
  8. $level = function()
  9. {
  10. $info = Dever::db('area/level')->select();
  11. return $info;
  12. };
  13. return array
  14. (
  15. # 表名
  16. 'name' => 'prize',
  17. # 显示给用户看的名称
  18. 'lang' => '名额配置',
  19. # 后台菜单排序
  20. 'order' => 1,
  21. # 数据结构
  22. 'struct' => array
  23. (
  24. 'id' => array
  25. (
  26. 'type' => 'int-11',
  27. 'name' => 'ID',
  28. 'default' => '',
  29. 'desc' => '',
  30. 'match' => 'is_numeric',
  31. 'search' => 'order',
  32. 'list' => true,
  33. 'order' => 'desc',
  34. ),
  35. 'name' => array
  36. (
  37. 'type' => 'varchar-200',
  38. 'name' => '名称',
  39. 'default' => '',
  40. 'desc' => '名称',
  41. 'match' => 'is_string',
  42. 'update' => 'text',
  43. 'search' => 'fulltext',
  44. 'list' => true,
  45. ),
  46. 'desc' => array
  47. (
  48. 'type' => 'varchar-500',
  49. 'name' => '描述',
  50. 'default' => '',
  51. 'desc' => '描述',
  52. 'match' => 'option',
  53. 'update' => 'textarea',
  54. //'search' => 'fulltext',
  55. //'list' => true,
  56. ),
  57. 'type' => array
  58. (
  59. 'type' => 'tinyint-1',
  60. 'name' => '名额类型',
  61. 'default' => '1',
  62. 'desc' => '名额类型',
  63. 'match' => 'is_numeric',
  64. 'update' => 'radio',
  65. 'option' => $type,
  66. 'search' => 'select',
  67. 'list' => true,
  68. 'control' => 'type',
  69. ),
  70. 'level' => array
  71. (
  72. 'type' => 'int-11',
  73. 'name' => '城市等级',
  74. 'default' => '-1',
  75. 'desc' => '城市等级',
  76. 'match' => 'is_numeric',
  77. //'update' => 'radio',
  78. 'option' => $level,
  79. 'show' => 'type=1',
  80. ),
  81. 'price' => array
  82. (
  83. 'type' => 'varchar-11',
  84. 'name' => '价值-以元为单位,如输入40000,就是4万元,选择街道时,代表赠送价值4万元的街道',//,如果为空,则按照选择的城市等级赠送
  85. 'default' => '0',
  86. 'desc' => '价值',
  87. 'match' => 'option',
  88. 'update' => 'text',
  89. 'list' => true,
  90. ),
  91. 'per' => array
  92. (
  93. 'type' => 'varchar-11',
  94. 'name' => '百分比数值-输入60代表60%,选择创客时,代表推荐创客可以获得60%的佣金',
  95. 'default' => '0',
  96. 'desc' => '价值',
  97. 'match' => 'option',
  98. 'update' => 'text',
  99. 'show' => 'type=2',
  100. ),
  101. 'num' => array
  102. (
  103. 'type' => 'int-11',
  104. 'name' => '默认数量',
  105. 'default' => '1',
  106. 'desc' => '数量',
  107. 'match' => 'is_numeric',
  108. 'update' => 'text',
  109. 'list' => true,
  110. ),
  111. 'state' => array
  112. (
  113. 'type' => 'tinyint-1',
  114. 'name' => '状态',
  115. 'default' => '1',
  116. 'desc' => '请选择状态',
  117. 'match' => 'is_numeric',
  118. ),
  119. 'cdate' => array
  120. (
  121. 'type' => 'int-11',
  122. 'name' => '创建时间',
  123. 'match' => array('is_numeric', time()),
  124. 'desc' => '',
  125. # 只有insert时才生效
  126. 'insert' => true,
  127. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  128. ),
  129. ),
  130. 'manage' => array
  131. (
  132. ),
  133. 'request' => array
  134. (
  135. 'getInfo' => array
  136. (
  137. # 匹配的正则或函数 选填项
  138. 'option' => array
  139. (
  140. 'type' => array('yes', 'in'),
  141. 'state' => 1,
  142. ),
  143. 'type' => 'all',
  144. 'col' => '*',
  145. ),
  146. ),
  147. );