page.php 3.0 KB

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