msg_form.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <?php
  2. $time = time()+(3600*24*7);
  3. return array
  4. (
  5. # 表名
  6. 'name' => 'msg_form',
  7. # 显示给用户看的名称
  8. 'lang' => '模板form_id收集表',
  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. 'search' => 'order',
  21. 'list' => true,
  22. ),
  23. 'project_id' => array
  24. (
  25. 'type' => 'int-11',
  26. 'name' => '项目',
  27. 'default' => '',
  28. 'desc' => '请输入项目',
  29. 'match' => 'is_numeric',
  30. 'list' => 'Dever::load("token/project-one#name", {project_id})',
  31. ),
  32. 'openid' => array
  33. (
  34. 'type' => 'varchar-120',
  35. 'name' => '用户openid',
  36. 'default' => '',
  37. 'desc' => '用户openid',
  38. 'match' => 'is_string',
  39. 'search' => 'fulltext',
  40. 'update' => 'text',
  41. 'list' => true,
  42. ),
  43. 'form_id' => array
  44. (
  45. 'type' => 'varchar-300',
  46. 'name' => 'form_id',
  47. 'default' => '',
  48. 'desc' => 'form_id',
  49. 'match' => 'is_string',
  50. 'update' => 'text',
  51. 'search' => 'fulltext',
  52. 'list' => true,
  53. ),
  54. 'state' => array
  55. (
  56. 'type' => 'tinyint-1',
  57. 'name' => '状态',
  58. 'default' => '1',
  59. 'desc' => '请选择状态',
  60. 'match' => 'is_numeric',
  61. ),
  62. 'cdate' => array
  63. (
  64. 'type' => 'int-11',
  65. 'name' => '更新时间',
  66. 'match' => array('is_numeric', time()),
  67. 'desc' => '',
  68. 'default' => '',
  69. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  70. ),
  71. ),
  72. //'top' => Dever::config('base', 'wechat_applet')->top,
  73. 'manage' => array
  74. (
  75. //'delete' => false,
  76. 'insert' => false,
  77. 'edit' => false,
  78. ),
  79. 'request' => array
  80. (
  81. 'getAll' => array
  82. (
  83. # 匹配的正则或函数 选填项
  84. 'option' => array
  85. (
  86. 'project_id' => 'yes',
  87. 'openid' => 'yes',
  88. 'cdate' => array($time, '<='),
  89. 'state' => 1,
  90. ),
  91. 'type' => 'all',
  92. 'order' => array('cdate' => 'desc'),
  93. 'limit' => '0,100',
  94. 'col' => '*',
  95. ),
  96. 'getAllGroupByOpenid' => array
  97. (
  98. # 匹配的正则或函数 选填项
  99. 'option' => array
  100. (
  101. 'project_id' => 'yes',
  102. 'cdate' => array($time, '<='),
  103. 'state' => 1,
  104. ),
  105. 'type' => 'all',
  106. 'group' => 'openid',
  107. 'order' => array('cdate' => 'desc'),
  108. 'col' => '*',
  109. ),
  110. ),
  111. );