app.php 2.5 KB

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