DInventoryIn.Class.php 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /**
  3. * 入库管理Dao
  4. * Created by PhpStorm.
  5. * Date: 2019/11/11
  6. * Time: 18:30
  7. */
  8. namespace Jobs\Dao\Stock;
  9. use Jobs\Dao\BaseDao;
  10. class DInventoryIn extends BaseDao
  11. {
  12. public function __construct($serviceDB = 'stock')
  13. {
  14. $this->_table = 'inventory_in';
  15. $this->_primary = 'id';
  16. $this->_fields = [
  17. "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '主键自增',
  18. "no", //char(25) NOT NULL COMMENT '入库单号',
  19. "sourceId", //int(10) NOT NULL COMMENT '来源id',
  20. "sourceNo", //char(25) NOT NULL COMMENT '来源单号',
  21. "originNo", //char(25) NOT NULL COMMENT '源头单号',
  22. "merchantId", // int(10) NOT NULL DEFAULT '0' COMMENT '商户id',
  23. "originId", //int(10) DEFAULT NULL COMMENT '源头id',
  24. "materielNum", //int(10) DEFAULT NULL COMMENT '入库商品数量',
  25. "amount", //decimal(15,4) DEFAULT NULL COMMENT '入库总金额',
  26. "costAllocationType", //tinyint(1) DEFAULT NULL COMMENT '成本分摊类型',
  27. "costAllocation", //decimal(15,4) DEFAULT '0.0000' COMMENT '成本分摊费用',
  28. "shopId", //int(10) DEFAULT '0' COMMENT '商铺id',
  29. "warehouseId", //int(10) DEFAULT NULL COMMENT '仓库id',
  30. "warehouseName", //varchar(255) DEFAULT NULL COMMENT '仓库名称',
  31. "operatorId", //int(10) DEFAULT NULL COMMENT '操作人id',
  32. "operatorName", //varchar(255) DEFAULT NULL COMMENT '操作人姓名',
  33. "auditId", //int(10) DEFAULT NULL COMMENT '审核人id',
  34. "auditName", //varchar(20) DEFAULT NULL COMMENT '审核人姓名',
  35. "remark", //varchar(255) DEFAULT NULL COMMENT '备注',
  36. "deleteStatus", //tinyint(3) DEFAULT NULL COMMENT '删除状态 5:正常 4:删除',
  37. "source", //tinyint(3) DEFAULT NULL COMMENT '订单来源(入库类型)',
  38. "type", //tinyint(3) DEFAULT NULL COMMENT '单据类型',
  39. "auditStatus", //tinyint(3) DEFAULT NULL COMMENT '审核状态 1:未审核 2:已审核',
  40. "auditTime", //int(10) DEFAULT NULL COMMENT '审核日期',
  41. "createTime", //int(10) DEFAULT NULL COMMENT '创建时间/制单时间',
  42. "updateTime", //int(10) DEFAULT NULL COMMENT '修改时间',
  43. "extend", //json DEFAULT NULL COMMENT '拓展字段',
  44. ];
  45. $this->_readonly = ['id'];
  46. $this->_create_autofill = [
  47. 'createTime' => time()
  48. ];
  49. $this->_update_autofill = [
  50. 'updateTime' => time()
  51. ];
  52. parent::__construct($serviceDB);
  53. }
  54. }