user_score.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <?php
  2. $status = array
  3. (
  4. 1 => '支出',
  5. 2 => '收入',
  6. );
  7. return array
  8. (
  9. # 表名
  10. 'name' => 'user_score',
  11. # 显示给用户看的名称
  12. 'lang' => '用户积分日志',
  13. 'order' => 10,
  14. 'menu' => false,
  15. # 数据结构
  16. 'struct' => array
  17. (
  18. 'id' => array
  19. (
  20. 'type' => 'int-11',
  21. 'name' => '用户ID',
  22. 'default' => '',
  23. 'desc' => '',
  24. 'match' => 'is_numeric',
  25. 'search' => 'order',
  26. 'list' => true,
  27. ),
  28. 'uid' => array
  29. (
  30. 'type' => 'int-11',
  31. 'name' => '用户名',
  32. 'default' => '',
  33. 'desc' => '用户名',
  34. 'match' => 'is_numeric',
  35. //'update' => 'text',
  36. 'search' => array
  37. (
  38. 'api' => 'passport/user-all',
  39. 'col' => 'username',
  40. 'result' => 'id',
  41. ),
  42. 'list' => 'Dever::load("passport/user-one#username", {uid})',
  43. ),
  44. 'status' => array
  45. (
  46. 'type' => 'tinyint-1',
  47. 'name' => '收入支出状态',
  48. 'default' => '1',
  49. 'desc' => '收入支出状态',
  50. 'match' => 'is_numeric',
  51. 'update' => 'select',
  52. 'option' => $status,
  53. //'search' => 'select',
  54. 'list' => true,
  55. //'edit' => true,
  56. ),
  57. 'score' => array
  58. (
  59. 'type' => 'varchar-11',
  60. 'name' => '积分',
  61. 'default' => '',
  62. 'desc' => '积分',
  63. 'match' => 'is_numeric',
  64. 'update' => 'text',
  65. 'list' => true,
  66. ),
  67. 'desc' => array
  68. (
  69. 'type' => 'varchar-300',
  70. 'name' => '描述',
  71. 'default' => '',
  72. 'desc' => '描述',
  73. 'match' => 'option',
  74. 'update' => 'textarea',
  75. ),
  76. 'state' => array
  77. (
  78. 'type' => 'tinyint-1',
  79. 'name' => '状态',
  80. 'default' => '1',
  81. 'desc' => '请选择状态',
  82. 'match' => 'is_numeric',
  83. ),
  84. 'cdate' => array
  85. (
  86. 'type' => 'int-11',
  87. 'name' => '注册时间',
  88. 'match' => array('is_numeric', time()),
  89. 'desc' => '',
  90. # 只有insert时才生效
  91. 'insert' => true,
  92. //'list' => 'date("Y-m-d H:i:s", {cdate})',
  93. ),
  94. ),
  95. );