user_score.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'user_score',
  6. # 显示给用户看的名称
  7. 'lang' => '用户积分',
  8. 'menu' => 'passport',
  9. 'order' => 19,
  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. 'order' => 'desc',
  22. 'list' => true,
  23. ),
  24. 'uid' => 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' => 'passport/user-all',
  35. 'col' => 'username',
  36. 'result' => 'id',
  37. ),
  38. 'list' => 'Dever::load("passport/user-one#username", {uid})',
  39. ),
  40. 'num' => array
  41. (
  42. 'type' => 'int-11',
  43. 'name' => '积分',
  44. 'default' => '',
  45. 'desc' => '积分',
  46. 'match' => 'is_numeric',
  47. 'update' => 'text',
  48. ),
  49. 'state' => array
  50. (
  51. 'type' => 'tinyint-1',
  52. 'name' => '状态',
  53. 'default' => '1',
  54. 'desc' => '请选择状态',
  55. 'match' => 'is_numeric',
  56. ),
  57. 'cdate' => array
  58. (
  59. 'type' => 'int-11',
  60. 'name' => '录入时间',
  61. 'match' => array('is_numeric', time()),
  62. 'desc' => '',
  63. # 只有insert时才生效
  64. 'insert' => true,
  65. 'search' => 'date',
  66. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  67. ),
  68. ),
  69. 'manage' => array
  70. (
  71. 'insert' => false,
  72. 'edit' => false,
  73. 'delete' => false,
  74. ),
  75. );