package com.fs.store.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fs.common.annotation.Excel;
import com.fs.common.core.domain.BaseEntity;
import com.vdurmont.emoji.EmojiParser;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 售后订单操作对象 fs_store_after_sales_status
 * 
 * @author fs
 * @date 2022-03-15
 */
public class FsStoreAfterSalesStatus extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 售后id */
    @Excel(name = "售后id")
    private Long storeAfterSalesId;

    /** 操作类型 */
    @Excel(name = "操作类型")
    private Integer changeType;

    /** 操作备注 */
    @Excel(name = "操作备注")
    private String changeMessage;

    /** 操作时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date changeTime;

    /** 操作人 */
    @Excel(name = "操作人")
    private String operator;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setStoreAfterSalesId(Long storeAfterSalesId) 
    {
        this.storeAfterSalesId = storeAfterSalesId;
    }

    public Long getStoreAfterSalesId() 
    {
        return storeAfterSalesId;
    }
    public void setChangeType(Integer changeType) 
    {
        this.changeType = changeType;
    }

    public Integer getChangeType() 
    {
        return changeType;
    }
    public void setChangeMessage(String changeMessage) 
    {
        this.changeMessage = changeMessage;
    }

    public String getChangeMessage() 
    {
        return changeMessage;
    }
    public void setChangeTime(Date changeTime) 
    {
        this.changeTime = changeTime;
    }

    public Date getChangeTime() 
    {
        return changeTime;
    }
    public void setOperator(String operator) 
    {
        if(StringUtils.isNotEmpty(operator)){
            this.operator= EmojiParser.parseToHtmlDecimal(operator);
        }
        else{
            this.operator= operator;
        }
    }

    public String getOperator() 
    {
        if(StringUtils.isNotEmpty(operator)){
            return EmojiParser.parseToUnicode(operator);
        }
        else{
            return operator;
        }
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("storeAfterSalesId", getStoreAfterSalesId())
            .append("changeType", getChangeType())
            .append("changeMessage", getChangeMessage())
            .append("changeTime", getChangeTime())
            .append("operator", getOperator())
            .toString();
    }
}
