page_module.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'page_module',
  6. # 显示给用户看的名称
  7. 'lang' => '页面模块关联表',
  8. 'menu' => false,
  9. # 数据结构
  10. 'struct' => array
  11. (
  12. 'id' => array
  13. (
  14. 'type' => 'int-11',
  15. 'name' => 'ID',
  16. 'default' => '',
  17. 'desc' => '',
  18. 'match' => 'is_numeric',
  19. 'search' => 'order',
  20. 'list' => true,
  21. ),
  22. 'page_id' => array
  23. (
  24. 'type' => 'int-11',
  25. 'name' => '页面ID',
  26. 'default' => '',
  27. 'desc' => '页面ID',
  28. 'match' => 'is_numeric',
  29. 'update' => 'text',
  30. 'list' => true,
  31. ),
  32. 'module_id' => array
  33. (
  34. 'type' => 'int-11',
  35. 'name' => '模块ID',
  36. 'default' => '',
  37. 'desc' => '模块ID',
  38. 'match' => 'is_numeric',
  39. 'update' => 'text',
  40. 'list' => true,
  41. ),
  42. 'cdate' => array
  43. (
  44. 'type' => 'int-11',
  45. 'name' => '录入时间',
  46. 'match' => array('is_numeric', DEVER_TIME),
  47. 'desc' => '',
  48. # 只有insert时才生效
  49. 'insert' => true,
  50. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  51. ),
  52. ),
  53. 'manage' => array
  54. (
  55. 'lang' => 'name,desc',
  56. ),
  57. # request 请求接口定义
  58. 'request' => array
  59. (
  60. 'getData' => array
  61. (
  62. 'where' => array
  63. (
  64. 'page_id' => 'yes-t_1.page_id',
  65. 'state' => 'yes-t_2.state-1',
  66. ),
  67. 'join' => array
  68. (
  69. array
  70. (
  71. 'table' => 'page/module',
  72. 'type' => 'left join',
  73. 'on' => array('module_id','id'),
  74. 'col' => 't_1.id as tid',
  75. ),
  76. ),
  77. 'type' => 'all',
  78. 'order' => array('t_2.reorder' => 'asc', 't_2.id' => 'desc'),
  79. 'col' => 'id,t_2.id,t_2.name,t_2.key,t_2.pic,t_2.desc,t_2.content,t_2.num,t_2.col|key',
  80. ),
  81. )
  82. );