package com.mmc.pms.entity;

import com.mmc.pms.model.dto.WarePropDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

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

/**
 * @Author small @Date 2023/5/16 10:01 @Version 1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class WarePropDO implements Serializable {
  private static final long serialVersionUID = -8305801318237157082L;
  private Integer id;
  private Integer wareInfoId;
  private Integer propInfoId;
  private String propPoster;
  private Date createTime;

  public WarePropDTO buildWarePropDTO() {
    return WarePropDTO.builder()
        .id(this.id)
        .wareInfoId(this.wareInfoId)
        .propInfoId(this.propInfoId)
        .propPoster(this.propPoster)
        .createTime(this.createTime)
        .build();
  }
}
