DLockingShop.Class.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * 库存管理Dao
  4. * Created by PhpStorm.
  5. * User: 小威
  6. * Date: 2019/11/12
  7. * Time: 10:00
  8. */
  9. namespace JinDouYun\Dao\Stock;
  10. use JinDouYun\Dao\BaseDao;
  11. class DLockingShop extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'stock')
  14. {
  15. $this->_table = 'locking_shop';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  19. "shopId", //int(10) DEFAULT NULL COMMENT '商铺id',
  20. "materielId", //int(10) NOT NULL COMMENT '物料ID',
  21. "materielCode", //varchar(255) DEFAULT NULL COMMENT '物料编码',
  22. "lockInventory", //decimal(20,8) NOT NULL COMMENT '锁定库存数',
  23. "skuId", //int(10) DEFAULT NULL COMMENT '单位id',
  24. "updateTime", //int(10) DEFAULT NULL COMMENT '修改时间',
  25. "createTime", //int(10) DEFAULT NULL COMMENT '创建时间',
  26. "extend", //json DEFAULT NULL COMMENT '扩展字段',
  27. ];
  28. $this->_readonly = ['id'];
  29. $this->_create_autofill = [
  30. 'createTime' => time(),
  31. 'updateTime' => time()
  32. ];
  33. $this->_update_autofill = [
  34. 'updateTime' => time()
  35. ];
  36. parent::__construct($serviceDB);
  37. }
  38. }