:new:【企业微信】增加获取企业假期管理配置的接口

This commit is contained in:
Wong
2022-04-10 13:27:54 +00:00
committed by binarywang
parent 07c3545105
commit 7992ee0d3d
7 changed files with 118 additions and 10 deletions

View File

@@ -0,0 +1,74 @@
package me.chanjar.weixin.cp.bean.oa;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import me.chanjar.weixin.cp.bean.WxCpBaseResp;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
import java.util.List;
/**
* 企业假期管理配置信息.
*
* @author Wang_Wong
*/
@Data
public class WxCpCorpConfInfo extends WxCpBaseResp implements Serializable {
private static final long serialVersionUID = 7387181805254287157L;
@SerializedName("lists")
private List<CorpConf> lists;
@Getter
@Setter
public static class CorpConf implements Serializable {
private static final long serialVersionUID = -5696099236344075582L;
@SerializedName("id")
private Integer id;
@SerializedName("name")
private String name;
@SerializedName("time_attr")
private Integer timeAttr;
@SerializedName("duration_type")
private Integer durationType;
@SerializedName("quota_attr")
private QuotaAttr quotaAttr;
@SerializedName("perday_duration")
private Integer perdayDuration;
}
@Getter
@Setter
public static class QuotaAttr implements Serializable {
private static final long serialVersionUID = -5696099236344075582L;
@SerializedName("type")
private Integer type;
@SerializedName("autoreset_time")
private Integer autoresetTime;
@SerializedName("autoreset_duration")
private Integer autoresetDuration;
}
public static WxCpCorpConfInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpCorpConfInfo.class);
}
public String toJson() {
return WxCpGsonBuilder.create().toJson(this);
}
}