|
| 1 | +package me.chanjar.weixin.cp.bean.school.user; |
| 2 | + |
| 3 | +import com.google.gson.annotations.SerializedName; |
| 4 | +import lombok.Data; |
| 5 | +import lombok.Getter; |
| 6 | +import lombok.Setter; |
| 7 | +import me.chanjar.weixin.cp.bean.WxCpBaseResp; |
| 8 | +import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder; |
| 9 | + |
| 10 | +import java.io.Serializable; |
| 11 | +import java.util.List; |
| 12 | + |
| 13 | +/** |
| 14 | + * 获取部门列表返回结果. |
| 15 | + * |
| 16 | + * @author Wang_Wong |
| 17 | + */ |
| 18 | +@Data |
| 19 | +public class WxCpDepartmentList extends WxCpBaseResp implements Serializable { |
| 20 | + private static final long serialVersionUID = -5028321625140879571L; |
| 21 | + |
| 22 | + @SerializedName("departments") |
| 23 | + private List<Department> departments; |
| 24 | + |
| 25 | + @Setter |
| 26 | + @Getter |
| 27 | + public static class Department implements Serializable{ |
| 28 | + @SerializedName("parentid") |
| 29 | + private Integer parentId; |
| 30 | + |
| 31 | + @SerializedName("name") |
| 32 | + private String name; |
| 33 | + |
| 34 | + @SerializedName("id") |
| 35 | + private Integer id; |
| 36 | + |
| 37 | + @SerializedName("type") |
| 38 | + private Integer type; |
| 39 | + |
| 40 | + @SerializedName("register_year") |
| 41 | + private Integer registerYear; |
| 42 | + |
| 43 | + @SerializedName("standard_grade") |
| 44 | + private Integer standardGrade; |
| 45 | + |
| 46 | + @SerializedName("order") |
| 47 | + private Integer order; |
| 48 | + |
| 49 | + @SerializedName("is_graduated") |
| 50 | + private Integer isGraduated; |
| 51 | + |
| 52 | + @SerializedName("open_group_chat") |
| 53 | + private Integer openGroupChat; |
| 54 | + |
| 55 | + @SerializedName("group_chat_id") |
| 56 | + private String groupChatId; |
| 57 | + |
| 58 | + @SerializedName("department_admins") |
| 59 | + private List<DepartmentAdmin> departmentAdmins; |
| 60 | + |
| 61 | + public static Department fromJson(String json) { |
| 62 | + return WxCpGsonBuilder.create().fromJson(json, Department.class); |
| 63 | + } |
| 64 | + |
| 65 | + public String toJson() { |
| 66 | + return WxCpGsonBuilder.create().toJson(this); |
| 67 | + } |
| 68 | + |
| 69 | + } |
| 70 | + |
| 71 | + @Setter |
| 72 | + @Getter |
| 73 | + public static class DepartmentAdmin implements Serializable { |
| 74 | + |
| 75 | + @SerializedName("userid") |
| 76 | + private String userId; |
| 77 | + |
| 78 | + @SerializedName("type") |
| 79 | + private Integer type; |
| 80 | + |
| 81 | + @SerializedName("subject") |
| 82 | + private String subject; |
| 83 | + |
| 84 | + public static DepartmentAdmin fromJson(String json) { |
| 85 | + return WxCpGsonBuilder.create().fromJson(json, DepartmentAdmin.class); |
| 86 | + } |
| 87 | + |
| 88 | + public String toJson() { |
| 89 | + return WxCpGsonBuilder.create().toJson(this); |
| 90 | + } |
| 91 | + |
| 92 | + } |
| 93 | + |
| 94 | + public static WxCpDepartmentList fromJson(String json) { |
| 95 | + return WxCpGsonBuilder.create().fromJson(json, WxCpDepartmentList.class); |
| 96 | + } |
| 97 | + |
| 98 | + public String toJson() { |
| 99 | + return WxCpGsonBuilder.create().toJson(this); |
| 100 | + } |
| 101 | + |
| 102 | +} |
0 commit comments