DPurchaseOutGoods.Class.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * 采购退货商品明细Dao
  4. * Created by PhpStorm.
  5. * User: XiaoMing
  6. * Date: 2019/11/11
  7. * Time: 17:53
  8. */
  9. namespace JinDouYun\Dao\Purchase;
  10. use JinDouYun\Dao\BaseDao;
  11. class DPurchaseOutGoods extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'stock')
  14. {
  15. $this->_table = 'purchase_out_goods';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id", //int(10) NOT NULL AUTO_INCREMENT,
  19. "purchaseOutId", //int(10) NOT NULL DEFAULT '0' COMMENT '采购退货单id',
  20. "goodsId", //int(10) NOT NULL DEFAULT '0' COMMENT '商品id',
  21. "goodsCode", //varchar(50) NOT NULL DEFAULT '' COMMENT '商品编码',
  22. "goodsName", //varchar(50) NOT NULL DEFAULT '' COMMENT '商品名称',
  23. "unitName", //json DEFAULT NULL COMMENT '单位',
  24. "skuName", //json DEFAULT NULL COMMENT '单位',
  25. "skuId",//int(10) NOT NULL DEFAULT '0' COMMENT 'skuId',
  26. "buyerNum", //int(10) NOT NULL DEFAULT '0' COMMENT '采购数量',
  27. "otherNum",// decimal(20,8) DEFAULT '0.00000000' COMMENT '其他单位数量',
  28. "buyerUnitPrice", //decimal(12,4) default '0.0000' COMMENT '采购单价',
  29. "subtotalPrice", // decimal(12,4) default '0.0000' COMMENT '小计金额(数量*单价)',
  30. "couponAmount", //decimal(12,4) default '0.0000' COMMENT '优惠金额',
  31. "otherAmount", //decimal(12,4) default '0.0000' COMMENT '其他金额',
  32. "deleteStatus", //tinyint(3) NOT NULL DEFAULT '5' COMMENT '是否删除 默认5 正常 4删除',
  33. "extends", //json DEFAULT NULL COMMENT '拓展字段',
  34. "createTime", //int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
  35. "updateTime", //int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
  36. ];
  37. $this->_readonly = ['id'];
  38. $this->_create_autofill = [
  39. 'createTime' => time()
  40. ];
  41. $this->_update_autofill = [
  42. 'updateTime' => time()
  43. ];
  44. parent::__construct($serviceDB);
  45. }
  46. }