project.php 2.8 KB

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