share_reflux.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <?php
  2. $table = Dever::config('base')->type;
  3. $type = array
  4. (
  5. 1 => '新用户',
  6. 2 => '老用户',
  7. 3 => '未知',
  8. );
  9. return array
  10. (
  11. # 表名
  12. 'name' => 'share_reflux',
  13. # 显示给用户看的名称
  14. 'lang' => '分享回流',
  15. # 是否显示在后台菜单
  16. 'order' => 60,
  17. 'menu' => false,
  18. # 数据结构
  19. 'struct' => array
  20. (
  21. 'id' => array
  22. (
  23. 'type' => 'int-11',
  24. 'name' => 'ID',
  25. 'default' => '',
  26. 'desc' => '',
  27. 'match' => 'is_numeric',
  28. 'order' => 'desc',
  29. //'list' => true,
  30. ),
  31. 'source_uid' => array
  32. (
  33. 'type' => 'int-11',
  34. 'name' => '分享者',
  35. 'default' => '',
  36. 'desc' => '分享者',
  37. 'match' => 'option',
  38. 'search' => array
  39. (
  40. 'api' => 'passport/user-all',
  41. 'col' => 'username',
  42. 'result' => 'id',
  43. ),
  44. 'list' => '{source_uid} > 0 ? Dever::load("passport/user-one#username", {source_uid}) : "匿名用户"',
  45. ),
  46. 'type' => array
  47. (
  48. 'type' => 'tinyint-1',
  49. 'name' => '分享类别',
  50. 'default' => '',
  51. 'desc' => '分享类别',
  52. 'match' => 'option',
  53. 'option' => $table,
  54. 'list' => true,
  55. 'search' => 'select',
  56. ),
  57. 'data_id' => array
  58. (
  59. 'type' => 'int-11',
  60. 'name' => '标题',
  61. 'default' => '',
  62. 'desc' => '标题',
  63. 'match' => 'option',
  64. 'list' => 'Dever::load("act/lib/manage.load", "{type}", {data_id})',
  65. ),
  66. 'uid' => array
  67. (
  68. 'type' => 'int-11',
  69. 'name' => '回流用户',
  70. 'default' => '0',
  71. 'desc' => '请选择用户',
  72. 'match' => 'is_numeric',
  73. //'update' => 'select',
  74. //'search' => 'select',
  75. 'search' => array
  76. (
  77. 'api' => 'passport/user-all',
  78. 'col' => 'username',
  79. 'result' => 'id',
  80. ),
  81. 'list' => '{uid} > 0 ? Dever::load("passport/user-one#username", {uid}) : "匿名用户"',
  82. ),
  83. 'user_type' => array
  84. (
  85. 'type' => 'tinyint-1',
  86. 'name' => '是否新用户',
  87. 'default' => '3',
  88. 'desc' => '是否新用户',
  89. 'match' => 'option',
  90. 'option' => $type,
  91. 'list' => true,
  92. 'search' => 'select',
  93. ),
  94. 'gid' => array
  95. (
  96. 'type' => 'varchar-80',
  97. 'name' => '群组id',
  98. 'default' => '',
  99. 'desc' => '群组id',
  100. 'match' => 'is_string',
  101. 'update' => 'text',
  102. 'search' => 'fulltext',
  103. //'list' => true,
  104. ),
  105. 'share_id' => array
  106. (
  107. 'type' => 'int-11',
  108. 'name' => '分享id',
  109. 'default' => '',
  110. 'desc' => '分享id',
  111. 'match' => 'option',
  112. ),
  113. 'state' => array
  114. (
  115. 'type' => 'tinyint-1',
  116. 'name' => '状态',
  117. 'default' => '1',
  118. 'desc' => '请选择状态',
  119. 'match' => 'is_numeric',
  120. ),
  121. 'cdate' => array
  122. (
  123. 'type' => 'int-11',
  124. 'name' => '录入时间',
  125. 'match' => array('is_numeric', time()),
  126. 'desc' => '',
  127. # 只有insert时才生效
  128. 'insert' => true,
  129. 'search' => 'date',
  130. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  131. ),
  132. ),
  133. 'manage' => array
  134. (
  135. 'insert' => false,
  136. 'edit' => false,
  137. 'delete' => false,
  138. ),
  139. # request 请求接口定义
  140. 'request' => array
  141. (
  142. ),
  143. );