// Path: jbase-spring/src/main/java/com/jayqqaa12/jbase/spring/serialize/json/JacksonToStringSerializer.java
// public class JacksonToStringSerializer extends JsonSerializer<Object> {
// 
//     @Override
//     public void serialize(Object value, JsonGenerator jgen, SerializerProvider provider) throws IOException {
//         jgen.writeString(value.toString());
//     }
// }


import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.ToStringSerializer;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.jayqqaa12.jbase.spring.serialize.json.JacksonToStringSerializer;
import lombok.Data;
import lombok.ToString;
import org.springframework.data.annotation.Id;
import java.io.Serializable;
package com.jayqqaa12.jbase.spring.db;



/**
 * 数据库表的基本类
 * Created by 12 on 2018/1/23.
 */
@Data
@ToString(callSuper = true)
public abstract class BaseModel implements Serializable {

    @JSONField(serializeUsing = ToStringSerializer.class)
    @Id
// Path: jbase-spring/src/main/java/com/jayqqaa12/jbase/spring/serialize/json/JacksonToStringSerializer.java
// public class JacksonToStringSerializer extends JsonSerializer<Object> {
// 
//     @Override
//     public void serialize(Object value, JsonGenerator jgen, SerializerProvider provider) throws IOException {
//         jgen.writeString(value.toString());
//     }
// }


// Path: jbase-spring/src/main/java/com/jayqqaa12/jbase/spring/db/BaseModel.java
import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.ToStringSerializer;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.jayqqaa12.jbase.spring.serialize.json.JacksonToStringSerializer;
import lombok.Data;
import lombok.ToString;
import org.springframework.data.annotation.Id;
import java.io.Serializable;

package com.jayqqaa12.jbase.spring.db;



/**
 * 数据库表的基本类
 * Created by 12 on 2018/1/23.
 */
@Data
@ToString(callSuper = true)
public abstract class BaseModel implements Serializable {

    @JSONField(serializeUsing = ToStringSerializer.class)
    @Id
    @JsonSerialize(using = JacksonToStringSerializer.class)