package me.zhengjie.modules.weixin.cp.bean.smartsheet.field; import com.google.gson.annotations.SerializedName; import lombok.Data; import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder; import java.io.Serializable; @Data public class PercentageFieldProperty implements Serializable { private static final long serialVersionUID = 244260441549136288L; /** * 表示小数点的位数,即数字精度:-1-显示原值;0-代表整数;1-精确到小数点后一位(1.0); * 2-精确到小数点后两位(1.00);3-精确到小数点后三位(1.000);4-精确到小数点后四位(1.0000); */ @SerializedName("decimal_places") private Integer decimalPlaces; /** * 是否使用千位符,设置此属性后数字字段将以英文逗号分隔千分位,如 1,000 */ @SerializedName("use_separate") private Boolean useSeparate; public static PercentageFieldProperty fromJson(String json) { return WxCpGsonBuilder.create().fromJson(json, PercentageFieldProperty.class); } public String toJson() { return WxCpGsonBuilder.create().toJson(this); } }