DInventoryOut.Class.php 2.8 KB

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