package com.yida.data.device.vo.telephone;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yida.data.common.core.converter.LocalDateTimeConverter;
import com.yida.data.device.convertor.telephone.DurationConvertor;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

@ApiModel("通话记录信息")
@Data
public class RecordInfoVO {

    @ExcelIgnore
    private Long id;
    @ApiModelProperty("话机imei")
    @ExcelProperty(value = "话机IMEI", index = 0)
    private String imei;

    @ApiModelProperty("学生姓名")
    @ExcelProperty(value = "学生姓名", index = 1)
    private String studentName;

    @ApiModelProperty("学生ic卡号")
    @ExcelProperty(value = "学生IC卡号", index = 2)
    private String cardNo;

    @ApiModelProperty("被呼号码")
    @ExcelIgnore
    private String callPhone;

    @ApiModelProperty("被呼人关系 可能为空")
    @ExcelIgnore
    private String callName;

    @ApiModelProperty("通话时长")
    @ExcelProperty(value = "通话时长", converter = DurationConvertor.class)
    private Integer duration;

    @ApiModelProperty("呼叫时间")
    @ExcelProperty(value = "呼叫时间", converter = LocalDateTimeConverter.class, index = 4)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime callDate;

    @ApiModelProperty("被叫号码（后台使用）")
    @ExcelProperty(value = "被叫号码", index = 3)
    private String callProperty;
}
