package com.yunfeiyun.agmp.fms.domain;

import com.yunfeiyun.agmp.common.annotation.Excel;
import com.yunfeiyun.agmp.common.core.domain.BaseEntity;
import com.yunfeiyun.agmp.common.utils.DictUtils;
import com.yunfeiyun.agmp.common.utils.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;

/**
 * 作物对象 FmsCrop
 * 
 * @author 杨晓辉
 * @date 2023-05-16
 */
public class FmsCrop extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 作物标识 */
    private String cropId;

    /** 作物名称 */
    @NotBlank(message = "作物名称不能为空")
    @Excel(name = "作物名称")
    private String cropName;

    /** 作物种类 */
    @Excel(name = "作物种类")
    private String cropType;

    /** 作物主要类型 */
    @NotBlank(message = "作物类型不能为空")
    @Excel(name = "作物主要类型")
    private String cropMaintype;

    /** 作物推荐状态 */
    @Excel(name = "作物推荐状态")
    private String cropRcmdstatus;

    /** 作物预览图 */
    @Excel(name = "作物预览图")
    private String cropPreview;

    /** 作物备注 */
    @Excel(name = "作物备注")
    private String cropRemark;

    @Excel(name = "地块预览图标识")
    private String resIds;

    /** 作物主要类型 */
    @Excel(name = "作物主要类型")
    private String cropMaintypeContent;

    /** 创建人 */
    @Excel(name = "创建人")
    private String cropCreator;

    /** 创建时间 */
    @Excel(name = "创建时间")
    private String cropCreateddate;

    public String getCropMaintypeContent() {
        if (!StringUtils.isEmpty(this.cropMaintype)) {
            return DictUtils.getDictLabel("fms_crop_type", this.cropMaintype);
        } else {
            return "";
        }
    }

    public String getCropCreator() {
        return cropCreator;
    }

    public void setCropCreator(String cropCreator) {
        this.cropCreator = cropCreator;
    }

    public String getCropCreateddate() {
        return cropCreateddate;
    }

    public void setCropCreateddate(String cropCreateddate) {
        this.cropCreateddate = cropCreateddate;
    }

    public String getResIds() {
        return resIds;
    }

    public void setResIds(String resIds) {
        this.resIds = resIds;
    }

    public void setCropId(String cropId)
    {
        this.cropId = cropId;
    }

    public String getCropId()
    {
        return cropId;
    }
    public void setCropName(String cropName)
    {
        this.cropName = cropName;
    }

    public String getCropName()
    {
        return cropName;
    }
    public void setCropType(String cropType)
    {
        this.cropType = cropType;
    }

    public String getCropType()
    {
        return cropType;
    }
    public void setCropMaintype(String cropMaintype)
    {
        this.cropMaintype = cropMaintype;
    }

    public String getCropMaintype()
    {
        return cropMaintype;
    }
    public void setCropRcmdstatus(String cropRcmdstatus)
    {
        this.cropRcmdstatus = cropRcmdstatus;
    }

    public String getCropRcmdstatus()
    {
        return cropRcmdstatus;
    }
    public void setCropPreview(String cropPreview)
    {
        this.cropPreview = cropPreview;
    }

    public String getCropPreview()
    {
        return cropPreview;
    }
    public void setCropRemark(String cropRemark)
    {
        this.cropRemark = cropRemark;
    }

    public String getCropRemark()
    {
        return cropRemark;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("cropId", getCropId())
            .append("cropName", getCropName())
            .append("cropType", getCropType())
            .append("cropMaintype", getCropMaintype())
            .append("cropRcmdstatus", getCropRcmdstatus())
            .append("cropPreview", getCropPreview())
            .append("cropRemark", getCropRemark())
            .append("resIds", getResIds())
            .toString();
    }
}
