feedback.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <?php
  2. $info = function()
  3. {
  4. return Dever::db('collection/info')->state();
  5. };
  6. $type = array
  7. (
  8. 1 => '未回复',
  9. 2 => '已回复',
  10. );
  11. return array
  12. (
  13. # 表名
  14. 'name' => 'feedback',
  15. # 显示给用户看的名称
  16. 'lang' => '反馈管理',
  17. # 是否显示在后台菜单
  18. 'order' => 80,
  19. # 数据结构
  20. 'struct' => array
  21. (
  22. 'id' => array
  23. (
  24. 'type' => 'int-11',
  25. 'name' => 'ID',
  26. 'default' => '',
  27. 'desc' => '',
  28. 'match' => 'is_numeric',
  29. 'order' => 'desc',
  30. //'list' => true,
  31. ),
  32. 'uid' => array
  33. (
  34. 'type' => 'int-11',
  35. 'name' => '用户名',
  36. 'default' => '0',
  37. 'desc' => '请选择用户',
  38. 'match' => 'is_numeric',
  39. 'update' => 'text',
  40. //'search' => 'select',
  41. 'search' => array
  42. (
  43. 'api' => 'passport/user-all',
  44. 'col' => 'username',
  45. 'result' => 'id',
  46. ),
  47. //'list' => '{uid} > 0 ? Dever::load("passport/user-one#username", {uid}) : "匿名用户"',
  48. ),
  49. 'shop_id' => array
  50. (
  51. 'type' => 'int-11',
  52. 'name' => '所属门店',
  53. 'default' => '',
  54. 'desc' => '所属门店',
  55. 'match' => 'is_numeric',
  56. 'list' => 'Dever::load("shop/info-find#name", {shop_id})',
  57. ),
  58. 'mobile' => array
  59. (
  60. 'type' => 'varchar-300',
  61. 'name' => '手机号',
  62. 'default' => '',
  63. 'desc' => '手机号',
  64. 'match' => 'option',
  65. 'search' => 'text',
  66. 'list' => true,
  67. ),
  68. 'truename' => array
  69. (
  70. 'type' => 'varchar-300',
  71. 'name' => '联系人姓名',
  72. 'default' => '',
  73. 'desc' => '联系人姓名',
  74. 'match' => 'option',
  75. 'search' => 'text',
  76. 'list' => true,
  77. ),
  78. 'content' => array
  79. (
  80. 'type' => 'varchar-800',
  81. 'name' => '反馈内容',
  82. 'update' => 'textarea',
  83. 'key' => 1,
  84. 'default' => '',
  85. 'desc' => '请输入内容',
  86. 'match' => 'is_string',
  87. 'search' => 'fulltext',
  88. 'list' => true,
  89. //'modal' => '查看详情',
  90. //'list' => 'Dever::load("user/lib/manage.feedback", {id})',
  91. ),
  92. 'type' => array
  93. (
  94. 'type' => 'tinyint-1',
  95. 'name' => '是否回复',
  96. 'default' => '1',
  97. 'desc' => '是否回复',
  98. 'match' => 'is_numeric',
  99. 'update' => 'radio',
  100. 'search' => 'select',
  101. 'option' => $type,
  102. 'list' => true,
  103. 'edit' => true,
  104. ),
  105. 'state' => array
  106. (
  107. 'type' => 'tinyint-1',
  108. 'name' => '状态',
  109. 'default' => '1',
  110. 'desc' => '请选择状态',
  111. 'match' => 'is_numeric',
  112. ),
  113. 'cdate' => array
  114. (
  115. 'type' => 'int-11',
  116. 'name' => '时间',
  117. 'match' => array('is_numeric', time()),
  118. 'desc' => '',
  119. # 只有insert时才生效
  120. 'insert' => true,
  121. 'search' => 'date',
  122. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  123. ),
  124. ),
  125. 'manage' => array
  126. (
  127. 'insert' => false,
  128. 'edit' => false,
  129. 'delete' => false,
  130. ),
  131. # request 请求接口定义
  132. 'request' => array
  133. (
  134. )
  135. );