DInventoryArea.Class.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: Gss
  5. * Date: 2021/6/10 0010
  6. * Time: 16:48
  7. */
  8. namespace JinDouYun\Dao\Stock;
  9. use JinDouYun\Dao\BaseDao;
  10. class DInventoryArea extends BaseDao
  11. {
  12. public function __construct($serviceDB = 'stock')
  13. {
  14. $this->_table = 'inventory_area';
  15. $this->_primary = 'id';
  16. $this->_fields = [
  17. 'id',//int(10) NOT NULL COMMENT '自增id',
  18. 'warehouseId',//int(10) NOT NULL DEFAULT '0' COMMENT '仓库id',
  19. 'merchantId',// int(10) DEFAULT '0' COMMENT '商户id',
  20. 'areaId',//int(10) NOT NULL DEFAULT '0' COMMENT '库区id',
  21. 'areaName',//varchar(255) NOT NULL COMMENT '库区名称',
  22. 'areaCode',//varchar(255) DEFAULT NULL COMMENT '库区编码',
  23. 'storageLocationId',//int(10) NOT NULL COMMENT '库位id',
  24. 'storageLocationName',//varchar(255) DEFAULT NULL COMMENT '库位名称',
  25. 'storageLocationCode',//varchar(255) DEFAULT NULL COMMENT '库位编码',
  26. 'skuId',//int(10) DEFAULT '0',
  27. 'unitName',//varchar(255) DEFAULT NULL COMMENT '单位名称',
  28. 'skuName',//varchar(255) DEFAULT NULL COMMENT '属性名称',
  29. 'num',//decimal(10,2) DEFAULT '0.00' COMMENT '数量',
  30. 'updateTime',//int(11) DEFAULT NULL COMMENT '更新时间',
  31. 'createTime',//int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  32. 'materielId',
  33. ];
  34. $this->_readonly = ['id'];
  35. $this->_create_autofill = [
  36. 'createTime' => time(),
  37. 'updateTime' => time()
  38. ];
  39. $this->_update_autofill = [
  40. 'updateTime' => time()
  41. ];
  42. parent::__construct($serviceDB);
  43. }
  44. }