DStocktaking.Class.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /**
  3. * 盘点库存Dao
  4. * Created by PhpStorm.
  5. * User: 小威
  6. * Date: 2019/12/04
  7. * Time: 11:40
  8. */
  9. namespace JinDouYun\Dao\Stock;
  10. use JinDouYun\Dao\BaseDao;
  11. class DStocktaking extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'stock')
  14. {
  15. $this->_table = 'stocktaking';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  19. "no", //char(20) DEFAULT NULL COMMENT '调拨入库单号',
  20. "warehouseId", //int(10) DEFAULT NULL COMMENT '仓库id',
  21. "warehouseName",
  22. "num", //int(10) NOT NULL COMMENT '商品数量',
  23. "operatorId", //int(10) DEFAULT NULL COMMENT '制单人信息',
  24. "operatorName", //varchar(30) DEFAULT NULL COMMENT '制单人姓名',
  25. "auditId", //int(10) DEFAULT NULL COMMENT '审核人id',
  26. "auditName", //varchar(30) DEFAULT NULL COMMENT '审核人姓名',
  27. "remark", //varchar(255) DEFAULT NULL COMMENT '备注',
  28. "stocktakingTime", //int(10) DEFAULT NULL COMMENT '盘点时间',
  29. "auditTime", //int(10) DEFAULT NULL COMMENT '审核时间',
  30. "auditStatus", //tinyint(3) DEFAULT '1' COMMENT '审核状态 1:待审核 2:已审核 3:审核失败 4:审核中',
  31. "deleteStatus", //tinyint(3) DEFAULT '5' COMMENT '删除状态 4:已删除 5:正常',
  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. ];
  40. $this->_update_autofill = [
  41. 'updateTime' => time()
  42. ];
  43. parent::__construct($serviceDB);
  44. }
  45. }