q_source.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'q_source',
  6. # 显示给用户看的名称
  7. 'lang' => '问题来源设置',
  8. # 后台菜单排序
  9. 'order' => 2,
  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' => '名称-400电话',
  41. 'default' => '',
  42. 'desc' => '名称',
  43. 'match' => 'is_string',
  44. 'update' => 'text',
  45. 'search' => 'fulltext',
  46. 'list' => true,
  47. ),
  48. 'reorder' => array
  49. (
  50. 'type' => 'int-11',
  51. 'name' => '排序-数值越大越靠前',
  52. 'default' => '1',
  53. 'desc' => '请输入排序',
  54. 'match' => 'option',
  55. 'update' => 'text',
  56. 'search' => 'order',
  57. 'list' => true,
  58. 'order' => 'desc',
  59. 'edit' => true,
  60. ),
  61. 'state' => array
  62. (
  63. 'type' => 'tinyint-1',
  64. 'name' => '状态',
  65. 'default' => '1',
  66. 'desc' => '请选择状态',
  67. 'match' => 'is_numeric',
  68. ),
  69. 'cdate' => array
  70. (
  71. 'type' => 'int-11',
  72. 'name' => '创建时间',
  73. 'match' => array('is_numeric', time()),
  74. 'desc' => '',
  75. # 只有insert时才生效
  76. 'insert' => true,
  77. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  78. ),
  79. ),
  80. 'manage' => array
  81. (
  82. //'insert' => false,
  83. 'delete' => false,
  84. // 'edit' => false,
  85. # 设置公司权限
  86. 'company' => 'company_id',
  87. ),
  88. 'request' => array
  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. 'getAll' => array
  103. (
  104. # 匹配的正则或函数 选填项
  105. 'option' => array
  106. (
  107. // 'id' => array('yes','>'),
  108. 'state' => 1,
  109. ),
  110. 'type' => 'all',
  111. 'order' => array('reorder' => 'desc', 'id' => 'asc'),
  112. 'col' => '*',
  113. ),
  114. ),
  115. );