DInventoryOut.Class.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. /**
  3. * 出库管理Dao
  4. * Created by PhpStorm.
  5. * Date: 2019/11/11
  6. * Time: 14:00
  7. */
  8. namespace Jobs\Dao\Stock;
  9. use Jobs\Dao\BaseDao;
  10. class DInventoryOut extends BaseDao
  11. {
  12. public function __construct($serviceDB = 'stock')
  13. {
  14. $this->_table = 'inventory_out';
  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. "originId", //int(10) NOT NULL COMMENT '源头id',
  23. "materielNum", //int(10) DEFAULT NULL COMMENT '出库商品数量',
  24. "amount", //decimal(15,4) DEFAULT NULL COMMENT '出库总金额',
  25. "shopId", //int(10) NOT NULL COMMENT '商铺ID',
  26. "shopName", //varchar(50) NOT NULL COMMENT '商铺名称',
  27. "operatorId", //int(10) DEFAULT NULL COMMENT '操作人id',
  28. "operatorName", //varchar(255) DEFAULT NULL COMMENT '操作人姓名',
  29. "auditId", //int(10) DEFAULT NULL COMMENT '审核人id',
  30. "auditName", //varchar(30) DEFAULT NULL COMMENT '审核人姓名',
  31. "customerId", //int(10) DEFAULT NULL COMMENT '客户id',
  32. "customerName", //varchar(20) DEFAULT NULL COMMENT '客户姓名',
  33. "customerCode", //varchar(255) DEFAULT NULL COMMENT '客户编码',
  34. "customerMobile", //char(11) DEFAULT NULL COMMENT '客户电话',
  35. "remark", //varchar(255) DEFAULT NULL COMMENT '备注',
  36. "source", //tinyint(3) DEFAULT NULL COMMENT '订单来源(出库类型)',
  37. "deliveryType", //tinyint(3) DEFAULT NULL COMMENT '配送方式',
  38. "type", //tinyint(3) DEFAULT NULL COMMENT '单据类型',
  39. "deleteStatus", //tinyint(3) DEFAULT NULL COMMENT '删除状态 5:正常 4:删除',
  40. "outStatus", //tinyint(1) DEFAULT NULL COMMENT '出库状态 1:待出库 2:全部出库 3:部分出库',
  41. "auditStatus", //tinyint(3) DEFAULT NULL COMMENT '审核状态1 :未审核 2:已审核',
  42. "auditTime", //int(10) DEFAULT NULL COMMENT '审核日期',
  43. "createTime", //int(10) DEFAULT NULL COMMENT '创建时间/制单时间',
  44. "updateTime", //int(10) DEFAULT NULL COMMENT '修改时间',
  45. "extend", //json DEFAULT NULL COMMENT '拓展字段',
  46. "serialNum", //varchar(20) DEFAULT '0' COMMENT '序号',
  47. ];
  48. $this->_readonly = ['id'];
  49. $this->_create_autofill = [
  50. 'createTime' => time()
  51. ];
  52. $this->_update_autofill = [
  53. 'updateTime' => time()
  54. ];
  55. parent::__construct($serviceDB);
  56. }
  57. }