1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- /**
- * 库存管理Dao
- * Created by PhpStorm.
- * User: 小威
- * Date: 2019/11/12
- * Time: 10:00
- */
- namespace JinDouYun\Dao\Stock;
- use JinDouYun\Dao\BaseDao;
- class DInventory extends BaseDao
- {
- public function __construct($serviceDB = 'stock')
- {
- $this->_table = 'inventory';
- $this->_primary = 'id';
- $this->_fields = [
- "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '自增id',
- "merchantId", //int(10) NOT NULL DEFAULT '0' COMMENT '商户id',
- "materielId", //int(10) NOT NULL COMMENT '物料ID',
- "materielCode", //varchar(255) DEFAULT NULL COMMENT '物料编码',
- "inventoryNum", //decimal(20,8) NOT NULL COMMENT '库存数',
- "otherNum", //decimal(20,8) DEFAULT '0.00000000' COMMENT '其他单位数量',
- "lockInventory", //decimal(20,8) NOT NULL COMMENT '锁定库存数',
- "costPrice", //decimal(15,4) DEFAULT NULL COMMENT '成本价',
- "skuId", //int(10) DEFAULT NULL COMMENT '单位id',
- "updateTime", //int(10) DEFAULT NULL COMMENT '修改时间',
- "createTime", //int(10) DEFAULT NULL COMMENT '创建时间',
- ];
- $this->_readonly = ['id'];
- $this->_create_autofill = [
- 'createTime' => time(),
- 'updateTime' => time()
- ];
- $this->_update_autofill = [
- 'updateTime' => time()
- ];
- parent::__construct($serviceDB);
- }
- }
|