reward.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <?php
  2. $type = array
  3. (
  4. 1 => '数值',
  5. 2 => '百分比',
  6. );
  7. return array
  8. (
  9. # 表名
  10. 'name' => 'reward',
  11. # 显示给用户看的名称
  12. 'lang' => '佣金配置',
  13. 'order' => 2,
  14. # 数据结构
  15. 'struct' => array
  16. (
  17. 'id' => array
  18. (
  19. 'type' => 'int-11',
  20. 'name' => 'ID',
  21. 'default' => '',
  22. 'desc' => '',
  23. 'match' => 'is_numeric',
  24. 'search' => 'order',
  25. //'list' => true,
  26. ),
  27. 'category' => array
  28. (
  29. 'type' => 'varchar-500',
  30. 'name' => '分类',
  31. 'default' => '',
  32. 'desc' => '分类',
  33. 'match' => 'is_string',
  34. 'search' => 'linkage',
  35. 'update' => 'linkage',
  36. 'option' => Dever::url('api.get', 'category'),
  37. 'list' => 'Dever::load("category/api.string", "{category}")',
  38. ),
  39. 'type' => array
  40. (
  41. 'type' => 'tinyint-1',
  42. 'name' => '类型',
  43. 'default' => '1',
  44. 'desc' => '类型',
  45. 'match' => 'is_numeric',
  46. 'update' => 'radio',
  47. 'option' => $type,
  48. 'list' => true,
  49. 'search' => 'select',
  50. ),
  51. 'value' => array
  52. (
  53. 'type' => 'varchar-100',
  54. 'name' => '佣金-如果是百分比类型,这里如果填的是10,那就是总价的10%',
  55. 'default' => '',
  56. 'desc' => '佣金',
  57. 'match' => 'is_string',
  58. 'update' => 'text',
  59. 'list' => true,
  60. ),
  61. 'state' => array
  62. (
  63. 'type' => 'tinyint-1',
  64. 'name' => '状态',
  65. 'default' => '1',
  66. 'desc' => '请选择状态',
  67. 'match' => 'is_numeric',
  68. ),
  69. 'cdate' => array
  70. (
  71. 'type' => 'int-11',
  72. 'name' => '录入时间',
  73. 'match' => array('is_numeric', DEVER_TIME),
  74. 'desc' => '',
  75. # 只有insert时才生效
  76. 'insert' => true,
  77. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  78. ),
  79. ),
  80. 'manage' => array
  81. (
  82. //'delete' => false,
  83. //'edit' => false,
  84. //'insert' => false,
  85. ),
  86. 'request' => array
  87. (
  88. # 列表
  89. 'getAll' => array
  90. (
  91. # 匹配的正则或函数 选填项
  92. 'option' => array
  93. (
  94. 'category' => 'yes',
  95. 'state' => 1,
  96. ),
  97. 'type' => 'all',
  98. 'order' => array('id' => 'desc'),
  99. 'limit' => '0,10',
  100. 'col' => '*',
  101. ),
  102. )
  103. );