record.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <?php
  2. $type = array
  3. (
  4. 1 => '资讯',
  5. 2 => '课程',
  6. );
  7. return array
  8. (
  9. # 表名
  10. 'name' => 'record',
  11. # 显示给用户看的名称
  12. 'lang' => '日志列表',
  13. # 是否显示在后台菜单
  14. 'order' => 80,
  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. 'order' => 'desc',
  26. //'list' => true,
  27. ),
  28. 'uid' => array
  29. (
  30. 'type' => 'int-11',
  31. 'name' => '用户',
  32. 'default' => '0',
  33. 'desc' => '请选择用户',
  34. 'match' => 'is_numeric',
  35. //'update' => 'select',
  36. //'search' => 'select',
  37. 'list' => '{uid} > 0 ? Dever::load("passport/user-one#name", {uid}) : "匿名用户"',
  38. ),
  39. 'info_id' => array
  40. (
  41. 'type' => 'int-11',
  42. 'name' => '所属小程序',
  43. 'default' => '1',
  44. 'desc' => '请选择所属小程序',
  45. 'match' => 'is_numeric',
  46. 'update' => 'select',
  47. 'option' => $info,
  48. 'search' => 'select',
  49. 'list' => '{info_id} > 0 ? Dever::load("set/info-one#name", {info_id}) : "未知"',
  50. ),
  51. 'type' => array
  52. (
  53. 'type' => 'tinyint-1',
  54. 'name' => '操作类型',
  55. 'default' => '',
  56. 'desc' => '操作类型',
  57. 'match' => 'option',
  58. 'option' => $type,
  59. 'list' => true,
  60. ),
  61. 'content' => array
  62. (
  63. 'type' => 'text-255',
  64. 'name' => '内容',
  65. 'update' => 'editor',
  66. 'key' => 1,
  67. 'default' => '',
  68. 'desc' => '请输入内容',
  69. 'match' => 'is_string',
  70. 'search' => 'fulltext',
  71. 'list' => 'table',
  72. 'modal' => '查看详情',
  73. ),
  74. 'ip' => array
  75. (
  76. 'type' => 'varchar-32',
  77. 'name' => 'IP',
  78. 'default' => '',
  79. 'desc' => '请输入IP',
  80. 'match' => 'option',
  81. 'update' => 'text',
  82. //'search' => 'fulltext',
  83. 'list' => true,
  84. ),
  85. 'ua' => array
  86. (
  87. 'type' => 'varchar-800',
  88. 'name' => 'ua',
  89. 'default' => '',
  90. 'desc' => '请输入ua',
  91. 'match' => 'option',
  92. 'update' => 'text',
  93. //'search' => 'fulltext',
  94. 'list' => true,
  95. ),
  96. 'state' => array
  97. (
  98. 'type' => 'tinyint-1',
  99. 'name' => '状态',
  100. 'default' => '1',
  101. 'desc' => '请选择状态',
  102. 'match' => 'is_numeric',
  103. ),
  104. 'cdate' => array
  105. (
  106. 'type' => 'int-11',
  107. 'name' => '录入时间',
  108. 'match' => array('is_numeric', time()),
  109. 'desc' => '',
  110. # 只有insert时才生效
  111. 'insert' => true,
  112. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  113. ),
  114. ),
  115. 'manage' => array
  116. (
  117. 'insert' => false,
  118. 'edit' => false,
  119. ),
  120. # request 请求接口定义
  121. 'request' => array
  122. (
  123. ),
  124. );