// Path: src/main/java/me/hao0/wechat/serializer/UserSourceDeserializer.java
// public class UserSourceDeserializer extends JsonDeserializer<UserSource> {
// 
//     @Override
//     public UserSource deserialize(JsonParser parser, DeserializationContext ctxt) throws IOException, JsonProcessingException {
//         return UserSource.from(parser.getIntValue());
//     }
// }


import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import me.hao0.wechat.serializer.UserSourceDeserializer;
import java.io.Serializable;
package me.hao0.wechat.model.data.user;


/**
 * 用户增量数据
 * Author: haolin
 * Email: haolin.h0@gmail.com
 * Date: 20/11/15
 */
public class UserSummary implements Serializable {

    private static final long serialVersionUID = -6612438038581745613L;

    /**
     * 日期: yyyy-MM-dd
     */
    @JsonProperty("ref_date")
    private String date;

    /**
     * 用户的渠道
     *  @see UserSource
     */
    @JsonProperty("user_source")
// Path: src/main/java/me/hao0/wechat/serializer/UserSourceDeserializer.java
// public class UserSourceDeserializer extends JsonDeserializer<UserSource> {
// 
//     @Override
//     public UserSource deserialize(JsonParser parser, DeserializationContext ctxt) throws IOException, JsonProcessingException {
//         return UserSource.from(parser.getIntValue());
//     }
// }


// Path: src/main/java/me/hao0/wechat/model/data/user/UserSummary.java
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import me.hao0.wechat.serializer.UserSourceDeserializer;
import java.io.Serializable;

package me.hao0.wechat.model.data.user;


/**
 * 用户增量数据
 * Author: haolin
 * Email: haolin.h0@gmail.com
 * Date: 20/11/15
 */
public class UserSummary implements Serializable {

    private static final long serialVersionUID = -6612438038581745613L;

    /**
     * 日期: yyyy-MM-dd
     */
    @JsonProperty("ref_date")
    private String date;

    /**
     * 用户的渠道
     *  @see UserSource
     */
    @JsonProperty("user_source")
    @JsonDeserialize(using = UserSourceDeserializer.class)