info.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <?php
  2. # 获取分类权限
  3. $status = array
  4. (
  5. 1 => '合作中',
  6. 2 => '已终止合作',
  7. ),
  8. return array
  9. (
  10. # 表名
  11. 'name' => 'info',
  12. # 显示给用户看的名称
  13. 'lang' => '工厂列表',
  14. # 后台菜单排序
  15. 'order' => 99,
  16. # 数据结构
  17. 'struct' => array
  18. (
  19. 'id' => array
  20. (
  21. 'type' => 'int-11',
  22. 'name' => 'ID',
  23. 'default' => '',
  24. 'desc' => '',
  25. 'match' => 'is_numeric',
  26. 'search' => 'order',
  27. 'list' => true,
  28. 'order' => 'desc',
  29. ),
  30. 'name' => array
  31. (
  32. 'type' => 'varchar-32',
  33. 'name' => '工厂名称',
  34. 'default' => '',
  35. 'desc' => '请输入工厂名称',
  36. 'match' => 'is_string',
  37. 'update' => 'text',
  38. 'search' => 'fulltext',
  39. 'list' => true,
  40. ),
  41. 'status' => array
  42. (
  43. 'type' => 'int-11',
  44. 'name' => '合作状态',
  45. 'default' => '1',
  46. 'desc' => '上线状态',
  47. 'match' => 'is_numeric',
  48. //'update' => 'select',
  49. 'option' => $status,
  50. 'search' => 'select',
  51. 'list' => true,
  52. 'edit' => true,
  53. ),
  54. 'reorder' => array
  55. (
  56. 'type' => 'int-11',
  57. 'name' => '排序(数值越大越靠前)',
  58. 'default' => '1',
  59. 'desc' => '请输入排序',
  60. 'match' => 'option',
  61. //'update' => 'text',
  62. 'search' => 'order',
  63. 'list' => true,
  64. 'order' => 'desc',
  65. 'edit' => true,
  66. ),
  67. 'state' => array
  68. (
  69. 'type' => 'tinyint-1',
  70. 'name' => '状态',
  71. 'default' => '1',
  72. 'desc' => '请选择状态',
  73. 'match' => 'is_numeric',
  74. ),
  75. 'cdate' => array
  76. (
  77. 'type' => 'int-11',
  78. 'name' => '录入时间',
  79. 'match' => array('is_numeric', time()),
  80. 'desc' => '',
  81. # 只有insert时才生效
  82. 'insert' => true,
  83. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  84. ),
  85. ),
  86. # 默认值
  87. 'default' => array
  88. (
  89. 'col' => 'name,reorder,state,cdate',
  90. 'value' => array
  91. (
  92. '"默认工厂",1,1,' . time(),
  93. ),
  94. ),
  95. 'manage' => array
  96. (
  97. ),
  98. 'request' => array
  99. (
  100. ),
  101. );