# `mitmaterialsstore`

> 材料-库存明细表


- **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 | `tCreateDate` | `datetime` | NO |  | CURRENT_TIMESTAMP | DEFAULT_GENERATED | 制单日期 |
| 7 | `iOrder` | `int` | NO |  | 0 |  | 排序号 |
| 8 | `sMaterialsId` | `varchar(100)` | NO |  |  |  | 材料ID |
| 9 | `sMaterialsStyle` | `varchar(255)` | YES |  |  |  | 材料规格 |
| 10 | `sDefineNo` | `varchar(100)` | NO |  |  |  | 自定义项 |
| 11 | `sDefineNo2` | `varchar(100)` | NO |  |  |  | 自定义项2 |
| 12 | `sWarehouseId` | `varchar(100)` | NO |  |  |  | 仓库ID |
| 13 | `sLocationId` | `varchar(100)` | NO |  |  |  | 库区ID |
| 14 | `sWarehouseLocationId` | `varchar(100)` | NO |  |  |  | 库位ID |
| 15 | `dAuxiliaryQty` | `decimal(18,6)` | NO |  |  |  | 库存数量 |
| 16 | `sAuxiliaryUnit` | `varchar(255)` | NO |  |  |  | 库存单位 |
| 17 | `dMaterialsQty` | `decimal(18,6)` | NO |  |  |  | 换算数量 |
| 18 | `dConversionQty` | `decimal(18,6)` | NO |  | 0.000000 |  | 预留数量 |
| 19 | `dMaterialsPrice` | `decimal(18,6)` | NO |  | 0.000000 |  | 材料价格 |
| 20 | `dMaterialsMoney` | `decimal(18,6)` | NO |  | 0.000000 |  | 材料金额 |
| 21 | `sFormId` | `varchar(100)` | NO |  |  |  | 窗体ID |
| 22 | `sBillId` | `varchar(100)` | NO | MUL |  |  | 单据ID |
| 23 | `sBillSlaveId` | `varchar(100)` | NO |  |  |  | 单据从表ID |
| 24 | `sBillNo` | `varchar(255)` | NO |  |  |  | 单据号 |
| 25 | `sWorkOrderId` | `varchar(100)` | NO |  |  |  | 工单ID |
| 26 | `sWorkOrderNo` | `varchar(255)` | NO |  |  |  | 工单号 |
| 27 | `sWorkOrderSlaveId` | `varchar(100)` | NO |  |  |  | 工单从表Id |
| 28 | `sOrderId` | `varchar(100)` | NO |  |  |  | 订单ID |
| 29 | `sOrderNo` | `varchar(255)` | NO |  |  |  | 订单号 |
| 30 | `sOrderSlaveId` | `varchar(100)` | NO |  |  |  | 订单从表Id |
| 31 | `sMemo` | `text` | YES |  |  |  | 备注 |
| 32 | `iNumber` | `int` | YES |  | 0 |  | 件数 |

## Indexes

| Name | Unique | Type | Columns |
|---|---|---|---|
| `IndexN_mitmaterialsstore` |  | BTREE | `sId`, `sBrandsId`, `sSubsidiaryId`, `sMaterialsId`, `sMaterialsStyle`, `sDefineNo`, `sDefineNo2`, `sWarehouseId` |
| `IndexN_mitmaterialsstoreBillId` |  | BTREE | `sBillId` |
| `IndexU_mitmaterialsstore` | ✓ | 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._
