1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- /**
- * 库存流水管理Dao
- * Created by PhpStorm.
- * User: 小威
- * Date: 2019/11/12
- * Time: 10:00
- */
- namespace Jobs\Dao\Stock;
- use Jobs\Dao\BaseDao;
- class DInventoryDetails extends BaseDao
- {
- public function __construct($serviceDB = 'stock')
- {
- $this->_table = 'inventory_details';
- $this->_primary = 'id';
- $this->_fields = [
- "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '自增id',
- "warehouseId", //int(10) NOT NULL COMMENT '仓库id',
- "originId", //int(10) NOT NULL COMMENT '业务来源id',
- "originNo", //char(22) NOT NULL COMMENT '业务来源no',
- "materielId", //int(10) NOT NULL COMMENT '物料id',
- "materielCode", //varchar(255) NOT NULL COMMENT '物料编码',
- "materielName", //varchar(255) NOT NULL COMMENT '物料名称',
- "sourceNo", //char(20) NOT NULL COMMENT '来源单号',
- "source", //tinyint(3) NOT NULL COMMENT '单据来源标识',
- "operatorId", //int(10) NOT NULL COMMENT '操作人id',
- "operatorName", //varchar(50) NOT NULL COMMENT '操作人姓名',
- "skuId", //int(10) NOT NULL COMMENT '单位id',
- "inventoryNum", //decimal(20,8) NOT NULL COMMENT '库存数',
- "inventoryChangeNum", //decimal(20,8) NOT NULL COMMENT '变动后库存数量',
- "batch", //json NOT NULL COMMENT '批次信息',
- "costType", //tinyint(3) NOT NULL DEFAULT '1' COMMENT '计算成本方式 1:移动加权 2:个别计价',
- "averageCost", //decimal(15,4) NOT NULL COMMENT '均价成本',
- "actionType", //tinyint(3) NOT NULL COMMENT '出入库操作标识 5:入库 4:出库',
- "createTime", //int(10) NOT NULL COMMENT '创建时间',
- "updateTime", //int(10) NOT NULL COMMENT '更新时间',
- "extend", //json DEFAULT NULL COMMENT '扩展字段',
- ];
- $this->_readonly = ['id'];
- $this->_create_autofill = [
- 'createTime' => time()
- ];
- $this->_update_autofill = [
- 'updateTime' => time()
- ];
- parent::__construct($serviceDB);
- }
- }
|