package com.wmyun.farmwork.word.core.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.wmyun.farmwork.word.core.enums.BookmarkType;
import com.wmyun.farmwork.word.core.model.ext.ListExData;
import com.wmyun.farmwork.word.core.model.ext.PictureExData;
import com.wmyun.farmwork.word.core.model.ext.TableExData;
import com.wmyun.farmwork.word.core.model.ext.TextExData;
import lombok.Data;

/**
 * @Description: 扩展数据
 * @Date: 2025/3/3 10:58
 * @Created: by ZZSLL
 */

@Data
@JsonTypeInfo(
        use = JsonTypeInfo.Id.NAME,
        property = "type",
        visible = true
)
@JsonSubTypes({
        @JsonSubTypes.Type(value = TextExData.class, name = "TEXT"),
        @JsonSubTypes.Type(value = PictureExData.class, name = "PICTURE"),
        @JsonSubTypes.Type(value = PictureExData.class, name = "PICTURE_DESC"),
        @JsonSubTypes.Type(value = ListExData.class, name = "LIST"),
        @JsonSubTypes.Type(value = TableExData.class, name = "TABLE")
})
public class AbstractExData {

    @JsonProperty("type")
    private BookmarkType type;
}
