help.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'help',
  6. # 显示给用户看的名称
  7. 'lang' => '帮助中心',
  8. 'order' => 8,
  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. 'list' => true,
  21. ),
  22. 'name' => array
  23. (
  24. 'type' => 'varchar-24',
  25. 'name' => '名称',
  26. 'default' => '',
  27. 'desc' => '名称',
  28. 'match' => 'is_string',
  29. 'update' => 'text',
  30. 'search' => 'order,fulltext',
  31. 'list' => true,
  32. //'modal' => '点此打开',
  33. ),
  34. 'content' => array
  35. (
  36. 'type' => 'text-1000',
  37. 'name' => '内容',
  38. 'default' => '',
  39. 'desc' => '请输入内容',
  40. 'match' => 'option',
  41. 'update' => 'editor',
  42. ),
  43. 'state' => array
  44. (
  45. 'type' => 'tinyint-1',
  46. 'name' => '状态',
  47. 'default' => '1',
  48. 'desc' => '请选择状态',
  49. 'match' => 'is_numeric',
  50. //'option' => $option,
  51. //'update' => 'radio',
  52. ),
  53. 'cdate' => array
  54. (
  55. 'type' => 'int-11',
  56. 'name' => '录入时间',
  57. 'match' => array('is_numeric', time()),
  58. 'desc' => '',
  59. # 只有insert时才生效
  60. 'insert' => true,
  61. ),
  62. ),
  63. # 索引
  64. 'index' => array
  65. (
  66. # 索引名 => 索引id
  67. ),
  68. # 管理功能
  69. 'manage' => array
  70. (
  71. ),
  72. # request 请求接口定义
  73. 'request' => array
  74. (
  75. # all 取所有
  76. 'getAll' => array
  77. (
  78. 'where' => array
  79. (
  80. 'state' => 1,
  81. ),
  82. 'type' => 'all',
  83. 'order' => array('id', 'desc'),
  84. 'limit' => array(10, 0),
  85. 'col' => '*',
  86. ),
  87. ),
  88. );