28 lines
1.7 KiB
XML
28 lines
1.7 KiB
XML
<?xml version="1.0" ?>
|
|
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
|
|
<table name="subitem_product" resource="default" engine="innodb" comment="magento中简单产品包含的小货号,一个字产品可能包含多个小货号">
|
|
<column xsi:type="int" name="subitem_id" unsigned="true" nullable="false" identity="true" comment="Entity Id"/>
|
|
<constraint xsi:type="primary" referenceId="PRIMARY">
|
|
<column name="subitem_id"/>
|
|
</constraint>
|
|
<column name="product_id" nullable="false" xsi:type="int" comment="product_id" identity="false" unsigned="true"/>
|
|
<index referenceId="STEMCELL_SUBITEM_PRODUCT_ID" indexType="btree">
|
|
<column name="product_id"/>
|
|
</index>
|
|
|
|
<column name="sub_product_id" nullable="true" xsi:type="int" comment="sub_product_id" identity="false" unsigned="true" disabled="true" />
|
|
<column name="quality" nullable="true" xsi:type="int" comment="quality in parent product" identity="false" unsigned="true" disabled="true" />
|
|
|
|
<column name="sub_sku" nullable="false" xsi:type="varchar" comment="小货号sku, 不在magento的product里" />
|
|
<index referenceId="SUBITEM_SUB_SKU" indexType="btree">
|
|
<column name="sub_sku"/>
|
|
</index>
|
|
<column name="bundle_qty" nullable="false" xsi:type="int" comment="一个简单产品包含的小货号数量" identity="false" unsigned="false"/>
|
|
<column name="stock_qty" nullable="false" xsi:type="int" comment="小货号库存" identity="false" unsigned="false"/>
|
|
<constraint xsi:type="unique" referenceId="product_id_sub_sku">
|
|
<column name="product_id"/>
|
|
<column name="sub_sku"/>
|
|
</constraint>
|
|
</table>
|
|
</schema>
|