# `eleproductstock`

> 印件-仓库


- **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 | `sCustomerId` | `varchar(50)` | NO |  |  |  | 客户Id |
| 9 | `sProductId` | `varchar(50)` | NO | MUL |  |  | 产品ID |
| 10 | `sDefineNo` | `varchar(50)` | NO |  |  |  | 自定义项 |
| 11 | `sDefineNo2` | `varchar(50)` | NO |  |  |  | 自定义项2 |
| 12 | `sWarehouseId` | `varchar(50)` | NO |  |  |  | 仓库ID |
| 13 | `sLocationId` | `varchar(50)` | NO |  |  |  | 库区ID |
| 14 | `sWarehouseLocationId` | `varchar(50)` | NO |  |  |  | 库位ID |
| 15 | `dProductQty` | `decimal(18,6)` | NO |  | 0.000000 |  | 库存数量 |
| 16 | `dProductPrice` | `decimal(18,6)` | NO |  | 0.000000 |  | 库存价格 |
| 17 | `dProductMoney` | `decimal(18,2)` | NO |  | 0.00 |  | 库存金额 |
| 18 | `tInventoryDate` | `datetime` | NO |  | 2000-01-01 00:00:00 |  | 盘点日期 |
| 19 | `sFormId` | `varchar(50)` | NO |  |  |  | 界面Id |
| 20 | `dMinStock` | `decimal(18,6)` | NO |  | 0.000000 |  | 最小库存 |
| 21 | `dMaxStock` | `decimal(18,6)` | NO |  | 0.000000 |  | 最大库存 |
| 22 | `dCostMoney` | `decimal(18,2)` | YES |  | 0.00 |  | 成本金额 |
| 23 | `dCostPrice` | `decimal(18,6)` | YES |  | 0.000000 |  | 成本价格 |
| 24 | `dInProductQty` | `decimal(18,6)` | NO |  | 0.000000 |  | 入库数量 |
| 25 | `dInProductMoney` | `decimal(18,2)` | NO |  | 0.00 |  | 入库金额 |
| 26 | `tMakeDate` | `datetime` | NO |  | CURRENT_TIMESTAMP | DEFAULT_GENERATED | 制单日期 |
| 27 | `dSumProductQty` | `decimal(18,6)` | YES |  | 0.000000 |  | 成品超期汇总反写数量 |
| 28 | `sDefineNo3` | `varchar(50)` | NO |  |  |  | 自定义项3 |
| 29 | `sWorkOrderId` | `varchar(50)` | NO |  |  |  | 工单ID |
| 30 | `sOrderId` | `varchar(50)` | NO |  |  |  | 订单ID |
| 31 | `sOrderNo` | `varchar(50)` | NO |  |  |  | 订单号 |
| 32 | `sWorkOrderNo` | `varchar(50)` | NO |  |  |  | 工单ID |
| 33 | `tCheckedDate` | `datetime` | YES |  | CURRENT_TIMESTAMP | DEFAULT_GENERATED | 检验日期 |
| 34 | `tCurrDate` | `datetime` | YES |  | CURRENT_TIMESTAMP | DEFAULT_GENERATED | 入库日期 |
| 35 | `tProductionDate` | `datetime` | YES |  | CURRENT_TIMESTAMP | DEFAULT_GENERATED | 生产日期 |
| 36 | `bFrozen` | `bit(1)` | YES |  | b'0' |  |  |
| 37 | `dCurrencyRate` | `decimal(18,6)` | YES |  | 0.000000 |  |  |
| 38 | `dProductForeignMoney` | `decimal(18,6)` | YES |  | 0.000000 |  | 外币金额 |
| 39 | `dProductForeignPrice` | `decimal(18,6)` | YES |  | 0.000000 |  |  |
| 40 | `sCurrency` | `varchar(50)` | YES |  |  |  |  |
| 41 | `sCustomerOrderNo` | `varchar(100)` | YES |  |  |  | 客户订单号 |
| 42 | `sHBWareHouseId` | `varchar(100)` | YES |  |  |  | 余数仓id设置为正仓用于查询汇总 |
| 43 | `sOpsBillNo` | `varchar(100)` | YES |  |  |  | 成品外购单号 |
| 44 | `sOrderSlaveId` | `varchar(100)` | YES |  |  |  | 订单从表id |
| 45 | `sWorkOrderSlaveId` | `varchar(100)` | YES |  |  |  | 工单从表id |

## Indexes

| Name | Unique | Type | Columns |
|---|---|---|---|
| `IndexN_eleproductstock` |  | BTREE | `sId`, `sBrandsId`, `sSubsidiaryId` |
| `IndexN_eleproductstock_sProductId` |  | BTREE | `sProductId` |
| `IndexU_eleproductstock` | ✓ | BTREE | `sId`, `sBrandsId`, `sSubsidiaryId` |
| `IndexU_eleproductstockId` | ✓ | BTREE | `sProductId`, `sDefineNo`, `sDefineNo2`, `sWarehouseId`, `sLocationId`, `sWarehouseLocationId`, `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._
