DConsume.Class.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * 消耗品库存
  4. * Created by PhpStorm.
  5. * User: wxj
  6. * Date: 2019/10/31
  7. * Time: 15:02
  8. */
  9. namespace JinDouYun\Dao\Stock;
  10. use JinDouYun\Dao\BaseDao;
  11. class DConsume extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'default')
  14. {
  15. $this->_table = 'consume';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. 'id',// int unsigned NOT NULL AUTO_INCREMENT,
  19. 'userCenterId',// int NOT NULL COMMENT '调拨人',
  20. 'write',// int NOT NULL COMMENT '核销人',
  21. 'enterpriseId',// int NOT NULL,
  22. 'shopId',// int NOT NULL,
  23. 'warehouseId',// int NOT NULL COMMENT '仓库',
  24. 'name',// varchar(255) COLLATE utf8mb4_general_ci NOT NULL COMMENT '商品名',
  25. 'image',// varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  26. 'status',// tinyint NOT NULL COMMENT '1使用中2使用完',
  27. 'number',// int NOT NULL COMMENT '数量',
  28. 'price',// decimal(10,2) NOT NULL COMMENT '价格',
  29. 'createTime',// int NOT NULL COMMENT '出仓日期',
  30. 'writeTime',// int NOT NULL COMMENT '核销日期',
  31. ];
  32. $this->_readonly = ['id'];
  33. $this->_create_autofill = [
  34. 'createTime' => time()
  35. ];
  36. parent::__construct($serviceDB);
  37. }
  38. }