package com.sysu.admin.controller.aland;

import lombok.Data;

import java.awt.*;


@Data
public class LandAreaStat {
    private Integer parcelType;
    private String name;
    private Double area = 0.0;
    private String color;
    private Integer count = 0;

    public LandAreaStat(){}

    public LandAreaStat(Integer parcelType, String name, String color) {
        this.parcelType = parcelType;
        this.name = name;
        this.color = color;
    }
    /**
     * 0其它 1水田  2水浇地  3旱地  4果园
     */
    public static String[] name2s = {"其他","水田","水浇地","旱地","果园"};
    public static String[] colors = {"#696969","#228B22","#8FAFE3","#EEB554","#D365A1"};

    public static String castName(Integer id){
        if(id != null){
            return name2s[id];
        }
        return "";
    }
    public static String castColor(Integer id){
        if(id != null){
            return colors[id];
        }
        return "";
    }
}
