package com.slodon.b2b2c.vo.business;

import com.slodon.b2b2c.member.pojo.MemberEnquiry;
import com.slodon.b2b2c.member.pojo.MemberEnquiryTrack;
import lombok.Data;
import org.springframework.util.StringUtils;

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

/**
 * @author cyan
 */
@Data
public class OrderEnquiryTrackVO implements Serializable {

    private static final long serialVersionUID = -8426680439937326616L;
    private Long id;

    private Long enquiryId;

    private Long vendorId;

    private String vendorName;

    private String message;

    private Date createTime;

    public OrderEnquiryTrackVO(MemberEnquiryTrack memberEnquiryTrack) {
        id = memberEnquiryTrack.getId();
        enquiryId = memberEnquiryTrack.getEnquiryId();
        vendorId = memberEnquiryTrack.getVendorId();
        message = memberEnquiryTrack.getMessage();
        createTime = memberEnquiryTrack.getCreateTime();
        vendorId = memberEnquiryTrack.getVendorId();
        vendorName = memberEnquiryTrack.getVendorName();
    }

    /**
     * @param status
     * @return
     */
    public static String getEnquiryStatusText(String status) {
        String value = "";
        if (StringUtils.isEmpty(status)) {
            return null;
        }
        switch (status) {
            case "NEW":
                value = "新建";
                break;
            case "ASSING":
                value = "分配";
                break;
            case "REPLY":
                value = "回复";
                break;
            default:
                break;
        }
        return value;
    }
}
