1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?php
- /**
- * 库存批次管理Dao
- * Created by PhpStorm.
- * User: phperstar
- * Date: 2019/12/10
- * Time: 10:00
- */
- namespace Jobs\Dao\Stock;
- use Jobs\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',
- "originId",
- "originNo",
- "warehouseId", //int(10) NOT NULL COMMENT '仓库id',
- "materielId", //int(10) NOT NULL COMMENT '物料ID',
- "materielIdCode", //varchar(255) DEFAULT NULL COMMENT '物料编码',
- "sourceNo", // 来源单号
- "skuId", //单位id
- 'batchNo', // 批次编号
- 'num', // 批次可用数量
- "averageCost", //成本均价
- 'batchCost',//批次成本
- 'productionData',//生产日期
- 'batchStatus',
- "updateTime", //int(10) DEFAULT NULL COMMENT '修改时间',
- "createTime", //int(10) DEFAULT NULL COMMENT '创建时间',
- "extend", //json DEFAULT NULL COMMENT '扩展字段',
- ];
- $this->_readonly = ['id'];
- $this->_create_autofill = [
- 'createTime' => time(),
- ];
- $this->_update_autofill = [
- 'updateTime' => time()
- ];
- parent::__construct($serviceDB);
- }
- }
|