1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- /**
- * 库存批次管理Dao
- * Created by PhpStorm.
- * User: phperstar
- * Date: 2019/12/10
- * Time: 10:00
- */
- namespace JinDouYun\Dao\Stock;
- use JinDouYun\Dao\BaseDao;
- class DInventoryBatch extends BaseDao
- {
- public function __construct($serviceDB = 'stock')
- {
- $this->_table = 'inventory_batch';
- $this->_primary = 'id';
- $this->_fields = [
- "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '自增id',
- "merchantId", //int(10) NOT NULL DEFAULT '0' COMMENT '商户id',
- "originId", //int(10) DEFAULT NULL COMMENT '源头id',
- "originNo", //char(25) DEFAULT NULL COMMENT '源头单号',
- "warehouseId", //int(10) NOT NULL COMMENT '仓库id',
- "materielId", //int(10) NOT NULL COMMENT '物料id',
- "materielCode", //varchar(255) NOT NULL COMMENT '物料编码',
- "sourceNo", //varchar(50) NOT NULL COMMENT '编号',
- "skuId", //int(10) NOT NULL COMMENT 'skuid',
- "batchNo", //varchar(50) NOT NULL COMMENT '批次编号',
- "num", //decimal(20,8) NOT NULL COMMENT '批次可用数量',
- "otherNum", //decimal(20,8) unsigned DEFAULT '0.00000000' COMMENT '其他单位数量',
- "averageCost", //decimal(15,4) NOT NULL COMMENT '均价成本',
- "batchCost", //decimal(15,4) NOT NULL COMMENT '批次成本',
- "productionData", //int(10) DEFAULT NULL COMMENT '生产日期',
- "shelfLife", //int(10) DEFAULT NULL COMMENT '保质期',
- "batchStatus", //tinyint(3) DEFAULT '5' COMMENT '批次状态 4:禁用 5:正常',
- "createTime", //int(10) DEFAULT NULL COMMENT '创建时间',
- "updateTime", //int(10) DEFAULT NULL COMMENT '修改时间',
- "extend", //json DEFAULT NULL COMMENT '扩展字段',
- ];
- $this->_readonly = ['id'];
- $this->_create_autofill = [
- 'createTime' => time(),
- 'updateTime' => time()
- ];
- $this->_update_autofill = [
- 'updateTime' => time()
- ];
- parent::__construct($serviceDB);
- }
- }
|