package com.ruoyi.demo.entity.bo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.ruoyi.demo.entity.AttentionPool;
import lombok.Data;

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

@Data
public class AttentionPoolBo implements Serializable {
    private String attentionId;
    private String contact;
    private String telephone;
    private String wdName;
    private String wdAddrInfo;
    private String brandName;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime attentionTime;

    public AttentionPoolBo() {
    }

    public AttentionPoolBo(AttentionPool pool) {
        this.attentionId = pool.getAttentionId();
        this.contact = pool.getContact();
        this.telephone = pool.getTelephone();
        this.wdName = pool.getWdName();
        this.wdAddrInfo = pool.getWdAddrInfo();
        this.brandName = pool.getBrandName();
        this.attentionTime = pool.getAttentionTime();
    }
}
