user_cash.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <?php
  2. $type = array
  3. (
  4. 1 => '微信',
  5. 2 => '支付宝',
  6. );
  7. $status = array
  8. (
  9. 1 => '申请中',
  10. 2 => '兑现中',
  11. 3 => '已完成',
  12. 4 => '失败',
  13. );
  14. return array
  15. (
  16. # 表名
  17. 'name' => 'user_cash',
  18. # 显示给用户看的名称
  19. 'lang' => '用户兑现',
  20. 'menu' => 'passport',
  21. 'order' => 98,
  22. # 数据结构
  23. 'struct' => array
  24. (
  25. 'id' => array
  26. (
  27. 'type' => 'int-11',
  28. 'name' => 'ID',
  29. 'default' => '',
  30. 'desc' => '',
  31. 'match' => 'is_numeric',
  32. //'search' => 'order',
  33. 'order' => 'desc',
  34. 'list' => true,
  35. ),
  36. 'uid' => array
  37. (
  38. 'type' => 'int-11',
  39. 'name' => '用户名',
  40. 'default' => '',
  41. 'desc' => '用户名',
  42. 'match' => 'is_numeric',
  43. //'update' => 'text',
  44. 'search' => array
  45. (
  46. 'api' => 'passport/user-all',
  47. 'col' => 'username',
  48. 'result' => 'id',
  49. ),
  50. 'list' => 'Dever::load("passport/user-one#username", {uid})',
  51. ),
  52. 'num' => array
  53. (
  54. 'type' => 'int-11',
  55. 'name' => '兑现积分',
  56. 'default' => '',
  57. 'desc' => '兑现积分',
  58. 'match' => 'is_numeric',
  59. 'update' => 'text',
  60. ),
  61. 'cash_num' => array
  62. (
  63. 'type' => 'int-11',
  64. 'name' => '兑换金额',
  65. 'default' => '',
  66. 'desc' => '兑换金额',
  67. 'match' => 'is_numeric',
  68. 'update' => 'text',
  69. ),
  70. 'type' => array
  71. (
  72. 'type' => 'tinyint-1',
  73. 'name' => '兑现类型',
  74. 'default' => '1',
  75. 'desc' => '兑现类型',
  76. 'match' => 'is_numeric',
  77. 'update' => 'select',
  78. 'option' => $type,
  79. 'search' => 'select',
  80. 'list' => true,
  81. 'edit' => true,
  82. ),
  83. 'status' => array
  84. (
  85. 'type' => 'tinyint-1',
  86. 'name' => '审核状态',
  87. 'default' => '1',
  88. 'desc' => '审核状态',
  89. 'match' => 'is_numeric',
  90. 'update' => 'select',
  91. 'option' => $status,
  92. 'search' => 'select',
  93. 'list' => true,
  94. ),
  95. 'state' => array
  96. (
  97. 'type' => 'tinyint-1',
  98. 'name' => '状态',
  99. 'default' => '1',
  100. 'desc' => '请选择状态',
  101. 'match' => 'is_numeric',
  102. ),
  103. 'cdate' => array
  104. (
  105. 'type' => 'int-11',
  106. 'name' => '录入时间',
  107. 'match' => array('is_numeric', time()),
  108. 'desc' => '',
  109. # 只有insert时才生效
  110. 'insert' => true,
  111. 'search' => 'date',
  112. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  113. ),
  114. ),
  115. 'manage' => array
  116. (
  117. 'insert' => false,
  118. //'edit' => false,
  119. 'delete' => false,
  120. ),
  121. );