live_note.php 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. 'state' => array
  62. (
  63. 'type' => 'tinyint-1',
  64. 'name' => '状态',
  65. 'default' => '1',
  66. 'desc' => '请选择状态',
  67. 'match' => 'is_numeric',
  68. ),
  69. 'cdate' => array
  70. (
  71. 'type' => 'int-11',
  72. 'name' => '提醒时间',
  73. 'match' => array('is_numeric', time()),
  74. 'desc' => '',
  75. # 只有insert时才生效
  76. 'insert' => true,
  77. 'search' => 'date',
  78. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  79. ),
  80. ),
  81. 'manage' => array
  82. (
  83. 'insert' => false,
  84. 'edit' => false,
  85. 'delete' => false,
  86. ),
  87. );