# `mftproductmaterials`

> 工单材料表


- **Engine:** InnoDB
- **Collation:** utf8mb3_general_ci

## Columns

| # | Name | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | `iIncrement` | `int` | NO | PRI |  | auto_increment | 自增列 |
| 2 | `sId` | `varchar(100)` | NO | MUL |  |  | 唯一ID |
| 3 | `sBrandsId` | `varchar(100)` | NO |  |  |  | 加工商ID |
| 4 | `sSubsidiaryId` | `varchar(100)` | NO |  |  |  | 子公司ID |
| 5 | `sMakePerson` | `varchar(255)` | NO |  |  |  | 制单人 |
| 6 | `iOrder` | `int` | NO |  | 0 |  | 排序号 |
| 7 | `sParentId` | `varchar(100)` | NO |  |  |  | 父级ID |
| 8 | `sControlId` | `varchar(100)` | NO | MUL |  |  | 控制表ID |
| 9 | `sType` | `varchar(255)` | NO |  |  |  | 类型（部件材料、部件辅料、成品材料） |
| 10 | `sMaterialsId` | `varchar(100)` | NO | MUL |  |  | 材料ID |
| 11 | `sMaterialsStyle` | `varchar(255)` | NO |  |  |  | 材料规格 |
| 12 | `sAuxiliaryUnit` | `varchar(255)` | NO |  |  |  | 材料单位 |
| 13 | `dMaterialsKQty` | `decimal(18,6)` | NO |  | 1.000000 |  | 材料开数 |
| 14 | `bComMaterials` | `bit(1)` | NO |  | b'0' |  | 是否来料 |
| 15 | `bOutsideBandMaterials` | `bit(1)` | NO |  | b'0' |  | 是否发外带料 |
| 16 | `sProcessId` | `varchar(100)` | NO |  |  |  | 工序ID |
| 17 | `sProcessTbId` | `varchar(100)` | NO |  |  |  | 源单的工序表Id |
| 18 | `sSelectProcess` | `varchar(255)` | NO |  |  |  | 手动选择工序后赋值此字段 |
| 19 | `sSrcId` | `varchar(100)` | NO |  |  |  | 源单的材料表Id |
| 20 | `sMaterialsMemo` | `text` | YES |  |  |  | 材料信息 |
| 21 | `sAReserve1` | `varchar(255)` | YES |  |  |  | 预留字符1 |
| 22 | `sAReserve2` | `varchar(255)` | YES |  |  |  | 预留字符2 |
| 23 | `sAReserve3` | `varchar(255)` | YES |  |  |  | 预留字符3 |
| 24 | `sAReserve4` | `varchar(255)` | YES |  |  |  | 预留字符4 |
| 25 | `sAReserve5` | `varchar(255)` | YES |  |  |  | 预留字符5 |
| 26 | `sAReserve6` | `varchar(255)` | YES |  |  |  | 预留字符6 |
| 27 | `dAReserve1` | `decimal(18,6)` | YES |  |  |  | 预留数字1 |
| 28 | `dAReserve2` | `decimal(18,6)` | YES |  |  |  | 预留数字2 |
| 29 | `dAReserve3` | `decimal(18,6)` | YES |  |  |  | 预留数字3 |
| 30 | `iAReserve1` | `int` | YES |  |  |  | 预留整型1 |
| 31 | `iAReserve2` | `int` | YES |  |  |  | 预留整型2 |
| 32 | `iAReserve3` | `int` | YES |  |  |  | 预留整型3 |
| 33 | `tAReserve1` | `datetime` | YES |  |  |  | 预留日期1 |
| 34 | `tAReserve2` | `datetime` | YES |  |  |  | 预留日期2 |
| 35 | `sSrcControlId` | `varchar(100)` | NO |  |  |  | 源单控制表Id |
| 36 | `sSrcMaterialsTbId` | `varchar(100)` | NO |  |  |  | 源单材料表Id |
| 37 | `dBomCoefficient` | `decimal(18,6)` | YES |  |  |  | BOM系数 |
| 38 | `sSlaveProductId` | `varchar(100)` | NO |  |  |  | 从表产品id |
| 39 | `sCombinePartsName` | `varchar(255)` | NO |  |  |  | 产品名称 |

## Indexes

| Name | Unique | Type | Columns |
|---|---|---|---|
| `IndexN_mftproductmaterials` |  | BTREE | `sId`, `sBrandsId`, `sSubsidiaryId`, `sParentId` |
| `IndexN_mftproductmaterialsControlId` |  | BTREE | `sControlId`, `sParentId`, `sBrandsId`, `sSubsidiaryId` |
| `IndexN_mftproductmaterialsMaterialsId` |  | BTREE | `sMaterialsId`, `sParentId`, `sBrandsId`, `sSubsidiaryId` |
| `IndexU_mftproductmaterials` | ✓ | BTREE | `sId`, `sBrandsId`, `sSubsidiaryId` |
| `PRIMARY` | ✓ | BTREE | `iIncrement` |

## Narrative

_No human-written narrative yet — when this table is exercised by a [vertical slice](../../slices/index.md), link from there back to this page._
