title.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'title',
  6. # 显示给用户看的名称
  7. 'lang' => '代理商头衔',
  8. # 后台菜单排序
  9. 'order' => 1,
  10. # 数据结构
  11. 'struct' => array
  12. (
  13. 'id' => array
  14. (
  15. 'type' => 'int-11',
  16. 'name' => 'ID',
  17. 'default' => '',
  18. 'desc' => '',
  19. 'match' => 'is_numeric',
  20. 'search' => 'order',
  21. //'list' => true,
  22. 'order' => 'desc',
  23. ),
  24. 'name' => array
  25. (
  26. 'type' => 'varchar-200',
  27. 'name' => '名称',
  28. 'default' => '',
  29. 'desc' => '名称',
  30. 'match' => 'is_string',
  31. 'update' => 'text',
  32. 'search' => 'fulltext',
  33. 'list' => true,
  34. ),
  35. 'state' => array
  36. (
  37. 'type' => 'tinyint-1',
  38. 'name' => '状态',
  39. 'default' => '1',
  40. 'desc' => '请选择状态',
  41. 'match' => 'is_numeric',
  42. ),
  43. 'cdate' => array
  44. (
  45. 'type' => 'int-11',
  46. 'name' => '创建时间',
  47. 'match' => array('is_numeric', time()),
  48. 'desc' => '',
  49. # 只有insert时才生效
  50. 'insert' => true,
  51. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  52. ),
  53. ),
  54. 'default' => array
  55. (
  56. 'col' => 'id,name,state,cdate',
  57. 'value' => array
  58. (
  59. //'1,"无头衔", 1,' . DEVER_TIME,
  60. '2,"战略委", 1,' . DEVER_TIME,
  61. '3,"决策委", 1,' . DEVER_TIME,
  62. '4,"储备军", 1,' . DEVER_TIME,
  63. ),
  64. ),
  65. 'manage' => array
  66. (
  67. //'insert' => false,
  68. //'delete' => false,
  69. //'edit' => false,
  70. 'list_button' => array
  71. (
  72. //'fast' => array('编辑', '"level&where_id={id}&oper_save_jump=level&oper_table=level&oper_parent=level"'),
  73. )
  74. ),
  75. 'request' => array
  76. (
  77. 'getOne' => array
  78. (
  79. # 匹配的正则或函数 选填项
  80. 'option' => array
  81. (
  82. 'type' => array('yes', 'in'),
  83. 'target' => array('yes', '<='),
  84. 'state' => 1,
  85. ),
  86. 'type' => 'one',
  87. 'order' => array('level' => 'desc', 'id' => 'desc'),
  88. 'col' => '*',
  89. ),
  90. 'getData' => array
  91. (
  92. # 匹配的正则或函数 选填项
  93. 'option' => array
  94. (
  95. //'id' => array('yes', '!='),
  96. 'state' => 1,
  97. ),
  98. 'type' => 'all',
  99. 'order' => array('id' => 'desc'),
  100. 'col' => '*|id',
  101. ),
  102. 'getDataByIds' => array
  103. (
  104. # 匹配的正则或函数 选填项
  105. 'option' => array
  106. (
  107. //'id' => array('yes', '!='),
  108. 'id' => array('yes-id', 'in'),
  109. 'state' => 1,
  110. ),
  111. 'type' => 'all',
  112. 'order' => array('id' => 'desc'),
  113. 'col' => '*',
  114. ),
  115. 'getTitle' => array
  116. (
  117. # 匹配的正则或函数 选填项
  118. 'option' => array
  119. (
  120. 'id' => 'yes',
  121. 'state' => 1,
  122. ),
  123. 'type' => 'one',
  124. // 'order' => array('level' => 'desc', 'id' => 'desc'),
  125. 'col' => 'name',
  126. ),
  127. ),
  128. );