package me.zhengjie.modules.weixin.cp.bean.smartsheet.record; import com.google.gson.annotations.SerializedName; import lombok.Data; import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder; import java.io.Serializable; @Data public class RecordOption implements Serializable { private static final long serialVersionUID = -2714323896879795602L; /** * 选项ID,当选项存在时,通过ID识别选项,当需要新增选项,则不填写此字段 */ @SerializedName("id") private String id; /** * 选项颜色。新增选项时填写:1-浅红1;2-浅橙1;3-浅天蓝1;4-浅绿1;5-浅紫1;6-浅粉红1;7-浅灰1;8-白;9-灰; * 10-浅蓝1;11-浅蓝2;12-蓝;13-浅天蓝2;14-天蓝;15-浅绿2;16-绿;17-浅红2;18-红; * 19-浅橙2;20-橙;21-浅黄1;22-浅黄2;23-黄;24-浅紫2;25-紫;26-浅粉红2;27-粉红; */ @SerializedName("style") private Integer style; /** * 要填写的选项内容。新增选项时填写,已经存在时优先匹配已经存在的选项,否则会新增选项 */ @SerializedName("text") private String text; public static RecordOption fromJson(String json) { return WxCpGsonBuilder.create().fromJson(json, RecordOption.class); } public String toJson() { return WxCpGsonBuilder.create().toJson(this); } }