DInventoryLocking.Class.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. /**
  3. * 库存锁定记录Dao
  4. * Created by PhpStorm.
  5. * User: 小威
  6. * Date: 2019/11/13
  7. * Time: 11:30
  8. */
  9. namespace JinDouYun\Dao\Stock;
  10. use JinDouYun\Dao\BaseDao;
  11. class DInventoryLocking extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'stock')
  14. {
  15. $this->_table = 'inventory_locking';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  19. "shopId",
  20. "materielId", //int(10) NOT NULL COMMENT '物料id',
  21. "operatorId", //int(10) DEFAULT NULL COMMENT '操作人id',
  22. "operatorName", //varchar(30) DEFAULT NULL COMMENT '操作人姓名',
  23. "materielCode", //char(15) DEFAULT NULL COMMENT '物料编码',
  24. "originId", //int(10) NOT NULL COMMENT '源头id',
  25. "originNo", //char(25) NOT NULL COMMENT '源头单号',
  26. "source", //tinyint(3) DEFAULT NULL COMMENT '来源',
  27. "sourceNo", //char(25) NOT NULL COMMENT '来源单号',
  28. "lockingNum", //decimal(20,8) NOT NULL COMMENT '数量',
  29. "skuId", //int(10) DEFAULT NULL COMMENT '单位id',
  30. "lockStatus", //tinyint(3) DEFAULT '4' COMMENT '状态 4:已锁定 5:已解锁',
  31. "unlockTime", //int(10) DEFAULT NULL COMMENT '解锁时间',
  32. "createTime", //int(10) DEFAULT NULL COMMENT '创建时间',
  33. "updateTime", //int(10) DEFAULT NULL COMMENT '更新时间',
  34. "extend", //json DEFAULT NULL COMMENT '扩展字段',
  35. ];
  36. $this->_readonly = ['id'];
  37. $this->_create_autofill = [
  38. 'createTime' => time(),
  39. 'updateTime' => time()
  40. ];
  41. $this->_update_autofill = [
  42. 'updateTime' => time()
  43. ];
  44. parent::__construct($serviceDB);
  45. }
  46. }