DReportLoss.Class.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /**
  3. * 报损库存Dao
  4. * Created by PhpStorm.
  5. * User: haoren
  6. * Date: 2021/03/09
  7. * Time: 11:40
  8. */
  9. namespace JinDouYun\Dao\Stock;
  10. use JinDouYun\Dao\BaseDao;
  11. class DReportLoss extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'stock')
  14. {
  15. $this->_table = 'report_loss';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '库存报损记录表',
  19. "warehouseId", //int(10) DEFAULT NULL COMMENT '仓库id',
  20. "warehouseName", //varchar(255) DEFAULT NULL COMMENT '仓库名称',
  21. "no", //varchar(255) DEFAULT NULL COMMENT '单号',
  22. "skuNum", //int(10) DEFAULT NULL COMMENT '物料sku数量',
  23. "amount", //decimal(20,4) DEFAULT '0.0000' COMMENT '报损总金额',
  24. "operatorId", //int(10) DEFAULT NULL COMMENT '制单人id',
  25. "operatorName", //varchar(255) DEFAULT NULL COMMENT '制单人姓名',
  26. "auditId", //int(10) DEFAULT NULL COMMENT '审核人id',
  27. "auditName", //varchar(255) DEFAULT NULL COMMENT '审核人姓名',
  28. "remark", //varchar(255) DEFAULT NULL COMMENT '备注',
  29. "auditTime", //int(10) DEFAULT NULL COMMENT '审核时间',
  30. "auditStatus", //tinyint(1) DEFAULT '1' COMMENT '审核状态',
  31. "deleteStatus", //tinyint(1) DEFAULT '5' 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. ];
  40. $this->_update_autofill = [
  41. 'updateTime' => time()
  42. ];
  43. parent::__construct($serviceDB);
  44. }
  45. }