form_id.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <?php
  2. $type = array
  3. (
  4. 1 => '普通表单',
  5. 2 => '支付表单',
  6. );
  7. $time = time()+(3600*24*7);
  8. return array
  9. (
  10. # 表名
  11. 'name' => 'form_id',
  12. # 显示给用户看的名称
  13. 'lang' => '模板form_id收集表',
  14. 'menu' => false,
  15. # 数据结构
  16. 'struct' => array
  17. (
  18. 'id' => array
  19. (
  20. 'type' => 'int-11',
  21. 'name' => 'ID',
  22. 'default' => '',
  23. 'desc' => '',
  24. 'match' => 'is_numeric',
  25. 'search' => 'order',
  26. 'list' => true,
  27. ),
  28. 'type' => array
  29. (
  30. 'type' => 'tinyint-1',
  31. 'name' => '类型',
  32. 'default' => '1',
  33. 'desc' => '类型',
  34. 'match' => 'option',
  35. 'search' => 'select',
  36. 'option' => $type,
  37. 'list' => true,
  38. ),
  39. 'num' => array
  40. (
  41. 'type' => 'int-11',
  42. 'name' => '使用次数',
  43. 'default' => '0',
  44. 'desc' => '使用次数',
  45. 'match' => 'is_numeric',
  46. 'list' => true,
  47. ),
  48. 'uid' => array
  49. (
  50. 'type' => 'int-11',
  51. 'name' => '用户id',
  52. 'default' => '',
  53. 'desc' => '用户id',
  54. 'match' => 'is_numeric',
  55. 'list' => true,
  56. ),
  57. 'form_id' => array
  58. (
  59. 'type' => 'varchar-700',
  60. 'name' => 'form_id',
  61. 'default' => '',
  62. 'desc' => 'form_id',
  63. 'match' => 'is_string',
  64. 'update' => 'text',
  65. 'search' => 'fulltext',
  66. 'list' => true,
  67. ),
  68. 'state' => array
  69. (
  70. 'type' => 'tinyint-1',
  71. 'name' => '状态',
  72. 'default' => '1',
  73. 'desc' => '请选择状态',
  74. 'match' => 'is_numeric',
  75. ),
  76. 'cdate' => array
  77. (
  78. 'type' => 'int-11',
  79. 'name' => '更新时间',
  80. 'match' => array('is_numeric', time()),
  81. 'desc' => '',
  82. 'default' => '',
  83. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  84. ),
  85. ),
  86. 'top' => Dever::config('base', 'applet')->top,
  87. 'manage' => array
  88. (
  89. //'delete' => false,
  90. 'insert' => false,
  91. 'edit' => false,
  92. ),
  93. 'request' => array
  94. (
  95. 'getAll' => array
  96. (
  97. # 匹配的正则或函数 选填项
  98. 'option' => array
  99. (
  100. 'num' => array('yes', '<'),
  101. 'type' => 'yes',
  102. 'uid' => 'yes',
  103. 'cdate' => array($time, '<='),
  104. 'state' => 1,
  105. ),
  106. 'type' => 'all',
  107. 'order' => array('cdate' => 'desc'),
  108. 'limit' => '0,100',
  109. 'col' => '*',
  110. ),
  111. 'getAllGroupByUid' => array
  112. (
  113. # 匹配的正则或函数 选填项
  114. 'option' => array
  115. (
  116. 'type' => 'yes',
  117. 'cdate' => array($time, '<='),
  118. 'state' => 1,
  119. ),
  120. 'type' => 'all',
  121. 'group' => 'uid',
  122. 'order' => array('cdate' => 'desc'),
  123. 'col' => '*',
  124. ),
  125. ),
  126. );