DInventoryDetails.Class.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. /**
  3. * 库存流水管理Dao
  4. * Created by PhpStorm.
  5. * User: 小威
  6. * Date: 2019/11/12
  7. * Time: 10:00
  8. */
  9. namespace Jobs\Dao\Stock;
  10. use Jobs\Dao\BaseDao;
  11. class DInventoryDetails extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'stock')
  14. {
  15. $this->_table = 'inventory_details';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  19. "warehouseId", //int(10) NOT NULL COMMENT '仓库id',
  20. "originId", //int(10) NOT NULL COMMENT '业务来源id',
  21. "originNo", //char(22) NOT NULL COMMENT '业务来源no',
  22. "materielId", //int(10) NOT NULL COMMENT '物料id',
  23. "materielCode", //varchar(255) NOT NULL COMMENT '物料编码',
  24. "materielName", //varchar(255) NOT NULL COMMENT '物料名称',
  25. "sourceNo", //char(20) NOT NULL COMMENT '来源单号',
  26. "source", //tinyint(3) NOT NULL COMMENT '单据来源标识',
  27. "operatorId", //int(10) NOT NULL COMMENT '操作人id',
  28. "operatorName", //varchar(50) NOT NULL COMMENT '操作人姓名',
  29. "skuId", //int(10) NOT NULL COMMENT '单位id',
  30. "inventoryNum", //decimal(20,8) NOT NULL COMMENT '库存数',
  31. "inventoryChangeNum", //decimal(20,8) NOT NULL COMMENT '变动后库存数量',
  32. "batch", //json NOT NULL COMMENT '批次信息',
  33. "costType", //tinyint(3) NOT NULL DEFAULT '1' COMMENT '计算成本方式 1:移动加权 2:个别计价',
  34. "averageCost", //decimal(15,4) NOT NULL COMMENT '均价成本',
  35. "actionType", //tinyint(3) NOT NULL COMMENT '出入库操作标识 5:入库 4:出库',
  36. "createTime", //int(10) NOT NULL COMMENT '创建时间',
  37. "updateTime", //int(10) NOT NULL COMMENT '更新时间',
  38. "extend", //json DEFAULT NULL COMMENT '扩展字段',
  39. ];
  40. $this->_readonly = ['id'];
  41. $this->_create_autofill = [
  42. 'createTime' => time()
  43. ];
  44. $this->_update_autofill = [
  45. 'updateTime' => time()
  46. ];
  47. parent::__construct($serviceDB);
  48. }
  49. }