ï1/4éæ±
æ建ä ̧ä ̧ªçμåéç ̈yyyä ̧å¿ï1/4å ̄æ ̄æyçç§ç±»yy±æ§ùå¤ï1/4å ̄以å ç ãèæãä1/4åãæå¡ç±»yæ ̄ä ̧çyyy ·æä ̧åçè§æ 1/4ï1/4ä ̧çè§æ 1/4çåæ§ä"·æ 1/4çäçä©"·æ 1/4ï1/4å®® yy ̄æ ̄æ§è ̧çè ̧çæ ̄ä»ã
1ï1/4ç®çæ ̄ä»ä¹ï1/4
to ̧å§å¶ä ̧èμ·®to ðä ̧ä ̧ªéç ̈yyyä ̧å¿ï1/4ä"ä ̧å®°ä ̧äºæ©to±æ§è®3/4计æ³ã
2ï1/4ä1/2 è1/2å¦å°ä»ä¹ï1/4
- §£è¡ä ̧æ ̄è ̄è¦å¿μ
- ̈æskuè¡ ̈åè®3/4计
- to±æskuæ©å±æ§è®3/4计
- ä»·æ 1/4æ©å±æ§è®3/4计
- yyè§æ 1/4è®3/4计
3ï1/4ä ̧è1/2å¦å°ä»ä¹ï1/4
- yyy3/4çyy ̈è®3/4计
- yyä ̧ä ̧æ¶è®3/4计
- yyyæ ç3/4è 3/4è®®¡
- åºåè 3/4è®®¡
- æç ́¢çéè 3/4è®®¡
2 yyyūæ¦å¿μ
yyä ̧å¿æ ̄çμyyä ̧ªç³»ç»çæåºç¡åå ï1/4ä ̧ºyyã订åï1/4ä1/4æ ä¿éãúãä»to ̈ç æμç系穻æä3/4åºáæ°æ®ã
çμåçåºæ¬æ ̄è ̄ï1/4
- SKUï1/4ï1/4Stock Keeping Uintï1/4å³åºåéåä1/2ï1/4ï1/4åºyæ§å¶çæå°å ̄ç ̈yä1/2ãä3/4å¦âiPhone 7 Plus 128Gé¶è²âå°±æ ̄ä ̧ä ̧ªSKUï1/4ä»åºç¡çãéè® ́è¿è ́§ãåºç®¡çé1/2æ ̄以SKUäºè®°å1/2yy ã
- SPUï1/4ï1/4Standard Product Unitï1/4å³æ yyyú§yyy ï1/4ï1/4æ ̄ä ̧ç»æ yyä¿¡æ ̄çéåï1/4ä3/4å¦âiPhone 7 Plusâå°±æ ̄ä ̧ªSPUã
-
ç±»ç ï1/4å³åç±»æ ãçμyy ̧ ̧çæä ̧¤å±ç±»ç ï1/4yy±çºç±»ç yyy« ̄yy类箮®ã®
yðç±»ç æçæ ̄å±äºç»æ¶è ́¹è ççç±»ç®ï1/4ä1/4æ ¹æ ãèãéå®çåãæ®®́»to ̈è¿è¡y ̈ï1/4
yyðç±»ç®å±äºç¡æ°æ ï1/4ä ̧å ̄éæy ̈ï1/4æ®·» to SKUæ¶é1/2éè¦éæ©yyŰç±»ç ï1/4è¿è¡ç®»to®ã
- to±æ§ï1/4åä ̧º óé å±æ§ãéå å±æ§ãé害鮮å±æ§ùæ®å±æ§ã
- to ³é®å±æ§ æ ̄æè1/2å¤ ̄ä ̧á â ®®§å±æ§ï1/4æºçå¿ å¡¹ï1/4ä3/4å¦æºçå±oh¹Űºå ̧̄ãyy±äº to ±®æ§ã
- éå å±æ§ æ ̄ç»æSKUç¹æ å±æ§ï1/4æç°ä ̧ºâçæ 1/4å±æ§âï1/4ä3/4宦æºçâ鮢è²âãâ åâã
- éå ³é å±æçæ ̄é¤ ³é®®å±æ§ãéå å±æ§å§å§å ¶ä»å±æ§ï1/4å¦åç1/2 æè±¡å¤ ́åç ́ ãåç1/2®®æä¤ ́yç ́ 㺧宰ãåè3/4 ̈çã
- ç¹æ®å±æ§ æéè¦éè¿è°ç ̈to ¶ä»æ¡æè1/2è·yyİçå±æ§ã
3 yyyæ¶æå3/4
åèä ̧é¢çåç»ææ ̈¡yy3/4ï1/4ååæ ̈¡åçç»æè3/4ä ̧ºå¤æï1/4å ̈å ä¹SKUä ̧SPUæ¶ï1/4æ¶åç±»ç ãå±æ§ãåçãçä§ä¿¡æ ̄çæ°æ çç®»yï1/4å ̈åºSKUyyy®"ºSPUï1/4å®̈SPUä ̧æ®·" to yy¿°yyæ 1/4æyy°±æºyyãæ ¹æ yyyyè¡çåºúää"·æ 1/4ç¡çãè ̄è ºçáçãæç®® ́¢çéçæ®̈¡®yã
3.1 yyyç»ææ ̈¡yyy3/4
3.2 yy ̧yſERy/4
3.3 yyyä ̧å¿æ ́ä1/2æ¶æå3/4
4 yyyç±»ç®
4.1 what±®®
yyç±»ç åä ̧ºä ̧¤å±ï1/4åºç¡æ°æ ç±»ç å±ï1/4yå°ç±»ç ï1/4ãyå°å±§ºç±»ç å±ï1/4yå°ð𠧱»ç ï1/4ãé£ä ̧ºä»ä¹è¦åãyy°ç±»ç yy1/4ç®®®®®¡çï1/4èä ̧æ®̄yİå ±ç ̈ä ̧å¥ç±»ç®®®âï1/4
yyy°ç±»ç é¢yyy¶æä3/4åºé3/4úºyï1/4yyy®±æ§ãéå å±æ§åçå3/4å¤æ°æ é1/2æ®̄å®̈yºç¡ç±»ç ä ̧è¿è¡ç®®¡çï1®/4
yyðç±»ç é¢yç ̈æ·ï1/4æ¹ä3/4¿ç ̈æ·æ¥æ3/4yyï1/4è¿å ̄以éçè¿è¦è¦å»èðæ ́ãæ ̄å¦èä ̧éçèæ¥ãæ¶ä»¤£èåï1/4è¿è¥1/4ç®»to ̧y ́yy°ç±»ç®ã
4.2 yyŰç±"ç®
yyy°ç±»ç ̧»®è¦é¢yy¹³y°¨¿è¥äººyyyy®¶ï1/4ç ̈äºç®¡çåã±æ§yyççæ°æ®ã
yyİç±»ç ̧ ̄¹åºå ï1/4á äºä¹åä ̧ä1/4è1 ®®/2»ææ ́æå é¤ï1/4å¦æç®±»ç®ä ̧æè1/21/2æåï1/4å°±ä ̧è1/2å éæä1/2åºã®
ç±"ç æ çå±æ¬¡ä ̧è1/2åªæ·±ï1/4ä ̧è¬ä ̧å±æyy±ãäªæ·±ï1/4å ̄¹äºyyç¡çä ̧太ª æ¹ä3/4¿ãç±»ç æ ä ̧æä ̧å±ç±»ç§°ä ̧ºå§±»ç ï1/4y¿ é¡»æè1/21/2äºå¶åç®®®±»ç®®®ä ̧ã
4.3 yyŰç±"ç®
yå°ç±»ç®ä ̧»è¦é¢åç ̈æ·ï1/4æ¹ä3/4¿ç ̈æ·çéæ¥æ3/4åï1/4å¦å3/4å3/4槺ã
yyðç±"ç to ̄ä"¥æ ¹æ è¥éè¦ï1/4çμæ ́»åäãæ以å¤çåçå箫 ̄ç±»ç æ¶ï1/4å°±åºè ̄¥æä3/4å¤æ ·åçåç« ̄类箮æ ̄æã®
yyİç±"ç ̄æ ̧yyyĢæ®·ç« ̄çè®3/4ç1/2®ãPCç« ̄ãH5ç« ̄ãAPP箫 ̄ç
yyy°ç±»ç ä ̧yúyź çyİç®®±»ç ï1/4ç1/4è3/4å3/4çμæ®́»ãå ̄éå é¤ãå ̄éæ¶yå ̈ï1/4å®æ¶çæã
4.4 ç±»ç®è¡ ̈ç»æè 3/4è®®¡
4.1.1 åç« ̄ç±»ç®è¡ ̈è 3/4è®®¡
CREATE TABLE `category` (
`id` bigint(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`name` varchar(32) NOT NULL COMMENT 'ç±»ç®å称',
`parent_id` bigint(11) NOT NULL COMMENT 'ç¶id',
`leaf` tinyint(4) NOT NULL COMMENT 'æ¯å¦å¶åèç¹ 1æ¯ 0ä¸æ¯',
`level` tinyint(4) NOT NULL COMMENT 'ç±»ç®å±çº§',
`path` varchar(128) DEFAULT NULL COMMENT 'å®æ´ç¶çº§è·¯å¾ï¼ç¶ç¶id_ç¶id',
`sort` int(11) unsigned NOT NULL COMMENT 'æåºå段',
`status` tinyint(4) NOT NULL COMMENT 'åç±»ç¶æ:1ä¸æ¶ 2ä¸æ¶',
`del` tinyint(4) unsigned NOT NULL COMMENT 'æ¯å¦å é¤',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'å建æ¶é´',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'æ´æ°æ¶é´',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='ç±»ç®è¡¨';
4.4.2 åç« ̄ç±»ç®æ°æ®å±§º
5 SKU
SKUç æ ̄çμyä®̧æºçæ¦å¿μï1/4SKUæ ̄æºy ã
以iPhone 8 Plusï1/4SPUï1/4ä ̧ºä3/4ï1/4è¿ä ̧ªSPUçè§æ 1/4æå¤ç§ï1/4é¢è²å å«é è²ãç1/2è²ãé»è²ãç«ç°éé¶è²ãää�ãääº é»ã纮¢è²ç6ç§ï1/4å åå å«32Gã 128Gã256Gç3ç§ï1/4ï1/4å ̄¹åº18ï1/4å³3Ã6ï1/4ç§SKUãæ ̄å¦âiPhone 7 Plusç1/2 è²32GâãâiPhone 7 Plusé»è²32Gâè¿ä ̧¤ä ̧ªSKUé1/2è1/2å ·åå°å®ç ãä»åºç³»ç»ç»ãéè ́ç³»ç»ãåºåç³»ç»ç³»ç©»é1/2æ ̄ä ̧»è¦ç®¡çSKUã
5.1 skuè¡ ̈è®3/4计
CREATE TABLE `sku` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`sku_no` varchar(32) DEFAULT '' COMMENT 'åååºåå·',
`sku_name` varchar(50) DEFAULT NULL COMMENT 'ååå称',
`sku_description` varchar(256) DEFAULT NULL COMMENT 'ååæè¿°',
`sku_type` tinyint(4) DEFAULT NULL COMMENT 'ååç±»åï¼1å®ç©ååã2ä¼åååã3å¢å¼ååï¼4èæç©å',
`status` tinyint(4) NOT NULL COMMENT 'ç¶æ 1æªä¸æ¶2.å·²ä¸æ¶ 3.å·²ä¸æ¶',
`sort` int(10) DEFAULT '0' COMMENT 'æåº',
`boundle` tinyint(4) unsigned DEFAULT '0' COMMENT 'æ¯å¦ç»ååå 1æ¯ 0å¦',
`create_by` int(11) unsigned NOT NULL COMMENT 'å建人ID',
`update_by` int(11) unsigned DEFAULT NULL COMMENT 'ä¿®æ¹äººID',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'å建æ¶é´',
`update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT 'æ´æ°æ¶é´',
PRIMARY KEY(`id`) USING BTREE,
UNIQUE KEY `uk_sku_no` (`sku_no`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COMMENT = 'åå表'
5.2 skuè¡ ̈æ°æ®
5.3 skuå±æ§è¡ ̈
©æ å±æ§1ï1/4å ̈ææ éå¶yå"ºå±æ§æ°éã
CREATE TABLE `sku_attr` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`sku_no` varchar(32) DEFAULT '' COMMENT 'åååºåå·',
`sku_attrs` json DEFAULT NULL COMMENT 'skuå±æ§ï¼ååå±æ§ï¼',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'å建æ¶é´',
`update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT 'æ´æ°æ¶é´',
PRIMARY KEY(`id`) USING BTREE,
UNIQUE KEY `uk_sku_no` (`sku_no`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COMMENT = 'ååå±æ§è¡¨'
5.4 skuå±æ§æ°æ®
ä ̧yy»ºæ°åæ μï1/4è¿å ̄以ç ̈sql殥è ̄¢ï1/4ä1/2 å3/4å°äºä»ä¹å ̄åï1/4
5.5 See ̈æè¡ ̈å
©æ å±æ§2ï1/4æ ¹æ ä ̧åç±»ç®è1/21/2ä ̧yy±æ ̧æ ̈æ计 ̈åã
å°ä ̧ç»å±æ§æè1/21/2å°ç±»ç®æ¥å ̈æè¡ ̈åï1/4ä1/2 å3/4å°úä»ä¹å ̄åï1®/4
5.6 yyyç±»ç®óè
CREATE TABLE `category_to_goods` (
`id` bigint(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`category_id` bigint(20) DEFAULT NULL COMMENT 'ç±»ç®id',
`goods_no` varchar(32) DEFAULT NULL COMMENT 'ååç¼å·',
`goods_type` tinyint(4) DEFAULT NULL COMMENT 'ååç±»åï¼1skuã2spu',
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT 'å建æ¶é´',
`update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT 'æ´æ°æ¶é´',
`is_deleted` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT 'æ¯å¦å é¤:0-å¦ï¼1-æ¯',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COMMENT='ç±»ç®ååå
³è表';
5.7 ç»åskuå ³ç³»è¡ ̈
CREATE TABLE `bundle_to_sku` (
`id` bigint(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`goods_id` bigint(20) DEFAULT NULL COMMENT 'ååid, ç»åååid',
`bundle_id` bigint(20) DEFAULT NULL COMMENT 'ç»åååid',
`quantity` int(11) DEFAULT NULL COMMENT 'ååæ°é',
`entity_type` tinyint(4) DEFAULT '1' COMMENT 'ååçç±»å:1sku,2ç»ååå',
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT 'å建æ¶é´',
`update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT 'æ´æ°æ¶é´',
`is_deleted` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT 'æ¯å¦å é¤:0-å¦ï¼1-æ¯',
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_bundle_to_goods_bundle_id_index` (`bundle_id`) USING BTREE,
KEY `idx_bundle_to_goods_object_id_entity_type_index` (`object_id`,`entity_type`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='å¥è£
åskuå
³è表||å¥è£
åspuå
³è表';
5.8 ç»Åskuå ³ç³»æ°æ®
Skua® æ
5.9 yy"ºç»yyy¡ ̈å
6 to±æ§
6.1 to±æ§§®¡ç
ä ̧ºúæ¹ä3/4¿yyç¡çï1/4æ们éè¦to ̈ç³»ç»ä ̧建ç«ä ̧å¥å±æ§åºãå ̈to®ä¹ä ̧ä ̧ªå±æ§æ¶ï1/4éè¦æè1/21/2å ̈类箮 ä ̧ï1/4åºy±æ§åç±»ï1/4å ³é å±æ§ãéå å±æ§ãéå ³é®®å±æ§ãùæ®å±æ§ï1/4ï1/4容¶ç¡ ®®å± æ§å1/4ãæ3/4äºç±»yï1/4åéãå¤éãå ̄èªå®ä¹ï1/4ãæ ̄yŦyš«ã
6.2 to±æ§úç ̈åºæ ̄
- æ·" to yyá ̈yæ ̧²æã ̈æ·" to yyyæ¶ï1/4å ̄éè¿éæ å¶åç±»ç®ï1/4å°æè1/21/2å°å¶ç±»çå®±æ§æ ̧²æ©°á ̈y̧ã
- to ́æ®·ç« ̄¹to ̄æ äæ®ä ̧å±æ§è¿è¡æç ́¢ãçéyyã
- to ̈spué¡μé¢ç ̈æ·å ̄å ̈yyè§æ 1/4(éå å±æ§)æ¥å ä1/2åºä©®®̧åçskuã
- yyy ̄¦æ é¡μé¢ ̄å±äyyŰé ç1/2®çå±æ°æ°æ®â
6.3 å±æ§è¡ ̈è 3/4è®®¡
CREATE TABLE `attribute` (
`id` bigint(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`name` varchar(32) NOT NULL DEFAULT '' COMMENT 'å±æ§å称',
`code` varchar(32) DEFAULT NULL COMMENT 'å±æ§ä»£ç (éå¿
å¡«)',
`attr_type` tinyint(4) NOT NULL COMMENT 'å±æ§åºç¨:1ååå±æ§,2éå®å±æ§,3ç¹æ®å±æ§',
`value_type` tinyint(4) DEFAULT NULL COMMENT 'å±æ§å¼ç±»å:1ï¼å符串,2ï¼æ°å',
`fill_type` tinyint(4) NOT NULL COMMENT 'å¡«åç±»å:1å¡«ååï¼å符ï¼,2å¡«ååï¼ä»
æ´æ°æ°åï¼,3éæ©åï¼åéå¼,éidï¼4éæ©åï¼å¤éå¼,éidï¼,5å¤è¾å
¥æ¡å±ç¤ºå',
`is_filter` tinyint(4) unsigned NOT NULL COMMENT 'æ¯å¦æ¯æåå°çé:0å¦ 1æ¯',
`status` tinyint(11) NOT NULL COMMENT 'ç¶æ:1 æªä¸æ¶ 2å·²ä¸æ¶ 3å·²ä¸æ¶',
`is_deleted` tinyint(4) unsigned NOT NULL COMMENT 'æ¯å¦å é¤',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'å建æ¶é´',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'ä¿®æ¹æ¶é´',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COMMENT='å±æ§è¡¨';
6.4 to±æ§á ̈æ°æ®
6.5 å±æ§æä ̧3/4è¡ ̈è®3/4计
CREATE TABLE `attribute_enum` (
`id` bigint(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`attr_id` bigint(20) NOT NULL COMMENT 'å±æ§id',
`attr_code` varchar(32) DEFAULT NULL,
`enum_code` bigint(11) DEFAULT NULL COMMENT 'enumcode',
`enum_value` varchar(32) NOT NULL COMMENT 'å±æ§æ举å¼å称',
`sort` int(11) NOT NULL COMMENT 'æåº',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'å建æ¶é´',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'æ´æ°æ¶é´',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='å±æ§æ举表';
6.6 å±æ§æä ̧3/4è¡ ̈æ°æ®
6.7 to±æ§åç±»ç®óèè¡ ̈è®3/4计
CREATE TABLE `category_to_attr` (
`id` bigint(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`category_id` bigint(11) NOT NULL COMMENT 'åç±»id',
`attr_id` bigint(20) NOT NULL COMMENT 'å±æ§id',
`is_required` tinyint(4) unsigned NOT NULL COMMENT 'æ¯å¦å¿
å¡«',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'å建æ¶é´',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'æ´æ°æ¶é´',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='åç±»å±æ§å
³è表';
6.8 to ̈æçæ±æ§è¡ ̈å
å1/2å±æ§åºæ建å æåï1/4å°±ä1/4被åçªå¶åç®±»ç®̈ï1/4æ·" to yyyöå°±éè¦å¡«y¿äºå±æ§ï1/4y°±æºè1/21/2ä1/2ï1/4å¦å3/4æºã
æ ¹æ è¿äºå±æ§ä3/4¿è1/2ç¡å yyçå ̄ä ̧æ§ï1/4SKUï1/4ã çyy®±æ§ï1/4类箮®âç·è£ âââé£á£âï1/4 , ç¹å«éè¦æ³ ̈æçæ ̄ä ̧äºçæ®1/4å±æ§ï1/4å¦é¢è²ãðºç çï1/4ãå3/4大åæ 1/4â§æ 1/4â3/4å¦á£ æãéåçã以ä ̧åç·éä ̧ºä3/4ï1/4æé¢è²ï1/4åè®3/4ç1/2㺢ã é»3ç§é¢è²ï1/4ï1/4æå°ºç ï1/4ä»39ï1/244å ±6ç§å°ºç ï1/4ï1/4é£ä¹è¿ä ̧ªSPUï1/4ç·éï1/4 ä ̧é¢å°±æ18ä ̧ªSKUãè¿äºSKUçå±æ§é¤ºçæ 1/4å±æ§å¤ï1/4å ¶ä»å±æ§é1/2æ ̄ ä ̧ è ́çï1/4æ以å ̈æ°å»ºyyæ¶ï1/4å ̄èyy°ä ̧èμ·ï1/4å ±̈å ¶ä»å±æ§ã
7 SPU
7.1 SPUe¦μ
SPU ̄æ y ãSPUä ̧SKUçå ³ç³»æè ̧å§ï1/4å ̄以ä̧å ̄¹äçä ̧â ̧ï1/4 ç»å§é ̈åSPUä ̧SKUé1/2æ ̄ä ̧å ̄¹ä ̧ï1/4娧æ 1/4çSPUåSKUä¹é ́æ ̄éè¿è®§æ 1/4å±æ§æ¿æ¥çãSPUçåºyy ̄ç±to ¶y ̄¹çSKUyy ±y³y®ç ã
以iPhone 11ï1/4SPUï1/4ä ̧ºä3/4ï1/4è¿ä ̧ªSPUçè§æ 1/4æå¤ç§ï1/4é¢è²å å«ç1/2è²ãé»è²ãé»éãç»è²ã绿è²ã红è²ç²çòçãç¥ç²çòοβãç¥ç²ãç¥ç¥ç²ãç¥ç¥ç²ãç¥ç¥ç²ãç¥ç¥ç¥ç²ãç¥ç¥ç²ãç¥ç²ã笲ãç¥ç²ãç²ã笲ãç²ãç¥ç²ãç²ãç¥ç²ãç²ã6ç§ï1/4å åå å«32Gã 128Gã256Gç3ç§ï1/4ï1/4å ̄¹åº18ï1/4å³3Ã6ï1/4ç§SKUãæ ̄å¦âiPhone 11 ç1/2è² 64GâãâiPhone 11 é»è² 64Gâ è¿ä ̧¤ä ̧ªSKUé1/2è1/2å ·åå°å ç ãä»åºç³»ç»ãéè́ç³»ç»ãåºåç³»ç»ç»ç系穻é1/2æ ̄ä ̧»è¦ç®¡çSKUã å ̈æ¥å ̧ ̧è¿è¥ä ̧ä¹å3/4å ̧ ̧è§ä ̧ä ̧ªSKUå ̄¹åºå®¤ä ̧ªSPUã
7.2 SPUåè§æ 1/4è 3/4è®®¡
CREATE TABLE `spu` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`name` varchar(64) DEFAULT NULL COMMENT 'spuå称',
`detail` varchar(256) DEFAULT NULL COMMENT 'ååä»ç»',
`status` tinyint(4) DEFAULT NULL COMMENT 'ç¶æ 1æªä¸æ¶2.å·²ä¸æ¶ 2.å·²ä¸æ¶',
`spu_specs` json DEFAULT NULL COMMENT 'ååè§æ ¼',
`creator_id` bigint(20) DEFAULT NULL COMMENT 'å建è
',
`is_deleted` tinyint(1) unsigned DEFAULT '0' COMMENT 'æ¯å¦å é¤ï¼0:æªå é¤ 1:å·²å é¤',
`sort` int(10) DEFAULT '0' COMMENT 'æåº',
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT 'å建æ¶é´',
`update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT 'æ´æ°æ¶é´',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='spu';
7.3 SPUåè§æ 1/4æ°æ®
skuå±æ§æ°æ®
Spuè¡ ̈yy3/4ç
7.4 spuåskuå ³èè¡ ̈
CREATE TABLE `spu_to_sku` (
`id` bigint(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`sku_no` varchar(32) NOT NULL DEFAULT '' COMMENT 'sku id',
`spu_no` varchar(32) NOT NULL DEFAULT '' COMMENT 'spu id',
`is_deleted` tinyint(1) DEFAULT '0' COMMENT 'æ¯å¦å é¤ï¼0:æªå é¤ 1:å·²å é¤',
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT 'å建æ¶é´',
`update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT 'æ´æ°æ¶é´',
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_spu_to_sku` (`spu_no`,`sku_no`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COMMENT='spuååå
³è表';
8 ä»·æ 1/4is®3/4计
ä»·æ 1/4å æ¬ï1/4ææ¬ä»·ãåä»·ãå åä»·ãå éãè ̈èéçä1/4éçéæ±çä ̧æå¢å ï1/4å°¤å ¶æ ̄ä ̧äºå ̈线æ²çåç ́è¡ä ̧çμyå®®̄¹éé¢ä1/4æç§ç©æ³ã
CREATE TABLE `sku_price` (
`id` bigint(11) NOT NULL AUTO_INCREMENT,
`sku_id` bigint(11) unsigned NOT NULL COMMENT 'ååid',
`sku_no` varchar(20) NOT NULL DEFAULT '' COMMENT 'ååç¼å·',
`sku_type` tinyint(4) NOT NULL COMMENT 'ååç±»å: 1åsku 2ç»åsku',
`sub_goods` tinyint(4) NOT NULL COMMENT 'æ¯å¦ååå:0å¦1æ¯',
`bundle_id` bigint(20) DEFAULT NULL COMMENT 'ç»åååid é»è®¤ 空',
`price` decimal(10, 2) NOT NULL COMMENT 'ä»·æ ¼',
`price_type` varchar(32) NOT NULL COMMENT 'ä»·æ ¼ç±»åæ举ï¼1.åååä»·REAL_PRICE 2.å®åä»·SELL_PRICE 3.å®ååºä»·... ï¼',
`currency_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT 'è´§å¸ç±»å:1人æ°å¸ 2èæå¸',
`enable` tinyint(4) unsigned DEFAULT '1' COMMENT 'æ¯å¦å¯ç¨ 0 ä¸å¯ç¨ 1 å¯ç¨',
`create_by` int(11) unsigned NOT NULL COMMENT 'å建人ID',
`update_by` int(11) unsigned DEFAULT NULL COMMENT 'ä¿®æ¹äººID',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'å建æ¶é´',
`update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT 'æ´æ°æ¶é´',
PRIMARY KEY (`id`) USING BTREE,
KEY `idx_sku_id` (`sku_id`) USING BTREE,
KEY `idx_sku_no` (`sku_no`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COMMENT = 'ååä»·æ ¼è¡¨' "
©æ å±æ§3ï1/4ä ̧y建æ°yy μï1/4åä ̧ä ̧ªyyy®̄æ ̄æ¤ç§ä»·æ 1/4åè ́§ççç±"
9 æ»ç»
æ¬æè ̄¦ç»ä»ç»äºyyä ̧å¿è 3/4è¡æ å±æ§è 3/4è¡æ³ï1/4并y ̈è®®®3/4è®®®¡æ©¹é¢äºyç" ́šº¦yã
©æ å±æ§æ»ç»å¦ä ̧ï1/4
- to ̈æ éy"ºå±æ§æ°éã
- æ äæ ä ̧yç±»ç®è1/21/2ä ̧yy±æ ̧æ ̈æ计 ̈yã
- ä ̧yy»ºæ°yæ μï1/4åä ̧ä ̧ªyyy ̄æ ̄殤ç§ä»·æ 1/4yy ́§ççç±»ã
to to±æ§æ³å ̄ä"§è å§å±¶©å ̄ä"§®©å®¶å ̈y1/4yè¿ç ̈äæå ̄yã
æç« æ¥æºï1/4京ä ̧ç©æμ_é«å³°_https://zhuanlan.zhihu.com/p/618405659