times.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'times',
  6. # 显示给用户看的名称
  7. 'lang' => '用户时光选择记录',
  8. 'menu' => false,
  9. # 数据结构
  10. 'struct' => array
  11. (
  12. 'id' => array
  13. (
  14. 'type' => 'int-11',
  15. 'name' => 'ID',
  16. 'default' => '',
  17. 'desc' => '',
  18. 'match' => 'is_numeric',
  19. 'search' => 'order',
  20. 'update' => 'hidden',
  21. //'list' => true,
  22. ),
  23. 'uid' => array
  24. (
  25. 'type' => 'int-11',
  26. 'name' => '用户名',
  27. 'default' => '0',
  28. 'desc' => '请选择用户',
  29. 'match' => 'is_numeric',
  30. 'update' => 'text',
  31. //'search' => 'select',
  32. 'search' => array
  33. (
  34. 'api' => 'passport/user-all',
  35. 'col' => 'username',
  36. 'result' => 'id',
  37. ),
  38. 'list' => '{uid} > 0 ? Dever::load("passport/user-one#username", {uid}) : "匿名用户"',
  39. ),
  40. 'info_id' => array
  41. (
  42. 'type' => 'int-11',
  43. 'name' => '合集',
  44. 'default' => '',
  45. 'desc' => '合集',
  46. 'match' => 'is_numeric',
  47. 'update' => 'text',
  48. ),
  49. 'times_id' => array
  50. (
  51. 'type' => 'int-11',
  52. 'name' => '父级章节id',
  53. 'default' => '',
  54. 'desc' => '章节id',
  55. 'match' => 'is_numeric',
  56. 'update' => 'text',
  57. ),
  58. 'day' => array
  59. (
  60. 'type' => 'varchar-50',
  61. 'name' => '时光下的日期-这个日期用于显示,所以是字符串',
  62. 'default' => '',
  63. 'desc' => '时光下的日期',
  64. 'match' => 'is_string',
  65. 'update' => 'text',
  66. ),
  67. 'state' => array
  68. (
  69. 'type' => 'tinyint-1',
  70. 'name' => '状态',
  71. 'default' => '1',
  72. 'desc' => '请选择状态',
  73. 'match' => 'is_numeric',
  74. ),
  75. 'cdate' => array
  76. (
  77. 'type' => 'int-11',
  78. 'name' => '操作时间',
  79. 'match' => array('is_numeric', time()),
  80. 'desc' => '',
  81. # 只有insert时才生效
  82. //'insert' => true,
  83. 'search' => 'date',
  84. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  85. ),
  86. ),
  87. 'manage' => array
  88. (
  89. ),
  90. 'request' => array
  91. (
  92. # 取所有下级
  93. 'getData' => array
  94. (
  95. 'option' => array
  96. (
  97. 'uid' => 'yes',
  98. 'info_id' => 'yes',
  99. 'state' => 1,
  100. ),
  101. 'type' => 'all',
  102. 'order' => array('id' => 'desc'),
  103. 'col' => '*|times_id',
  104. ),
  105. ),
  106. );