package com.dgtly.order.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.dgtly.common.annotation.Excel;
import com.dgtly.common.core.domain.BaseEntity;

import java.util.Date;

/**
 * 经销商启用对象 customers_start
 * 
 * @author nsy
 * @date 2021-01-18
 */
public class CustomersStart extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 经销商编号 */
    @Excel(name = "经销商编号")
    private String customersCode;

    /** 经销商名称 */
    @Excel(name = "经销商名称")
    private String customersName;

    /** 经销商名称 */
    @Excel(name = "上线日期")
    private Date onlineTime;

    /** 上线事业部 DIY/厨卫/ALL*/
    private Integer customerType;

    @Excel(name = "上线事业部")
    private String customerTypeFormat;

    public void setCustomersCode(String customersCode) 
    {
        this.customersCode = customersCode;
    }

    public String getCustomersCode() 
    {
        return customersCode;
    }
    public void setCustomersName(String customersName) 
    {
        this.customersName = customersName;
    }

    public String getCustomersName() 
    {
        return customersName;
    }

    public Date getOnlineTime() {
        return onlineTime;
    }

    public void setOnlineTime(Date onlineTime) {
        this.onlineTime = onlineTime;
    }

    public Integer getCustomerType() {
        return customerType;
    }

    public void setCustomerType(Integer customerType) {
        this.customerType = customerType;
    }

    public String getCustomerTypeFormat() {
        return customerTypeFormat;
    }

    public void setCustomerTypeFormat() {
        if (customerType != null && customerType == 1) {
            this.customerTypeFormat = "DIY";
        } else if (customerType != null && customerType == 2) {
            this.customerTypeFormat = "厨卫";
        } else if (customerType != null && customerType == 3) {
            this.customerTypeFormat = "DIY+厨卫";
        } else {
            this.customerTypeFormat = "";
        }
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("customersCode", getCustomersCode())
            .append("customersName", getCustomersName())
            .toString();
    }
}
