info_sku.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <?php
  2. $config = array
  3. (
  4. # 表名
  5. 'name' => 'info_sku',
  6. # 显示给用户看的名称
  7. 'lang' => '商品价格设置',
  8. 'order' => 200,
  9. 'menu' => false,
  10. # 数据结构 不同的字段放这里
  11. 'struct' => array
  12. (
  13. 'id' => array
  14. (
  15. 'type' => 'int-11',
  16. 'name' => 'ID',
  17. 'default' => '',
  18. 'desc' => '',
  19. 'match' => 'is_numeric',
  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. 'attr' => array
  33. (
  34. 'type' => 'text-255',
  35. 'name' => '属性组合规则',
  36. 'default' => '',
  37. 'desc' => '属性组合规则',
  38. 'match' => 'is_string',
  39. 'update' => 'textarea',
  40. 'list' => true,
  41. ),
  42. 'price' => array
  43. (
  44. 'type' => 'varchar-50',
  45. 'name' => '售价',
  46. 'default' => '',
  47. 'desc' => '售价',
  48. 'match' => 'is_string',
  49. 'update' => 'text',
  50. 'list' => true,
  51. ),
  52. 's_price' => array
  53. (
  54. 'type' => 'varchar-50',
  55. 'name' => '售价',
  56. 'default' => '',
  57. 'desc' => '售价',
  58. 'match' => 'is_string',
  59. 'update' => 'text',
  60. 'list' => true,
  61. ),
  62. 'num' => array
  63. (
  64. 'type' => 'int-11',
  65. 'name' => '库存',
  66. 'default' => '',
  67. 'desc' => '库存',
  68. 'match' => 'is_string',
  69. 'update' => 'text',
  70. 'list' => true,
  71. ),
  72. 'reorder' => array
  73. (
  74. 'type' => 'int-11',
  75. 'name' => '排序-数值越大越靠前,相当于置顶',
  76. 'default' => '1',
  77. 'desc' => '请输入排序',
  78. 'match' => 'option',
  79. //'update' => 'text',
  80. 'search' => 'order',
  81. 'list' => true,
  82. 'order' => 'desc',
  83. 'edit' => true,
  84. ),
  85. 'state' => array
  86. (
  87. 'type' => 'tinyint-1',
  88. 'name' => '数据状态',
  89. 'default' => '1',
  90. 'desc' => '请选择状态',
  91. 'match' => 'is_numeric',
  92. ),
  93. 'cdate' => array
  94. (
  95. 'type' => 'int-11',
  96. 'name' => '发布时间',
  97. 'match' => array('is_numeric', time()),
  98. 'desc' => '',
  99. # 只有insert时才生效
  100. 'insert' => true,
  101. //'search' => 'date',
  102. //'list' => 'date("Y-m-d H:i:s", {cdate})',
  103. ),
  104. ),
  105. 'manage' => array
  106. (
  107. 'insert' => false,
  108. 'edit' => false,
  109. 'delete' => false,
  110. 'num' => false,
  111. 'page_list_table' => 'sku',
  112. ),
  113. );
  114. return $config;