info_column.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'info_column',
  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. 'info_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. 'column_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. 'state' => array
  43. (
  44. 'type' => 'tinyint-1',
  45. 'name' => '数据状态',
  46. 'default' => '1',
  47. 'desc' => '请选择状态',
  48. 'match' => 'is_numeric',
  49. ),
  50. 'cdate' => array
  51. (
  52. 'type' => 'int-11',
  53. 'name' => '录入时间',
  54. 'match' => array('is_numeric', DEVER_TIME),
  55. 'desc' => '',
  56. # 只有insert时才生效
  57. 'insert' => true,
  58. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  59. ),
  60. ),
  61. 'manage' => array
  62. (
  63. 'delete' => false,
  64. 'edit' => false,
  65. 'insert' => false,
  66. ),
  67. 'request' => array
  68. (
  69. 'getData' => array
  70. (
  71. # 匹配的正则或函数 选填项
  72. 'option' => array
  73. (
  74. 'column_id' => array('yes-t_1.column_id'),
  75. 'status' => array('yes-t_2.status', 1),
  76. 'state' => array('yes-t_2.state', 1),
  77. ),
  78. # 联表
  79. 'join' => array
  80. (
  81. array
  82. (
  83. 'table' => 'goods/info',
  84. 'type' => 'left join',
  85. 'on' => array('info_id','id'),
  86. 'col' => 'info_id',
  87. ),
  88. ),
  89. 'type' => 'all',
  90. 'order' => array('t_2.reorder' => 'desc', 't_2.id' => 'desc'),
  91. 'col' => '*,t_2.*',
  92. ),
  93. ),
  94. );