DReportLossDetails.Class.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. /**
  3. * 报损库存详情Dao
  4. * Created by PhpStorm.
  5. * User: haoren
  6. * Date: 2021/03/09
  7. * Time: 11:40
  8. */
  9. namespace JinDouYun\Dao\Stock;
  10. use JinDouYun\Dao\BaseDao;
  11. class DReportLossDetails extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'stock')
  14. {
  15. $this->_table = 'report_loss_details';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '主键自增id',
  19. "linkId", //int(10) NOT NULL COMMENT '连接id',
  20. "linkNo", //char(25) NOT NULL COMMENT '连接单号',
  21. "materielId", //int(10) NOT NULL COMMENT '物料id',
  22. "materielCode", //char(21) NOT NULL COMMENT '物料code',
  23. "materielName", //varchar(50) NOT NULL COMMENT '物料名称',
  24. "skuId", //int(10) NOT NULL COMMENT '单位id',
  25. "unitName", //varchar(255) DEFAULT NULL COMMENT '单位名称',
  26. "skuName", //varchar(255) DEFAULT NULL COMMENT '属性名称',
  27. "inventoryNum", //decimal(20,8) NOT NULL COMMENT '账面库存',
  28. "num", //decimal(20,8) NOT NULL COMMENT '损失库存',
  29. "otherNum",// decimal(20,8) DEFAULT '0.00000000' COMMENT '其他单位数量',
  30. "lastNum", //decimal(20,8) NOT NULL COMMENT '剩余库存',
  31. "lossAmount", //decimal(20,4) DEFAULT NULL COMMENT '损失金额',
  32. "remark", //varchar(255) DEFAULT NULL COMMENT '备注',
  33. "deleteStatus", //tinyint(3) DEFAULT '5' COMMENT '删除状态 5:正常 4:删除',
  34. "createTime", //int(10) NOT NULL COMMENT '创建时间',
  35. "updateTime", //int(10) NOT NULL COMMENT '修改时间',
  36. "extend", //json DEFAULT NULL COMMENT '扩展字段',
  37. 'areaId',
  38. 'areaName',
  39. 'areaCode',
  40. 'storageLocationId',
  41. 'storageLocationName',
  42. 'storageLocationCode',
  43. ];
  44. $this->_readonly = ['id'];
  45. $this->_create_autofill = [
  46. 'createTime' => time()
  47. ];
  48. $this->_update_autofill = [
  49. 'updateTime' => time()
  50. ];
  51. parent::__construct($serviceDB);
  52. }
  53. }