DStocktakingDetails.Class.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /**
  3. * 盘点库存详情Dao
  4. * Created by PhpStorm.
  5. * User: 小威
  6. * Date: 2019/12/04
  7. * Time: 11:40
  8. */
  9. namespace JinDouYun\Dao\Stock;
  10. use JinDouYun\Dao\BaseDao;
  11. class DStocktakingDetails extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'stock')
  14. {
  15. $this->_table = 'stocktaking_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(21) 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. "documentInventoryNum", //decimal(20,8) NOT NULL COMMENT '账面库存',
  26. "currentInventoryNum", //decimal(20,8) NOT NULL COMMENT '实盘库存',
  27. "differenceNum", //decimal(20,8) NOT NULL COMMENT '盈亏数量',
  28. "otherNum",// decimal(20,8) DEFAULT '0.00000000' COMMENT '其他单位',
  29. "differenceStatus", //tinyint(3) NOT NULL COMMENT '盈亏状态 5:盈 4:亏',
  30. "deleteStatus",
  31. "remark",
  32. "createTime", //int(10) NOT NULL COMMENT '创建时间',
  33. "updateTime", //int(10) NOT NULL COMMENT '修改时间',
  34. "extend", //json DEFAULT NULL COMMENT '扩展字段',
  35. 'areaId',
  36. 'areaName',
  37. 'areaCode',
  38. 'storageLocationId',
  39. 'storageLocationName',
  40. 'storageLocationCode',
  41. ];
  42. $this->_readonly = ['id'];
  43. $this->_create_autofill = [
  44. 'createTime' => time()
  45. ];
  46. $this->_update_autofill = [
  47. 'updateTime' => time()
  48. ];
  49. parent::__construct($serviceDB);
  50. }
  51. }