share_reflux.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <?php
  2. $table = Dever::config('base')->type;
  3. return array
  4. (
  5. # 表名
  6. 'name' => 'share_reflux',
  7. # 显示给用户看的名称
  8. 'lang' => '分享回流',
  9. # 是否显示在后台菜单
  10. 'order' => 60,
  11. 'menu' => false,
  12. # 数据结构
  13. 'struct' => array
  14. (
  15. 'id' => array
  16. (
  17. 'type' => 'int-11',
  18. 'name' => 'ID',
  19. 'default' => '',
  20. 'desc' => '',
  21. 'match' => 'is_numeric',
  22. 'order' => 'desc',
  23. //'list' => true,
  24. ),
  25. 'source_uid' => array
  26. (
  27. 'type' => 'int-11',
  28. 'name' => '分享者',
  29. 'default' => '',
  30. 'desc' => '分享者',
  31. 'match' => 'option',
  32. 'search' => array
  33. (
  34. 'api' => 'passport/user-all',
  35. 'col' => 'username',
  36. 'result' => 'id',
  37. ),
  38. 'list' => '{source_uid} > 0 ? Dever::load("passport/user-one#username", {source_uid}) : "匿名用户"',
  39. ),
  40. 'type' => array
  41. (
  42. 'type' => 'tinyint-1',
  43. 'name' => '分享类别',
  44. 'default' => '',
  45. 'desc' => '分享类别',
  46. 'match' => 'option',
  47. 'option' => $table,
  48. 'list' => true,
  49. 'search' => 'select',
  50. ),
  51. 'data_id' => array
  52. (
  53. 'type' => 'int-11',
  54. 'name' => '标题',
  55. 'default' => '',
  56. 'desc' => '标题',
  57. 'match' => 'option',
  58. 'list' => 'Dever::load("act/lib/manage.load", "{type}", {data_id})',
  59. ),
  60. 'uid' => array
  61. (
  62. 'type' => 'int-11',
  63. 'name' => '回流用户',
  64. 'default' => '0',
  65. 'desc' => '请选择用户',
  66. 'match' => 'is_numeric',
  67. //'update' => 'select',
  68. //'search' => 'select',
  69. 'search' => array
  70. (
  71. 'api' => 'passport/user-all',
  72. 'col' => 'username',
  73. 'result' => 'id',
  74. ),
  75. 'list' => '{uid} > 0 ? Dever::load("passport/user-one#username", {uid}) : "匿名用户"',
  76. ),
  77. 'gid' => array
  78. (
  79. 'type' => 'varchar-80',
  80. 'name' => '群组id',
  81. 'default' => '',
  82. 'desc' => '群组id',
  83. 'match' => 'is_string',
  84. 'update' => 'text',
  85. 'search' => 'fulltext',
  86. //'list' => true,
  87. ),
  88. 'share_id' => array
  89. (
  90. 'type' => 'int-11',
  91. 'name' => '分享id',
  92. 'default' => '',
  93. 'desc' => '分享id',
  94. 'match' => 'option',
  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. 'search' => 'date',
  113. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  114. ),
  115. ),
  116. 'manage' => array
  117. (
  118. 'insert' => false,
  119. 'edit' => false,
  120. 'delete' => false,
  121. ),
  122. # request 请求接口定义
  123. 'request' => array
  124. (
  125. ),
  126. );