DStorageLocation.Class.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: kang
  5. * Date: 2021/6/9
  6. * Time: 17:28
  7. */
  8. namespace JinDouYun\Dao\Stock;
  9. use JinDouYun\Dao\BaseDao;
  10. class DStorageLocation extends BaseDao
  11. {
  12. public function __construct($serviceDB = 'stock')
  13. {
  14. $this->_table = 'storage_Location';
  15. $this->_primary = 'id';
  16. $this->_fields = [
  17. 'id',//int(10) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  18. 'enterpriseId',//int(10) NOT NULL COMMENT '企业id',
  19. 'areaId',//int(10) NOT NULL COMMENT '库区id',
  20. 'name',//varchar(255) NOT NULL DEFAULT '' COMMENT '库位名称',
  21. 'code',//varchar(255) NOT NULL DEFAULT '' COMMENT '库位编码',
  22. 'createTime',//int(10) DEFAULT NULL COMMENT '创建时间',
  23. 'updateTime',//int(10) DEFAULT NULL COMMENT '修改时间',
  24. 'extend',//json DEFAULT NULL COMMENT '扩展字段',
  25. 'deleteStatus',//tinyint(255) NOT NULL DEFAULT '5' COMMENT '删除状态',
  26. 'enableStatus',//tinyint(255) NOT NULL DEFAULT '5' COMMENT '启用状态 5启用 4未启用',
  27. ];
  28. $this->_readonly = ['id'];
  29. $this->_create_autofill = [
  30. 'createTime' => time()
  31. ];
  32. $this->_update_autofill = [
  33. 'updateTime' => time()
  34. ];
  35. parent::__construct($serviceDB);
  36. }
  37. }