help.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <?php
  2. $type = array
  3. (
  4. 1 => '门店销售',
  5. 2 => '门店管理',
  6. 3 => '仓库管理',
  7. 4 => '工厂管理',
  8. );
  9. $config = array
  10. (
  11. # 表名
  12. 'name' => 'help',
  13. # 显示给用户看的名称
  14. 'lang' => '帮助中心',
  15. # 后台菜单排序
  16. 'order' => 1,
  17. # 数据结构
  18. 'struct' => array
  19. (
  20. 'id' => array
  21. (
  22. 'type' => 'int-11',
  23. 'name' => 'ID',
  24. 'default' => '',
  25. 'desc' => '',
  26. 'match' => 'is_numeric',
  27. //'search' => 'order',
  28. //'list' => true,
  29. 'order' => 'desc',
  30. ),
  31. 'name' => array
  32. (
  33. 'type' => 'varchar-80',
  34. 'name' => '标题',
  35. 'default' => '',
  36. 'desc' => '标题',
  37. 'match' => 'is_string',
  38. 'update' => 'text',
  39. 'search' => 'fulltext',
  40. 'list' => true,
  41. ),
  42. 'type' => array
  43. (
  44. 'type' => 'int-11',
  45. 'name' => '帮助类型',
  46. 'default' => '1',
  47. 'desc' => '帮助类型',
  48. 'match' => 'is_numeric',
  49. 'update' => 'radio',
  50. 'option' => $type,
  51. 'search' => 'select',
  52. 'list' => true,
  53. ),
  54. 'content' => array
  55. (
  56. 'type' => 'text-255',
  57. 'name' => '内容',
  58. 'default' => '',
  59. 'desc' => '内容',
  60. 'match' => 'is_string',
  61. 'update' => 'editor',
  62. //'list_name' => '链接',
  63. //'list' => 'Dever::load("content/lib/page.link", {id})',
  64. ),
  65. 'state' => array
  66. (
  67. 'type' => 'tinyint-1',
  68. 'name' => '状态',
  69. 'default' => '1',
  70. 'desc' => '请选择状态',
  71. 'match' => 'is_numeric',
  72. ),
  73. 'cdate' => array
  74. (
  75. 'type' => 'int-11',
  76. 'name' => '录入时间',
  77. 'match' => array('is_numeric', time()),
  78. 'desc' => '',
  79. # 只有insert时才生效
  80. 'insert' => true,
  81. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  82. ),
  83. ),
  84. 'manage' => array
  85. (
  86. ),
  87. 'request' => array
  88. (
  89. )
  90. );
  91. return $config;