source.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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. ),
  70. 'state' => array
  71. (
  72. 'type' => 'tinyint-1',
  73. 'name' => '状态',
  74. 'default' => '1',
  75. 'desc' => '请选择状态',
  76. 'match' => 'is_numeric',
  77. ),
  78. 'cdate' => array
  79. (
  80. 'type' => 'int-11',
  81. 'name' => '创建时间',
  82. 'match' => array('is_numeric', time()),
  83. 'desc' => '',
  84. # 只有insert时才生效
  85. 'insert' => true,
  86. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  87. ),
  88. ),
  89. 'default' => array
  90. (
  91. 'col' => 'id,name,state,cdate',
  92. 'value' => array
  93. (
  94. '1,"默认来源", 1,' . DEVER_TIME,
  95. ),
  96. ),
  97. 'manage' => array
  98. (
  99. ),
  100. 'request' => array
  101. (
  102. ),
  103. );