level.php 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  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' => 'float-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' => 'float-11,2',
  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' => 'float-11,2',
  79. 'name' => '奖励额-总业绩的百分比奖励,这里以百分比为单位,如输入10,就是总业绩10%奖励',
  80. 'default' => '0',
  81. 'desc' => '奖励额',
  82. 'match' => 'is_numeric',
  83. //'update' => 'text',
  84. //'list' => true,
  85. ),
  86. 'state' => array
  87. (
  88. 'type' => 'tinyint-1',
  89. 'name' => '状态',
  90. 'default' => '1',
  91. 'desc' => '请选择状态',
  92. 'match' => 'is_numeric',
  93. ),
  94. 'cdate' => array
  95. (
  96. 'type' => 'int-11',
  97. 'name' => '创建时间',
  98. 'match' => array('is_numeric', time()),
  99. 'desc' => '',
  100. # 只有insert时才生效
  101. 'insert' => true,
  102. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  103. ),
  104. ),
  105. 'default' => array
  106. (
  107. 'col' => 'id,name,level,target,value,state,cdate',
  108. 'value' => array
  109. (
  110. '1,"合伙人", 1, "30", "3", 1,' . DEVER_TIME,
  111. '2,"初级合伙人", 2, "60", "6", 1,' . DEVER_TIME,
  112. '3,"中级合伙人", 3, "100", "9", 1,' . DEVER_TIME,
  113. '4,"高级合伙人", 4, "300", "12", 1,' . DEVER_TIME,
  114. '5,"事业合伙人", 5, "500", "15", 1,' . DEVER_TIME,
  115. ),
  116. ),
  117. 'manage' => array
  118. (
  119. //'insert' => false,
  120. 'delete' => false,
  121. 'edit' => false,
  122. 'list_button' => array
  123. (
  124. 'fast' => array('编辑', '"level&where_id={id}&oper_save_jump=level&oper_table=level&oper_parent=level"'),
  125. )
  126. ),
  127. 'request' => array
  128. (
  129. 'getOne' => array
  130. (
  131. # 匹配的正则或函数 选填项
  132. 'option' => array
  133. (
  134. 'type' => array('yes', 'in'),
  135. 'target' => array('yes', '<='),
  136. 'state' => 1,
  137. ),
  138. 'type' => 'one',
  139. 'order' => array('level' => 'desc', 'id' => 'desc'),
  140. 'col' => '*',
  141. ),
  142. ),
  143. );