priority.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'priority',
  6. # 显示给用户看的名称
  7. 'lang' => '优先级设置',
  8. # 后台菜单排序
  9. 'order' => 96,
  10. 'menu' => false,
  11. // 'auto' => 100000,
  12. # 数据结构
  13. 'struct' => array
  14. (
  15. 'id' => array
  16. (
  17. 'type' => 'int-11',
  18. 'name' => 'ID',
  19. 'default' => '',
  20. 'desc' => '',
  21. 'match' => 'is_numeric',
  22. 'search' => 'order',
  23. 'list' => true,
  24. 'order' => 'desc',
  25. ),
  26. 'company_id' => array
  27. (
  28. 'type' => 'int-11',
  29. 'name' => '所属公司',
  30. 'default' => '1',
  31. 'desc' => '所属公司',
  32. 'match' => 'is_numeric',
  33. 'update' => 'hidden',
  34. //'search' => $company ? 'select' : false,
  35. //'list' => true,
  36. ),
  37. 'name' => array
  38. (
  39. 'type' => 'varchar-200',
  40. 'name' => '名称',
  41. 'default' => '',
  42. 'desc' => '名称',
  43. 'match' => 'is_string',
  44. 'update' => 'text',
  45. 'search' => 'fulltext',
  46. 'list' => true,
  47. ),
  48. 'color' => array
  49. (
  50. 'type' => 'varchar-10',
  51. 'name' => '颜色',
  52. 'default' => '',
  53. 'desc' => '颜色',
  54. 'match' => 'option',
  55. 'update' => 'color',
  56. ),
  57. 'reorder' => array
  58. (
  59. 'type' => 'int-11',
  60. 'name' => '排序-数值越大越靠前',
  61. 'default' => '1',
  62. 'desc' => '请输入排序',
  63. 'match' => 'option',
  64. 'update' => 'text',
  65. 'search' => 'order',
  66. 'list' => true,
  67. 'order' => 'desc',
  68. 'edit' => true,
  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. 'manage' => array
  90. (
  91. //'insert' => false,
  92. 'delete' => false,
  93. // 'edit' => false,
  94. # 设置公司权限
  95. 'company' => 'company_id',
  96. ),
  97. 'request' => array
  98. (
  99. 'getData' => array
  100. (
  101. # 匹配的正则或函数 选填项
  102. 'option' => array
  103. (
  104. //'id' => array('yes', '!='),
  105. 'state' => 1,
  106. ),
  107. 'type' => 'all',
  108. 'order' => array('id' => 'desc'),
  109. 'col' => '*|id',
  110. ),
  111. 'getAll' => array
  112. (
  113. # 匹配的正则或函数 选填项
  114. 'option' => array
  115. (
  116. // 'id' => array('yes','>'),
  117. 'state' => 1,
  118. ),
  119. 'type' => 'all',
  120. 'order' => array('reorder' => 'desc', 'id' => 'asc'),
  121. 'col' => '*',
  122. ),
  123. ),
  124. );