yspay_account.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'yspay_account',
  6. # 显示给用户看的名称
  7. 'lang' => '银联账户信息',
  8. 'order' => -200,
  9. 'menu' => false,
  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. 'update' => 'hidden',
  22. //'list' => true,
  23. ),
  24. 'shop_id' => array
  25. (
  26. 'type' => 'int-11',
  27. 'name' => '门店名称',
  28. 'default' => '',
  29. 'desc' => '所属门店',
  30. 'match' => 'is_numeric',
  31. 'update' => 'text',
  32. 'search' => array
  33. (
  34. 'api' => 'shop/info-like',
  35. 'col' => 'name',
  36. 'result' => 'id',
  37. ),
  38. 'list' => 'Dever::load("shop/info-one#name", {shop_id})',
  39. ),
  40. 'mid' => array
  41. (
  42. 'type' => 'varchar-50',
  43. 'name' => '分账商户号',
  44. 'default' => '',
  45. 'desc' => '分账商户号',
  46. 'match' => 'option',
  47. 'update' => 'text',
  48. 'search' => 'fulltext',
  49. 'list' => true,
  50. ),
  51. 'cash' => array
  52. (
  53. 'type' => 'int-11',
  54. 'name' => '余额',
  55. 'default' => '0',
  56. 'desc' => '余额',
  57. 'match' => 'option',
  58. 'update' => 'text',
  59. 'list' => 'round({cash}/100, 2)',
  60. ),
  61. 'tx_cash' => array
  62. (
  63. 'type' => 'int-11',
  64. 'name' => '提现总金额',
  65. 'default' => '0',
  66. 'desc' => '提现总金额',
  67. 'match' => 'option',
  68. 'update' => 'text',
  69. 'list' => 'round({tx_cash}/100, 2)',
  70. ),
  71. 'sdate' => array
  72. (
  73. 'type' => 'int-11',
  74. 'name' => '更新时间',
  75. 'default' => '',
  76. 'match' => 'is_numeric',
  77. 'desc' => '',
  78. 'search' => 'date',
  79. 'list' => '"{sdate}" ? date("Y-m-d H:i", \'{sdate}\') : "-"',
  80. 'order' => 'desc',
  81. ),
  82. 'state' => array
  83. (
  84. 'type' => 'tinyint-1',
  85. 'name' => '状态',
  86. 'default' => '1',
  87. 'desc' => '请选择状态',
  88. 'match' => 'is_numeric',
  89. ),
  90. 'cdate' => array
  91. (
  92. 'type' => 'int-11',
  93. 'name' => '创建时间',
  94. 'match' => array('is_numeric', time()),
  95. 'desc' => '',
  96. # 只有insert时才生效
  97. //'insert' => true,
  98. //'search' => 'date',
  99. //'list' => 'date("Y-m-d H:i:s", {cdate})',
  100. ),
  101. ),
  102. 'manage' => array
  103. (
  104. 'edit' => false,
  105. 'insert' => false,
  106. 'delete' => false,
  107. ),
  108. 'request' => array
  109. (
  110. 'tx_inc' => array
  111. (
  112. 'type' => 'update',
  113. 'where' => array
  114. (
  115. 'id' => 'yes',
  116. ),
  117. 'set' => array
  118. (
  119. 'tx_cash' => array('yes', '+='),
  120. ),
  121. ),
  122. 'dec' => array
  123. (
  124. 'type' => 'update',
  125. 'where' => array
  126. (
  127. 'id' => 'yes',
  128. ),
  129. 'set' => array
  130. (
  131. 'cash' => array('yes', '-='),
  132. ),
  133. ),
  134. ),
  135. );