DInventoryBatch.Class.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * 库存批次管理Dao
  4. * Created by PhpStorm.
  5. * User: phperstar
  6. * Date: 2019/12/10
  7. * Time: 10:00
  8. */
  9. namespace Jobs\Dao\Stock;
  10. use Jobs\Dao\BaseDao;
  11. class DInventoryBatch extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'stock')
  14. {
  15. $this->_table = 'inventory_batch';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  19. "originId",
  20. "originNo",
  21. "warehouseId", //int(10) NOT NULL COMMENT '仓库id',
  22. "materielId", //int(10) NOT NULL COMMENT '物料ID',
  23. "materielIdCode", //varchar(255) DEFAULT NULL COMMENT '物料编码',
  24. "sourceNo", // 来源单号
  25. "skuId", //单位id
  26. 'batchNo', // 批次编号
  27. 'num', // 批次可用数量
  28. "averageCost", //成本均价
  29. 'batchCost',//批次成本
  30. 'productionData',//生产日期
  31. 'batchStatus',
  32. "updateTime", //int(10) DEFAULT NULL COMMENT '修改时间',
  33. "createTime", //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. }