live_note.php 3.9 KB

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