package com.microservices.pms.product.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.microservices.common.core.utils.bean.BeanUtils;
import com.microservices.pms.product.domain.PmsProductModule;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * 产品需求对象 pms_product_requirement
 *
 * @author otto
 * @date 2023-10-10
 */
@Data
@ApiModel("需求规格数据对象")
public class ProductReqSpecsDataVo {
    private Long id;

    @ApiModelProperty(value = "需求标识")
    private String identifier;

    @ApiModelProperty(value = "标题")
    private String title;

    @ApiModelProperty(value = "需求状态")
    private ReqStatusCommonVo status;

    @ApiModelProperty(value = "产品需求类型")
    private String type;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @ApiModelProperty(value = "关联产品模块")
    private PmsProductModule pmsProductModule;

    public ProductReqSpecsDetailVo toProductReqSpecsDetailVo() {
        ProductReqSpecsDetailVo target = new ProductReqSpecsDetailVo();
        BeanUtils.copyProperties(this, target);
        return target;
    }
}
