info_goods.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <?php
  2. $type = array
  3. (
  4. 1 => '正常商品',
  5. 2 => '赠品',
  6. );
  7. return array
  8. (
  9. # 表名
  10. 'name' => 'info_goods',
  11. # 显示给用户看的名称
  12. 'lang' => '套餐商品表',
  13. 'menu' => false,
  14. 'end' => array
  15. (
  16. 'insert' => 'scm_product/lib/order.updateGoods?table=scm_product/info_goods',
  17. 'update' => 'scm_product/lib/order.updateGoods?table=scm_product/info_goods',
  18. ),
  19. # 数据结构
  20. 'struct' => array
  21. (
  22. 'id' => array
  23. (
  24. 'type' => 'int-11',
  25. 'name' => 'ID',
  26. 'default' => '',
  27. 'desc' => '',
  28. 'match' => 'is_numeric',
  29. 'search' => 'order',
  30. 'update' => 'hidden',
  31. //'list' => true,
  32. ),
  33. 'info_id' => array
  34. (
  35. 'type' => 'int-11',
  36. 'name' => '商品表id',
  37. 'default' => '',
  38. 'desc' => '商品表id',
  39. 'match' => 'is_numeric',
  40. ),
  41. 'goods' => array
  42. (
  43. 'type' => 'varchar-2000',
  44. 'name' => '商品',
  45. 'default' => '',
  46. 'desc' => '商品',
  47. 'match' => 'option',
  48. 'update' => 'select',
  49. 'update_search' => 'scm_product/lib/manage.searchProduct?{goods_id}',
  50. ),
  51. 'goods_id' => array
  52. (
  53. 'type' => 'int-11',
  54. 'name' => '商品',
  55. 'default' => '',
  56. 'desc' => '商品',
  57. 'match' => 'is_numeric',
  58. ),
  59. 'sku_id' => array
  60. (
  61. 'type' => 'int-11',
  62. 'name' => 'sku_id',
  63. 'default' => '-1',
  64. 'desc' => 'sku_id',
  65. 'match' => 'is_numeric',
  66. ),
  67. 'num' => array
  68. (
  69. 'type' => 'int-11',
  70. 'name' => '数量',
  71. 'default' => '1',
  72. 'desc' => '数量',
  73. 'match' => 'is_numeric',
  74. 'search' => 'select',
  75. 'update' => 'text',
  76. ),
  77. 'type' => array
  78. (
  79. 'type' => 'int-11',
  80. 'name' => '类型',
  81. 'default' => '1',
  82. 'desc' => '类型',
  83. 'match' => 'is_numeric',
  84. 'update' => 'select',
  85. 'option' => $type,
  86. 'search' => 'select',
  87. 'list' => true,
  88. ),
  89. 'state' => array
  90. (
  91. 'type' => 'tinyint-1',
  92. 'name' => '状态',
  93. 'default' => '1',
  94. 'desc' => '请选择状态',
  95. 'match' => 'is_numeric',
  96. ),
  97. 'cdate' => array
  98. (
  99. 'type' => 'int-11',
  100. 'name' => '创建时间',
  101. 'match' => array('is_numeric', time()),
  102. 'desc' => '',
  103. # 只有insert时才生效
  104. 'insert' => true,
  105. 'search' => 'date',
  106. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  107. ),
  108. ),
  109. 'manage' => array
  110. (
  111. 'insert' => false,
  112. 'delete' => false,
  113. ),
  114. 'request' => array
  115. (
  116. ),
  117. );