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 Field implements Serializable { private static final long serialVersionUID = 5351952693670880715L; /** * 字段ID */ @SerializedName("field_id") private String fieldId; /** * 字段标题 */ @SerializedName("field_title") private String fieldTitle; /** * 字段类型:FIELD_TYPE_TEXT-文本;FIELD_TYPE_NUMBER-数字;FIELD_TYPE_CHECKBOX-复选框; * FIELD_TYPE_DATE_TIME-日期;FIELD_TYPE_IMAGE-图片;FIELD_TYPE_ATTACHMENT-文件; * FIELD_TYPE_USER-成员;FIELD_TYPE_URL-超链接;FIELD_TYPE_SELECT-多选; * FIELD_TYPE_CREATED_USER-创建人;FIELD_TYPE_MODIFIED_USER-最后编辑人;FIELD_TYPE_CREATED_TIME-创建时间; * FIELD_TYPE_MODIFIED_TIME-最后编辑时间;FIELD_TYPE_PROGRESS-进度;FIELD_TYPE_PHONE_NUMBER-电话; * FIELD_TYPE_EMAIL-邮件;FIELD_TYPE_SINGLE_SELECT-单选;FIELD_TYPE_REFERENCE-关联; * FIELD_TYPE_LOCATION-地理位置;FIELD_TYPE_CURRENCY-货币;FIELD_TYPE_WWGROUP-群; * FIELD_TYPE_AUTONUMBER-自动编号;FIELD_TYPE_PERCENTAGE-百分数; */ @SerializedName("field_type") private String fieldType; /** * 文本 类型的字段属性为空 */ @SerializedName("property_text") private String propertyText; /** * 数字 类型的字段属性 */ @SerializedName("property_number") private NumberFieldProperty propertyNumber; /** * 复选框 类型的字段属性 */ @SerializedName("property_checkbox") private CheckboxFieldProperty propertyCheckbox; /** * 日期 类型的字段属性 */ @SerializedName("property_date_time") private DateTimeFieldProperty propertyDateTime; /** * 文件 类型的字段属性 */ @SerializedName("property_attachment") private AttachmentFieldProperty propertyAttachment; /** * 人员 类型的字段属性 */ @SerializedName("property_user") private UserFieldProperty propertyUser; /** * 超链接 类型的字段属性 */ @SerializedName("property_url") private UrlFieldProperty propertyUrl; /** * 多选 类型的字段属性 */ @SerializedName("property_select") private SelectFieldProperty propertySelect; /** * 创建时间 类型的字段属性 */ @SerializedName("property_created_time") private CreatedTimeFieldProperty propertyCreatedTime; /** * 最后编辑时间 类型的字段属性 */ @SerializedName("property_modified_time") private ModifiedTimeFieldProperty propertyModifiedTime; /** * 进度 类型的字段属性 */ @SerializedName("property_progress") private ProgressFieldProperty propertyProgress; /** * 单选 类型的字段属性 */ @SerializedName("property_single_select") private SingleSelectFieldProperty propertySingleSelect; /** * 引用 类型的字段属性 */ @SerializedName("property_reference") private ReferenceFieldProperty propertyReference; /** * 地理位置 类型的字段属性 */ @SerializedName("property_location") private LocationFieldProperty propertyLocation; /** * 自动编号 类型的字段属性 */ @SerializedName("property_auto_number") private AutoNumberFieldProperty propertyAutoNumber; /** * 货币 类型的字段属性 */ @SerializedName("property_currency") private CurrencyFieldProperty propertyCurrency; /** * 群 类型的字段属性 */ @SerializedName("property_ww_group") private WwGroupFieldProperty propertyWwGroup; /** * 百分数 类型的字段属性 */ @SerializedName("property_percentage") private PercentageFieldProperty propertyPercentage; public static Field fromJson(String json) { return WxCpGsonBuilder.create().fromJson(json, Field.class); } public String toJson() { return WxCpGsonBuilder.create().toJson(this); } }