user_answer.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'user_answer',
  6. # 显示给用户看的名称
  7. 'lang' => '用户答题记录',
  8. # 是否显示在后台菜单
  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. 'order' => 'desc',
  21. 'list' => true,
  22. ),
  23. 'uid' => array
  24. (
  25. 'type' => 'int-11',
  26. 'name' => '用户',
  27. 'default' => '',
  28. 'desc' => '用户',
  29. 'match' => 'is_numeric',
  30. 'list' => true,
  31. ),
  32. 'user_id' => array
  33. (
  34. 'type' => 'int-11',
  35. 'name' => '用户参与id',
  36. 'default' => '',
  37. 'desc' => '用户参与id',
  38. 'match' => 'is_numeric',
  39. //'list' => true,
  40. ),
  41. 'info_id' => array
  42. (
  43. 'type' => 'int-11',
  44. 'name' => '题目id',
  45. 'default' => '',
  46. 'desc' => '题目id',
  47. 'match' => 'is_numeric',
  48. 'list' => true,
  49. ),
  50. 'score' => array
  51. (
  52. 'type' => 'int-11',
  53. 'name' => '本题得分',
  54. 'default' => '0',
  55. 'desc' => '本题得分',
  56. 'match' => 'is_numeric',
  57. 'update' => 'text',
  58. 'list' => true,
  59. ),
  60. 'option' => array
  61. (
  62. 'type' => 'int-11',
  63. 'name' => '选择的选项',
  64. 'default' => '0',
  65. 'desc' => '选择的选项',
  66. 'match' => 'is_numeric',
  67. 'update' => 'text',
  68. //'list' => true,
  69. ),
  70. 'option_name' => array
  71. (
  72. 'type' => 'varchar-100',
  73. 'name' => '选项的选项标题',
  74. 'default' => '',
  75. 'desc' => '选项的选项标题',
  76. 'match' => 'is_string',
  77. 'update' => 'text',
  78. 'list' => true,
  79. ),
  80. 'state' => array
  81. (
  82. 'type' => 'tinyint-1',
  83. 'name' => '状态',
  84. 'default' => '1',
  85. 'desc' => '请选择状态',
  86. 'match' => 'is_numeric',
  87. ),
  88. 'cdate' => array
  89. (
  90. 'type' => 'int-11',
  91. 'name' => '录入时间',
  92. 'match' => array('is_numeric', time()),
  93. 'desc' => '',
  94. # 只有insert时才生效
  95. 'insert' => true,
  96. 'search' => 'date',
  97. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  98. ),
  99. ),
  100. 'manage' => array
  101. (
  102. ),
  103. 'request' => array
  104. (
  105. 'getAll' => array
  106. (
  107. # 匹配的正则或函数 选填项
  108. 'option' => array
  109. (
  110. 'uid' => 'yes',
  111. 'info_id' => 'yes',
  112. 'user_id' => 'yes',
  113. 'state' => 1,
  114. ),
  115. 'type' => 'all',
  116. 'col' => 'info_id,uid,user_id,id|info_id',
  117. ),
  118. )
  119. );