package com.mmc.pms.entity;

import com.mmc.pms.model.vo.GoodsGroupVO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @Author small @Date 2023/5/16 13:34 @Version 1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class GoodsTypeDO implements Serializable {
  private Integer id;
  private Integer pid;
  private Integer sortTypeId;
  private String typeName;
  private String description;
  private Integer sort;
  private String icon;
  private String remark;
  private Integer deleted;
  private Date updateTime;
  private Date createTime;

  /** 辅助字段-start */
  private GoodsTypeDO slaveType;

  /** 辅助字段-end */
  public GoodsTypeDO(GoodsGroupVO goodsGroupVO) {
    this.sortTypeId = goodsGroupVO.getSortTypeId();
    this.typeName = goodsGroupVO.getGroupName();
    this.pid = goodsGroupVO.getPid();
    this.description = goodsGroupVO.getDescription();
    this.icon = goodsGroupVO.getIcon();
    this.remark = goodsGroupVO.getRemark();
  }
}
