source.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <?php
  2. $type = array
  3. (
  4. 1 => '街道',
  5. //2 => '创客',
  6. //3 => '九阳自动炒菜机套餐',
  7. );
  8. $level = function()
  9. {
  10. $info = Dever::db('area/level')->select();
  11. return $info;
  12. };
  13. return array
  14. (
  15. # 表名
  16. 'name' => 'source',
  17. # 显示给用户看的名称
  18. 'lang' => '来源配置',
  19. # 后台菜单排序
  20. 'order' => -1,
  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-200',
  38. 'name' => '名称',
  39. 'default' => '',
  40. 'desc' => '名称',
  41. 'match' => 'is_string',
  42. 'update' => 'text',
  43. 'search' => 'fulltext',
  44. 'list' => true,
  45. ),
  46. 'desc' => array
  47. (
  48. 'type' => 'varchar-500',
  49. 'name' => '描述',
  50. 'default' => '',
  51. 'desc' => '描述',
  52. 'match' => 'option',
  53. 'update' => 'textarea',
  54. //'search' => 'fulltext',
  55. //'list' => true,
  56. ),
  57. 'logo' => array
  58. (
  59. 'type' => 'varchar-150',
  60. 'name' => 'logo',
  61. 'default' => '',
  62. 'desc' => 'logo',
  63. 'match' => 'option',
  64. 'update' => 'image',
  65. 'key' => '1',
  66. 'place' => '300*300',
  67. 'list_name' => '来源信息',
  68. 'list' => 'Dever::load("setting/lib/manage.showSource", {id})',
  69. 'list_header' => array('width' => '60%'),
  70. ),
  71. 'state' => array
  72. (
  73. 'type' => 'tinyint-1',
  74. 'name' => '状态',
  75. 'default' => '1',
  76. 'desc' => '请选择状态',
  77. 'match' => 'is_numeric',
  78. ),
  79. 'cdate' => array
  80. (
  81. 'type' => 'int-11',
  82. 'name' => '创建时间',
  83. 'match' => array('is_numeric', time()),
  84. 'desc' => '',
  85. # 只有insert时才生效
  86. 'insert' => true,
  87. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  88. ),
  89. ),
  90. 'default' => array
  91. (
  92. 'col' => 'id,name,state,cdate',
  93. 'value' => array
  94. (
  95. '1,"默认来源", 1,' . DEVER_TIME,
  96. ),
  97. ),
  98. 'manage' => array
  99. (
  100. ),
  101. 'request' => array
  102. (
  103. ),
  104. );