form_id.php 2.2 KB

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