app.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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. 'state' => array
  65. (
  66. 'type' => 'tinyint-1',
  67. 'name' => '状态',
  68. 'default' => '1',
  69. 'desc' => '请选择状态',
  70. 'match' => 'is_numeric',
  71. ),
  72. 'cdate' => array
  73. (
  74. 'type' => 'int-11',
  75. 'name' => '录入时间',
  76. 'match' => array('is_numeric', time()),
  77. 'desc' => '',
  78. # 只有insert时才生效
  79. 'search' => 'date',
  80. 'insert' => true,
  81. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  82. ),
  83. ),
  84. 'manage' => array
  85. (
  86. 'insert' => false,
  87. 'edit' => false,
  88. 'delete' => false,
  89. ),
  90. # request 请求接口定义
  91. 'request' => array
  92. (
  93. # 此处定义是为跳出auth
  94. 'getAllByUids' => array
  95. (
  96. 'option' => array
  97. (
  98. 'uid' => array('yes', 'in'),
  99. 'state' => 1,
  100. ),
  101. 'type' => 'all',
  102. 'col' => '*',
  103. ),
  104. ),
  105. );