123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <?php
- /**
- * 库存流水管理Dao
- * Created by PhpStorm.
- * User: 小威
- * Date: 2019/11/12
- * Time: 10:00
- */
- namespace JinDouYun\Dao\Stock;
- use JinDouYun\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',
- "merchantId", //int(10) NOT NULL DEFAULT '0' COMMENT '商户id',
- "warehouseId", //int(10) NOT NULL COMMENT '仓库id',
- "originId", //int(10) NOT NULL COMMENT '业务来源id',
- "originNo", //char(25) 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',
- "unitName", //varchar(255) DEFAULT NULL COMMENT '单位名称',
- "skuName", //varchar(255) DEFAULT NULL COMMENT '属性名称',
- "inventoryNum", //decimal(20,8) NOT NULL COMMENT '库存数',
- "otherNum", //decimal(20,8) DEFAULT '0.00000000' 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);
- }
- }
|