company.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <?php
  2. # 常用的col
  3. $col = '*';
  4. return array
  5. (
  6. # 表名
  7. 'name' => 'company',
  8. # 显示给用户看的名称
  9. 'lang' => '公司管理',
  10. 'order' => 7,
  11. 'menu' => false,
  12. 'end' => array
  13. (
  14. 'update' => 'manage/company.update',
  15. ),
  16. # 数据结构
  17. 'struct' => array
  18. (
  19. 'id' => array
  20. (
  21. 'type' => 'int-11',
  22. 'name' => 'ID',
  23. 'default' => '',
  24. 'desc' => '',
  25. 'match' => 'is_numeric',
  26. 'list' => true,
  27. ),
  28. 'name' => array
  29. (
  30. 'type' => 'varchar-80',
  31. 'name' => '公司名称',
  32. 'default' => '',
  33. 'desc' => '公司名称',
  34. 'match' => 'is_string',
  35. 'update' => 'text',
  36. 'list' => true,
  37. 'search' => 'fulltext',
  38. ),
  39. 'state' => array
  40. (
  41. 'type' => 'tinyint-1',
  42. 'name' => '状态',
  43. 'default' => '1',
  44. 'desc' => '请选择状态',
  45. 'match' => 'is_numeric',
  46. ),
  47. 'cdate' => array
  48. (
  49. 'type' => 'int-11',
  50. 'name' => '录入时间',
  51. 'match' => array('is_numeric', time()),
  52. 'desc' => '',
  53. # 只有insert时才生效
  54. 'insert' => true,
  55. 'list' => 'date("Y-m-d H:i", {cdate})',
  56. ),
  57. ),
  58. 'default' => array
  59. (
  60. 'col' => 'id,name,state,cdate',
  61. 'value' => array
  62. (
  63. '1,"默认公司", 1,' . DEVER_TIME,
  64. ),
  65. ),
  66. # 管理功能
  67. 'manage' => array
  68. (
  69. 'delete' => false,
  70. 'insert' => false,
  71. 'edit' => false,
  72. # 自定义快捷新增和编辑
  73. 'button' => array
  74. (
  75. '新增' => array('fast'),
  76. ),
  77. # 快捷更新
  78. 'list_button' => array
  79. (
  80. 'edit' => array('编辑'),
  81. ),
  82. ),
  83. 'request' => array
  84. (
  85. 'getIds' => array
  86. (
  87. 'type' => 'all',
  88. 'option' => array
  89. (
  90. 'ids' => array('yes-id', 'in'),
  91. 'state' => 1,
  92. ),
  93. 'order' => array('id' => 'desc'),
  94. 'col' => '*|id',
  95. ),
  96. 'getOld' => array
  97. (
  98. 'type' => 'all',
  99. 'option' => array
  100. (
  101. 'ids' => array('yes-id', 'in'),
  102. 'state' => 1,
  103. ),
  104. 'order' => array('id' => 'asc'),
  105. 'col' => '*',
  106. ),
  107. ),
  108. );