source.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <?php
  2. $type = array
  3. (
  4. 1 => '上架',
  5. 2 => '下架',
  6. );
  7. return array
  8. (
  9. # 表名
  10. 'name' => 'source',
  11. # 显示给用户看的名称
  12. 'lang' => '线索来源设置',
  13. # 后台菜单排序
  14. 'order' => 3,
  15. 'menu' => false,
  16. // 'auto' => 100000,
  17. # 数据结构
  18. 'struct' => array
  19. (
  20. 'id' => array
  21. (
  22. 'type' => 'int-11',
  23. 'name' => 'ID',
  24. 'default' => '',
  25. 'desc' => '',
  26. 'match' => 'is_numeric',
  27. 'search' => 'order',
  28. // 'list' => true,
  29. // 'order' => 'desc',
  30. ),
  31. 'name' => array
  32. (
  33. 'type' => 'varchar-200',
  34. 'name' => '来源名称',
  35. 'default' => '',
  36. 'desc' => '来源名称',
  37. 'match' => 'is_string',
  38. 'update' => 'text',
  39. // 'search' => 'fulltext',
  40. 'list' => true,
  41. ),
  42. 'desc' => array
  43. (
  44. 'type' => 'text-255',
  45. 'name' => '来源说明',
  46. 'default' => '',
  47. 'desc' => '来源说明',
  48. 'match' => 'is_string',
  49. 'update' => 'textarea',
  50. 'list' => true,
  51. ),
  52. 'num' => array
  53. (
  54. 'type' => 'int-11',
  55. 'name' => '导入数据量',
  56. 'default' => '0',
  57. 'desc' => '数量',
  58. 'match' => 'option',
  59. // 'update' => 'hidden',
  60. 'list' => 'Dever::load("clue/lib/info.source_Num",{id})',
  61. ),
  62. 'type' => array
  63. (
  64. 'type' => 'int-11',
  65. 'name' => '状态',
  66. 'default' => '1',
  67. 'desc' => '状态',
  68. 'match' => 'is_string',
  69. 'option' => $type,
  70. // 'update' => 'select',
  71. 'search' => 'select',
  72. 'list' => true,
  73. 'edit' => true,
  74. ),
  75. 'reorder' => array
  76. (
  77. 'type' => 'int-11',
  78. 'name' => '排序-数值越大越靠前',
  79. 'default' => '1',
  80. 'desc' => '请输入排序',
  81. 'match' => 'option',
  82. 'update' => 'text',
  83. 'search' => 'order',
  84. 'list' => true,
  85. 'order' => 'desc',
  86. 'edit' => true,
  87. ),
  88. 'state' => array
  89. (
  90. 'type' => 'tinyint-1',
  91. 'name' => '状态',
  92. 'default' => '1',
  93. 'desc' => '请选择状态',
  94. 'match' => 'is_numeric',
  95. ),
  96. 'cdate' => array
  97. (
  98. 'type' => 'int-11',
  99. 'name' => '创建时间',
  100. 'match' => array('is_numeric', time()),
  101. 'desc' => '',
  102. # 只有insert时才生效
  103. 'insert' => true,
  104. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  105. ),
  106. ),
  107. 'manage' => array
  108. (
  109. //'insert' => false,
  110. 'delete' => false,
  111. // 'edit' => false,
  112. ),
  113. 'request' => array
  114. (
  115. 'getAll' => array
  116. (
  117. # 匹配的正则或函数 选填项
  118. 'option' => array
  119. (
  120. // 'id' => array('yes','>'),
  121. 'state' => 1,
  122. ),
  123. 'type' => 'all',
  124. 'order' => array('reorder' => 'desc', 'id' => 'asc'),
  125. 'col' => '*',
  126. ),
  127. ),
  128. );