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.BusinessOpportunitiesClue;
import lombok.Data;

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

@Data
public class BusinessOpportunitiesClueBo implements Serializable {
    private String clueId;
    private String attentionId;
    private String contact;
    private String telephone;
    private Integer followUpCount;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime createTime;

    public BusinessOpportunitiesClueBo() {
    }

    public BusinessOpportunitiesClueBo(BusinessOpportunitiesClue clue) {
        this.clueId = clue.getClueId();
        this.attentionId = clue.getAttentionId();
        this.contact = clue.getContact();
        this.telephone = clue.getTelephone();
        this.followUpCount = clue.getFollowUpCount();
        this.createTime = clue.getCreateTime();
    }
}
