DInventoryIn.Class.php 2.6 KB

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