package com.yida.data.common.core.entity.telephone;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 亲情电话-通话记录 Entity
 *
 * @author zhanghaijun
 * @date 2021-08-10 17:01:40
 */
@Data
@TableName("edu_telephone_record")
public class EduTelephoneRecord {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField(value = "create_id", fill = FieldFill.INSERT)
    private Long createId;

    @TableField(value = "create_date", fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createDate;

    @TableField(value = "update_id", fill = FieldFill.UPDATE)
    private Long updateId;

    @TableField(value = "update_date", fill = FieldFill.UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateDate;

    @TableField("del_flag")
    @TableLogic(value = "0", delval = "1")
    private Integer delFlag;

    @TableField("telephone_id")
    private Long telephoneId;

    private String imei;

    /**
     * ic卡id
     */
    @ApiModelProperty("ic卡id")
    @TableField("card_id")
    private Long cardId;

    /**
     * ic卡卡号
     */
    @ApiModelProperty("ic卡卡号")
    @TableField("card_no")
    private String cardNo;

    /**
     * 学生姓名
     */
    @TableField("student_name")
    private String studentName;

    /**
     * 呼叫号码
     */
    @TableField("calling")
    private String calling;

    /**
     * 通话时长（单位：S）
     */
    @ApiModelProperty("通话时长（单位：S）")
    @TableField("call_duration")
    private Integer callDuration;

    /**
     * 呼叫时间
     */
    @TableField("call_date")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime callDate;

}