app.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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}). ")": "未知用户"',
  38. //'list' => true,
  39. //'edit' => true,
  40. ),
  41. 'source_type' => array
  42. (
  43. 'type' => 'int-11',
  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. 'state' => array
  54. (
  55. 'type' => 'tinyint-1',
  56. 'name' => '状态',
  57. 'default' => '1',
  58. 'desc' => '请选择状态',
  59. 'match' => 'is_numeric',
  60. ),
  61. 'cdate' => array
  62. (
  63. 'type' => 'int-11',
  64. 'name' => '录入时间',
  65. 'match' => array('is_numeric', time()),
  66. 'desc' => '',
  67. # 只有insert时才生效
  68. 'search' => 'date',
  69. 'insert' => true,
  70. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  71. ),
  72. ),
  73. 'manage' => array
  74. (
  75. 'insert' => false,
  76. 'edit' => false,
  77. 'delete' => false,
  78. ),
  79. # request 请求接口定义
  80. 'request' => array
  81. (
  82. ),
  83. );