level.php 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'level',
  6. # 显示给用户看的名称
  7. 'lang' => '代理商等级',
  8. # 后台菜单排序
  9. 'order' => 3,
  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-200',
  27. 'name' => '名称',
  28. 'default' => '',
  29. 'desc' => '名称',
  30. 'match' => 'is_string',
  31. 'update' => 'text',
  32. 'search' => 'fulltext',
  33. 'list' => true,
  34. ),
  35. 'level' => array
  36. (
  37. 'type' => 'int-11',
  38. 'name' => '等级数字',
  39. 'default' => '1',
  40. 'desc' => '等级数字',
  41. 'match' => 'is_numeric',
  42. 'update' => 'text',
  43. //'list' => true,
  44. 'order' => 'asc',
  45. ),
  46. 'num' => array
  47. (
  48. 'type' => 'int-11',
  49. 'name' => '直推人数-该等级可以分佣的直推人数',
  50. 'default' => '3',
  51. 'desc' => '直推人数',
  52. 'match' => 'is_numeric',
  53. 'update' => 'text',
  54. 'list' => true,
  55. ),
  56. 'target' => array
  57. (
  58. 'type' => 'decimal-11,2',
  59. 'name' => '目标额-成为该等级的团队业绩总数,以万为单位',
  60. 'default' => '0',
  61. 'desc' => '目标额',
  62. 'match' => 'is_numeric',
  63. 'update' => 'text',
  64. 'list' => true,
  65. ),
  66. 'value' => array
  67. (
  68. 'type' => 'int-11',
  69. 'name' => '补贴额-补贴团队政策,这里以百分比为单位,如输入10,就是每次推广分润10%',
  70. 'default' => '0',
  71. 'desc' => '补贴额',
  72. 'match' => 'is_numeric',
  73. 'update' => 'text',
  74. 'list' => true,
  75. ),
  76. 'target_value' => array
  77. (
  78. 'type' => 'decimal-11,2',
  79. 'name' => '奖励额-总业绩的百分比奖励,这里以百分比为单位,如输入10,就是总业绩10%奖励',
  80. 'default' => '0',
  81. 'desc' => '奖励额',
  82. 'match' => 'is_numeric',
  83. //'update' => 'text',
  84. //'list' => true,
  85. ),
  86. 'market_desc' => array
  87. (
  88. 'type' => 'text-255',
  89. 'name' => '提现协议',
  90. 'default' => '',
  91. 'desc' => '提现协议',
  92. 'match' => 'option',
  93. 'update' => 'editor',
  94. 'key' => '1',
  95. ),
  96. 'state' => array
  97. (
  98. 'type' => 'tinyint-1',
  99. 'name' => '状态',
  100. 'default' => '1',
  101. 'desc' => '请选择状态',
  102. 'match' => 'is_numeric',
  103. ),
  104. 'cdate' => array
  105. (
  106. 'type' => 'int-11',
  107. 'name' => '创建时间',
  108. 'match' => array('is_numeric', time()),
  109. 'desc' => '',
  110. # 只有insert时才生效
  111. 'insert' => true,
  112. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  113. ),
  114. ),
  115. 'alter' => array
  116. (
  117. 5 => array
  118. (
  119. array('update', 'target', 'target', 'decimal-11,2 0 目标额'),
  120. array('update', 'target_value', 'target_value', 'decimal-11,2 0 奖励额'),
  121. ),
  122. 'version' => 5,
  123. ),
  124. 'default' => array
  125. (
  126. 'col' => 'id,name,level,target,value,state,cdate',
  127. 'value' => array
  128. (
  129. '1,"合伙人", 1, "30", "3", 1,' . DEVER_TIME,
  130. '2,"初级合伙人", 2, "60", "6", 1,' . DEVER_TIME,
  131. '3,"中级合伙人", 3, "100", "9", 1,' . DEVER_TIME,
  132. '4,"高级合伙人", 4, "300", "12", 1,' . DEVER_TIME,
  133. '5,"事业合伙人", 5, "500", "15", 1,' . DEVER_TIME,
  134. ),
  135. ),
  136. 'manage' => array
  137. (
  138. //'insert' => false,
  139. 'delete' => false,
  140. //'edit' => false,
  141. 'list_button' => array
  142. (
  143. //'fast' => array('编辑', '"level&where_id={id}&oper_save_jump=level&oper_table=level&oper_parent=level"'),
  144. )
  145. ),
  146. 'request' => array
  147. (
  148. 'getOne' => array
  149. (
  150. # 匹配的正则或函数 选填项
  151. 'option' => array
  152. (
  153. 'type' => array('yes', 'in'),
  154. 'target' => array('yes', '<='),
  155. 'state' => 1,
  156. ),
  157. 'type' => 'one',
  158. 'order' => array('level' => 'desc', 'id' => 'desc'),
  159. 'col' => '*',
  160. ),
  161. ),
  162. );