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

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

@Data
public class FollowUpRecordBo implements Serializable {
    private String recordId;
    private String way;
    private String content;
    private String person;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime followTime;

    public FollowUpRecordBo() {
    }

    public FollowUpRecordBo(FollowUpRecord record) {
        this.recordId = record.getRecordId();
        this.way = record.getFollowWay();
        this.content = record.getFollowContent();
        this.person = record.getFollowPerson();
        this.followTime = record.getFollowTime();
    }
}
