DWarehouseBeginning.Class.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /**
  3. * 仓库期初记录管理Dao
  4. * Created by PhpStorm.
  5. * User: 小威
  6. * Date: 2019/11/26
  7. * Time: 14:30
  8. */
  9. namespace JinDouYun\Dao\Stock;
  10. use JinDouYun\Dao\BaseDao;
  11. class DWarehouseBeginning extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'stock')
  14. {
  15. $this->_table = 'warehouse_beginning';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  19. 'no',
  20. "warehouseId", //int(10) NOT NULL COMMENT '仓库id',
  21. "operatorId", //int(10) DEFAULT NULL COMMENT '操作人id',
  22. "operatorName", //varchar(30) DEFAULT NULL COMMENT '操作人name',
  23. "remark", //varchar(255) DEFAULT NULL COMMENT '备注',
  24. "materielId", //int(10) DEFAULT NULL COMMENT '物料id',
  25. "materielName", //varchar(40) DEFAULT NULL COMMENT '物料名称',
  26. "materielCode",
  27. "skuId", //int(10) DEFAULT NULL COMMENT '单位id',
  28. "num", //decimal(10,8) DEFAULT NULL COMMENT '数量',
  29. "costPrice", //decimal(10,4) DEFAULT NULL COMMENT '成本价',
  30. "updateTime", //int(10) DEFAULT NULL COMMENT '更新时间',
  31. "createTime", //int(10) DEFAULT NULL COMMENT '创建时间',
  32. "extend", //json DEFAULT NULL COMMENT '扩展字段',
  33. ];
  34. $this->_readonly = ['id'];
  35. $this->_create_autofill = [
  36. 'createTime' => time()
  37. ];
  38. $this->_update_autofill = [
  39. 'updateTime' => time()
  40. ];
  41. parent::__construct($serviceDB);
  42. }
  43. }