project.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <?php
  2. $type = array
  3. (
  4. //1 => '保留',
  5. 2 => '公众号',
  6. 3 => '小程序',
  7. 4 => '小游戏',
  8. 5 => '第三方平台',
  9. 6 => '开发者',
  10. 7 => '有赞',
  11. );
  12. return array
  13. (
  14. # 表名
  15. 'name' => 'project',
  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. //'search' => 'order',
  30. 'order' => 'desc',
  31. 'list' => true,
  32. ),
  33. 'name' => array
  34. (
  35. 'type' => 'varchar-60',
  36. 'name' => '项目名称',
  37. 'default' => '',
  38. 'desc' => '请输入项目名称',
  39. 'match' => 'is_string',
  40. 'update' => 'text',
  41. 'search' => 'fulltext',
  42. 'list' => true,
  43. ),
  44. 'type' => array
  45. (
  46. 'type' => 'tinyint-11',
  47. 'name' => '项目类型',
  48. 'default' => '1',
  49. 'desc' => '项目类型',
  50. 'match' => 'is_numeric',
  51. 'update' => 'select',
  52. 'option' => $type,
  53. 'list' => true,
  54. ),
  55. 'appid' => array
  56. (
  57. 'type' => 'varchar-150',
  58. 'name' => '微信appid',
  59. 'default' => '',
  60. 'desc' => '请输入微信appid',
  61. 'match' => 'is_string',
  62. 'search' => 'order,fulltext',
  63. 'update' => 'text',
  64. 'list' => 'table',
  65. 'modal' => '详细信息',
  66. ),
  67. 'secret' => array
  68. (
  69. 'type' => 'varchar-150',
  70. 'name' => '微信secret',
  71. 'default' => '',
  72. 'desc' => '请输入微信secret',
  73. 'match' => 'is_string',
  74. 'search' => 'order,fulltext',
  75. 'update' => 'text',
  76. //'list' => 'table',
  77. //'modal' => '详细信息',
  78. ),
  79. 'token' => array
  80. (
  81. 'type' => 'varchar-150',
  82. 'name' => '通信token(注意不是access_token)',
  83. 'default' => '',
  84. 'desc' => '请输入通信token',
  85. 'match' => 'option',
  86. 'update' => 'text',
  87. ),
  88. 'key' => array
  89. (
  90. 'type' => 'varchar-150',
  91. 'name' => '消息加解密密钥',
  92. 'default' => '',
  93. 'desc' => '请输入消息加解密密钥',
  94. 'match' => 'option',
  95. 'update' => 'text',
  96. ),
  97. 'state' => array
  98. (
  99. 'type' => 'tinyint-1',
  100. 'name' => '状态',
  101. 'default' => '1',
  102. 'desc' => '请选择状态',
  103. 'match' => 'is_numeric',
  104. ),
  105. 'cdate' => array
  106. (
  107. 'type' => 'int-11',
  108. 'name' => '录入时间',
  109. 'match' => array('is_numeric', time()),
  110. 'desc' => '',
  111. # 只有insert时才生效
  112. 'insert' => true,
  113. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  114. ),
  115. ),
  116. 'manage' => array
  117. (
  118. 'button' => array
  119. (
  120. '同步小程序' => 'main/data.applet',
  121. ),
  122. ),
  123. 'top' => array
  124. (
  125. # 数据来源
  126. 'data' => 'state',
  127. # 菜单名
  128. 'name' => '项目选择',
  129. # 默认值
  130. 'value' => 1,
  131. # 对应的字段值,设置这个之后,所有设置等于这个值的字段,都要遵循这个权限的控制
  132. 'key' => 'main/project_id',
  133. # 本表中代表名称的字段
  134. 'col' => 'name',
  135. # type类型字段
  136. 'type' => 'type',
  137. ),
  138. # request 请求接口定义
  139. 'request' => array
  140. (
  141. ),
  142. );