level.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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. 'target' => array
  47. (
  48. 'type' => 'varchar-15',
  49. 'name' => '目标额-成为该等级的目标额,以万为单位',
  50. 'default' => '0',
  51. 'desc' => '目标额',
  52. 'match' => 'is_string',
  53. 'update' => 'text',
  54. 'list' => true,
  55. ),
  56. 'value' => array
  57. (
  58. 'type' => 'varchar-15',
  59. 'name' => '奖励额-这里以百分比为单位,如输入10,就是10%',
  60. 'default' => '0',
  61. 'desc' => '奖励额',
  62. 'match' => 'is_string',
  63. 'update' => 'text',
  64. 'list' => true,
  65. ),
  66. 'state' => array
  67. (
  68. 'type' => 'tinyint-1',
  69. 'name' => '状态',
  70. 'default' => '1',
  71. 'desc' => '请选择状态',
  72. 'match' => 'is_numeric',
  73. ),
  74. 'cdate' => array
  75. (
  76. 'type' => 'int-11',
  77. 'name' => '创建时间',
  78. 'match' => array('is_numeric', time()),
  79. 'desc' => '',
  80. # 只有insert时才生效
  81. 'insert' => true,
  82. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  83. ),
  84. ),
  85. 'default' => array
  86. (
  87. 'col' => 'id,name,level,target,value,state,cdate',
  88. 'value' => array
  89. (
  90. '1,"合伙人", 1, "30", "3", 1,' . DEVER_TIME,
  91. '2,"初级合伙人", 2, "60", "6", 1,' . DEVER_TIME,
  92. '3,"中级合伙人", 3, "100", "9", 1,' . DEVER_TIME,
  93. '4,"高级合伙人", 4, "300", "12", 1,' . DEVER_TIME,
  94. '5,"事业合伙人", 5, "500", "15", 1,' . DEVER_TIME,
  95. ),
  96. ),
  97. 'manage' => array
  98. (
  99. //'insert' => false,
  100. 'delete' => false,
  101. 'edit' => false,
  102. 'list_button' => array
  103. (
  104. 'fast' => array('编辑', '"level&where_id={id}&oper_save_jump=level&oper_table=level&oper_parent=level"'),
  105. )
  106. ),
  107. 'request' => array
  108. (
  109. 'getAll' => array
  110. (
  111. # 匹配的正则或函数 选填项
  112. 'option' => array
  113. (
  114. 'type' => array('yes', 'in'),
  115. //'state' => 1,
  116. ),
  117. 'type' => 'all',
  118. 'col' => '*|id',
  119. ),
  120. ),
  121. );