company.php 2.4 KB

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