DUnits.Class.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: XiaoMing
  5. * Date: 2020/3/17
  6. * Time: 17:03
  7. */
  8. namespace JinDouYun\Dao\GoodsManage;
  9. use JinDouYun\Dao\BaseDao;
  10. class DUnits extends BaseDao
  11. {
  12. public function __construct($serviceDB = 'default')
  13. {
  14. $this->_table = 'units';
  15. $this->_primary = 'id';
  16. $this->_fields = [
  17. "id",//int(10) NOT NULL AUTO_INCREMENT,
  18. "unitName",//varchar(50) NOT NULL DEFAULT '' COMMENT '单位名称',
  19. "enableStatus",//tinyint(3) NOT NULL DEFAULT '5' COMMENT '状态 默认5 启用 4禁用',
  20. "deleteStatus",//tinyint(3) NOT NULL DEFAULT '5' COMMENT '是否删除 默认5 正常 4删除',
  21. "extends",//json DEFAULT NULL COMMENT '拓展字段',
  22. "createTime",//int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
  23. "updateTime",//int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
  24. ];
  25. $this->_readonly = ['id'];
  26. $this->_create_autofill = [
  27. 'createTime' => time()
  28. ];
  29. $this->_update_autofill = [
  30. 'updateTime' => time()
  31. ];
  32. parent::__construct($serviceDB);
  33. }
  34. }