feature.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <?php
  2. $email = function()
  3. {
  4. $array = array();
  5. $data = Dever::db('mail/email-state');
  6. if($data)
  7. {
  8. $array += $data;
  9. }
  10. return $array;
  11. };
  12. $config = array
  13. (
  14. # 表名
  15. 'name' => 'feature',
  16. # 显示给用户看的名称
  17. 'lang' => '功能列表',
  18. 'order' => -10,
  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. //'list' => true,
  30. ),
  31. 'name' => array
  32. (
  33. 'type' => 'varchar-100',
  34. 'name' => '邮件名称',
  35. 'default' => '',
  36. 'desc' => '邮件名称',
  37. 'match' => 'is_string',
  38. 'update' => 'text',
  39. 'list' => true,
  40. ),
  41. 'key' => array
  42. (
  43. 'type' => 'varchar-100',
  44. 'name' => '功能标识',
  45. 'default' => '',
  46. 'desc' => '功能标识',
  47. 'match' => 'is_string',
  48. 'update' => 'text',
  49. 'list' => true,
  50. ),
  51. 'email_id' => array
  52. (
  53. 'type' => 'varchar-800',
  54. 'name' => '用户名称',
  55. 'default' => '',
  56. 'desc' => '用户名称',
  57. 'match' => 'option',
  58. 'update' => 'checkbox',
  59. 'option' => $email,
  60. //'list' => true,
  61. ),
  62. 'state' => array
  63. (
  64. 'type' => 'tinyint-1',
  65. 'name' => '数据状态',
  66. 'default' => '1',
  67. 'desc' => '请选择状态',
  68. 'match' => 'is_numeric',
  69. ),
  70. 'cdate' => array
  71. (
  72. 'type' => 'int-11',
  73. 'name' => '发布时间',
  74. 'match' => array('is_numeric', time()),
  75. 'desc' => '',
  76. # 只有insert时才生效
  77. 'insert' => true,
  78. //'search' => 'date',
  79. //'list' => 'date("Y-m-d H:i:s", {cdate})',
  80. ),
  81. ),
  82. 'manage' => array
  83. (
  84. // 'insert' => false,
  85. // 'edit' => false,
  86. // 'delete' => false,
  87. // 'num' => false,
  88. // // 'excel' => $excel,
  89. // 'button' => $button,
  90. ),
  91. # request 请求接口定义
  92. 'request' => array
  93. (
  94. 'getExcelAll' => array
  95. (
  96. # 匹配的正则或函数 选填项
  97. 'option' => array
  98. (
  99. 'start' => array('yes-month', '>='),
  100. 'end' => array('yes-month', '<='),
  101. 'state' => 1,
  102. ),
  103. 'type' => 'all',
  104. 'col' => '*',
  105. ),
  106. ),
  107. );
  108. return $config;