# `elematerialsstock`

> 实际库存


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

## Columns

| # | Name | Type | Null | Key | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| 1 | `iIncrement` | `int` | NO | PRI |  | auto_increment | 自增列 |
| 2 | `sId` | `varchar(50)` | NO | MUL |  |  | 标准ID |
| 3 | `sBrandsId` | `varchar(50)` | NO |  |  |  | 加工商ID |
| 4 | `sSubsidiaryId` | `varchar(50)` | NO |  |  |  | 子公司ID |
| 5 | `tCreateDate` | `datetime` | NO |  | CURRENT_TIMESTAMP | DEFAULT_GENERATED | 记账日期 |
| 6 | `sMakePerson` | `varchar(50)` | NO |  |  |  | 制单人 |
| 7 | `iOrder` | `int` | NO |  | 0 |  | 排序号 |
| 8 | `sMaterialsId` | `varchar(50)` | YES | MUL |  |  | 材料ID |
| 9 | `sMaterialsStyle` | `varchar(50)` | NO |  |  |  | 材料规格 |
| 10 | `sDefineNo` | `varchar(50)` | NO |  |  |  | 自定义项 |
| 11 | `sDefineNo2` | `varchar(50)` | NO |  |  |  | 自定义项2 |
| 12 | `sDefineNo3` | `varchar(50)` | NO |  |  |  | 自定义项3 |
| 13 | `sWarehouseId` | `varchar(50)` | NO |  |  |  | 仓库Id |
| 14 | `sLocationId` | `varchar(50)` | NO |  |  |  | 库区ID |
| 15 | `sWarehouseLocationId` | `varchar(50)` | NO |  |  |  | 库位Id |
| 16 | `dAuxiliaryQty` | `decimal(18,6)` | NO |  | 0.000000 |  | 库存数量 |
| 17 | `sAuxiliaryUnit` | `varchar(50)` | YES |  |  |  | 库存单位 |
| 18 | `dMaterialsQty` | `decimal(18,6)` | NO |  | 0.000000 |  | 换算数量 |
| 19 | `dConversionQty` | `decimal(18,6)` | NO |  | 0.000000 |  | 预留数量 |
| 20 | `dMaterialsPrice` | `decimal(18,6)` | NO |  | 0.000000 |  | 库存价格 |
| 21 | `dMaterialsMoney` | `decimal(18,2)` | NO |  | 0.00 |  | 库存金额 |
| 22 | `tInventoryDate` | `datetime` | NO |  | 2000-01-01 00:00:00 |  | 盘点日期 |
| 23 | `dMinStock` | `decimal(18,6)` | YES |  |  |  | 最小库存换算数量 |
| 24 | `dMaxStock` | `decimal(18,6)` | YES |  |  |  | 最大库存换算数量 |
| 25 | `sFormId` | `varchar(50)` | NO |  |  |  | 界面ID |
| 26 | `dMinStockAuxiliaryQty` | `decimal(18,6)` | YES |  |  |  | 最小库存 |
| 27 | `dMaxStockAuxiliaryQty` | `decimal(18,6)` | YES |  |  |  | 最大库存 |
| 28 | `bQuotation` | `bit(1)` | NO |  | b'0' |  | 是否报价 |
| 29 | `sCReserve1` | `varchar(50)` | YES |  |  |  | 预留字符1 |
| 30 | `sCReserve2` | `varchar(50)` | YES |  |  |  | 预留字符2 |
| 31 | `sCReserve3` | `varchar(50)` | YES |  |  |  | 预留字符3 |
| 32 | `dCReserve1` | `decimal(18,6)` | YES |  |  |  | 预留数字1 |
| 33 | `dCReserve2` | `decimal(18,6)` | YES |  |  |  | 预留数字2 |
| 34 | `dCReserve3` | `decimal(18,6)` | YES |  |  |  | 预留数字3 |
| 35 | `iCReserve1` | `int` | YES |  |  |  | 预留整型1 |
| 36 | `iCReserve2` | `int` | YES |  |  |  | 预留整型2 |
| 37 | `iCReserve3` | `int` | YES |  |  |  | 预留整型3 |
| 38 | `tCReserve1` | `datetime` | YES |  |  |  | 预留日期1 |
| 39 | `tCReserve2` | `datetime` | YES |  |  |  | 预留日期2 |
| 40 | `tCReserve3` | `datetime` | YES |  |  |  | 预留日期3 |
| 41 | `tMakeDate` | `datetime` | NO |  | CURRENT_TIMESTAMP | DEFAULT_GENERATED | 制单日期 |
| 42 | `dReelQty` | `decimal(18,6)` | NO |  | 0.000000 |  | 分切数量 |
| 43 | `sReelStyle` | `varchar(50)` | YES | MUL |  |  | 分切规格 |
| 44 | `tCurrDate` | `datetime` | YES |  |  |  | 入库日期 |
| 45 | `tCheckedDate` | `datetime` | YES |  |  |  | 检验日期 |
| 46 | `tProductionDate` | `datetime` | YES |  |  |  | 生产日期 |
| 47 | `sWorkOrderNo` | `varchar(1000)` | YES |  |  |  | 工单号 |
| 48 | `sCusServices` | `varchar(255)` | YES |  |  |  | 客服 |
| 49 | `bFrozen` | `bit(1)` | YES |  | b'0' |  |  |
| 50 | `bShow` | `bit(1)` | YES |  | b'0' |  |  |
| 51 | `bQlyComplete` | `bit(1)` | YES |  | b'0' |  | 材料检验单据(外购) |

## Indexes

| Name | Unique | Type | Columns |
|---|---|---|---|
| `IndexN_10` |  | BTREE | `sMaterialsId`, `sBrandsId`, `sSubsidiaryId` |
| `IndexN_elematerialsstock` |  | BTREE | `sReelStyle`, `sWarehouseId`, `sLocationId`, `sMaterialsId` |
| `IndexU_elematerialsstock` | ✓ | BTREE | `sId`, `sBrandsId`, `sSubsidiaryId` |
| `IndexU_elematerialsstockId` | ✓ | BTREE | `sMaterialsId`, `sMaterialsStyle`, `sDefineNo`, `sDefineNo2`, `sWarehouseId`, `sLocationId`, `sWarehouseLocationId` |
| `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._
