app.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <?php
  2. $source_type = array (
  3. 'ios' => 'ios',
  4. 'android' => 'android',
  5. );
  6. $system_source = Dever::config('base')->system_source;
  7. return array
  8. (
  9. # 表名
  10. 'name' => 'app',
  11. # 显示给用户看的名称
  12. 'lang' => 'app用户列表',
  13. 'order' => 9,
  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. 'order' => 'desc',
  27. 'list' => true,
  28. ),
  29. 'uid' => array
  30. (
  31. 'type' => 'int-11',
  32. 'name' => '用户',
  33. 'default' => '',
  34. 'desc' => '',
  35. 'match' => 'is_numeric',
  36. //'update' => 'select',
  37. 'search' => 'fulltext',
  38. 'list' => '{uid} > 0 ? Dever::load("passport/user-one#username", {uid}) . "(" . Dever::load("passport/user-one#mobile", {uid}). "-{uid})": "未知用户"',
  39. //'list' => true,
  40. //'edit' => true,
  41. ),
  42. 'source_type' => array
  43. (
  44. 'type' => 'varchar-100',
  45. 'name' => '用户来源-废弃,用system_source替代,暂时保留',
  46. 'default' => '1',
  47. 'desc' => '请选择用户来源',
  48. 'match' => 'is_numeric',
  49. 'update' => 'select',
  50. 'option' => $source_type,
  51. 'search' => 'select',
  52. 'list' => true,
  53. ),
  54. 'system_source' => array
  55. (
  56. 'type' => 'tinyint-1',
  57. 'name' => '所属平台',
  58. 'default' => '1',
  59. 'desc' => '所属平台',
  60. 'match' => 'is_numeric',
  61. 'option' => $system_source,
  62. 'update' => 'radio',
  63. 'search' => 'select',
  64. 'list' => true,
  65. ),
  66. 'system_id' => array
  67. (
  68. 'type' => 'int-11',
  69. 'name' => '所属项目',
  70. 'default' => '1',
  71. 'desc' => '所属项目',
  72. 'match' => 'is_numeric',
  73. //'option' => $level,
  74. //'update' => 'select',
  75. //'list' => true,
  76. ),
  77. 'uuid' => array
  78. (
  79. 'type' => 'varchar-300',
  80. 'name' => 'uuid',
  81. 'default' => '',
  82. 'desc' => 'uuid',
  83. 'match' => 'is_string',
  84. //'update' => 'text',
  85. 'list' => true,
  86. ),
  87. 'state' => array
  88. (
  89. 'type' => 'tinyint-1',
  90. 'name' => '状态',
  91. 'default' => '1',
  92. 'desc' => '请选择状态',
  93. 'match' => 'is_numeric',
  94. ),
  95. 'cdate' => array
  96. (
  97. 'type' => 'int-11',
  98. 'name' => '录入时间',
  99. 'match' => array('is_numeric', time()),
  100. 'desc' => '',
  101. # 只有insert时才生效
  102. 'search' => 'date',
  103. 'insert' => true,
  104. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  105. ),
  106. ),
  107. 'manage' => array
  108. (
  109. 'insert' => false,
  110. 'edit' => false,
  111. 'delete' => false,
  112. ),
  113. # request 请求接口定义
  114. 'request' => array
  115. (
  116. # 此处定义是为跳出auth
  117. 'getAllByUids' => array
  118. (
  119. 'option' => array
  120. (
  121. 'uid' => array('yes', 'in'),
  122. 'state' => 1,
  123. ),
  124. 'type' => 'all',
  125. 'col' => '*',
  126. ),
  127. ),
  128. );