page.php 3.0 KB

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