user_answer.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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. 'info_id' => array
  33. (
  34. 'type' => 'int-11',
  35. 'name' => '问卷标题',
  36. 'default' => '',
  37. 'desc' => '问卷标题',
  38. 'match' => 'is_numeric',
  39. 'list' => true,
  40. ),
  41. 'score' => array
  42. (
  43. 'type' => 'int-11',
  44. 'name' => '本题得分',
  45. 'default' => '0',
  46. 'desc' => '本题得分',
  47. 'match' => 'is_numeric',
  48. 'update' => 'text',
  49. 'list' => true,
  50. ),
  51. 'value' => array
  52. (
  53. 'type' => 'text-255',
  54. 'name' => '内容',
  55. 'default' => '',
  56. 'desc' => '内容',
  57. 'match' => 'is_string',
  58. 'update' => 'text',
  59. 'list' => true,
  60. ),
  61. 'state' => array
  62. (
  63. 'type' => 'tinyint-1',
  64. 'name' => '状态',
  65. 'default' => '1',
  66. 'desc' => '请选择状态',
  67. 'match' => 'is_numeric',
  68. ),
  69. 'cdate' => array
  70. (
  71. 'type' => 'int-11',
  72. 'name' => '录入时间',
  73. 'match' => array('is_numeric', time()),
  74. 'desc' => '',
  75. # 只有insert时才生效
  76. 'insert' => true,
  77. 'search' => 'date',
  78. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  79. ),
  80. ),
  81. 'manage' => array
  82. (
  83. ),
  84. 'request' => array
  85. (
  86. 'getAll' => array
  87. (
  88. # 匹配的正则或函数 选填项
  89. 'option' => array
  90. (
  91. 'uid' => 'yes',
  92. 'info_id' => 'yes',
  93. 'user_id' => 'yes',
  94. 'state' => 1,
  95. ),
  96. 'type' => 'all',
  97. 'col' => 'info_id,uid,user_id,id|info_id',
  98. ),
  99. )
  100. );