page.php 2.9 KB

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