package cn.qinys.platform.mobile.resp;

import com.alibaba.fastjson2.JSON;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

@Data
public class WishDetailResp implements Serializable {

    private Integer id;

    private Integer treeId;

    private String treeName;

    private String userId;

    private String content;

    private String images;

    private String address;

    private Boolean isPublic;

    private String tags;

    private Integer likes;

    private Integer status;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;

    public List<String> getImages() {
        return JSON.parseArray(images, String.class);
    }

    public List<String> getTags() {
        return JSON.parseArray(tags, String.class);
    }
}
