project.php 3.0 KB

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