login.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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' => 'login',
  11. # 显示给用户看的名称
  12. 'lang' => '用户登录记录',
  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. 'project_id' => array
  30. (
  31. 'type' => 'int-11',
  32. 'name' => '所属项目',
  33. 'default' => '1',
  34. 'desc' => '所属项目',
  35. 'match' => 'is_numeric',
  36. //'option' => $level,
  37. //'update' => 'select',
  38. 'search' => 'fulltext',
  39. 'list' => true,
  40. ),
  41. 'uid' => array
  42. (
  43. 'type' => 'int-11',
  44. 'name' => '用户',
  45. 'default' => '',
  46. 'desc' => '',
  47. 'match' => 'is_numeric',
  48. //'update' => 'select',
  49. 'search' => 'fulltext',
  50. 'list' => 'Dever::load("user/lib/info.get#name", {uid})',
  51. //'list' => true,
  52. //'edit' => 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. 'uuid' => array
  67. (
  68. 'type' => 'varchar-300',
  69. 'name' => 'uuid',
  70. 'default' => '',
  71. 'desc' => 'uuid',
  72. 'match' => 'is_string',
  73. //'update' => 'text',
  74. 'list' => true,
  75. ),
  76. 'state' => array
  77. (
  78. 'type' => 'tinyint-1',
  79. 'name' => '状态',
  80. 'default' => '1',
  81. 'desc' => '请选择状态',
  82. 'match' => 'is_numeric',
  83. ),
  84. 'cdate' => array
  85. (
  86. 'type' => 'int-11',
  87. 'name' => '登录时间',
  88. 'match' => array('is_numeric', time()),
  89. 'desc' => '',
  90. # 只有insert时才生效
  91. 'search' => 'date',
  92. 'insert' => true,
  93. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  94. ),
  95. ),
  96. 'manage' => array
  97. (
  98. 'insert' => false,
  99. 'edit' => false,
  100. 'delete' => false,
  101. ),
  102. # request 请求接口定义
  103. 'request' => array
  104. (
  105. # 此处定义是为跳出auth
  106. 'getAllByUids' => array
  107. (
  108. 'option' => array
  109. (
  110. 'uid' => array('yes', 'in'),
  111. 'state' => 1,
  112. ),
  113. 'type' => 'all',
  114. 'col' => '*',
  115. ),
  116. ),
  117. );