package com.nokia.tsl_data.entity;

import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.time.Instant;

@Data
@Entity
@EntityListeners(AuditingEntityListener.class)
@Table(name = "high_quality_data", schema = "tsl_data")
public class HighQualityData {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    // 账期
    @Column(name = "day_id", columnDefinition = "varchar(8)", nullable = false)
    private String dayId;

    // 工单号
    @Column(name = "sheet_no", columnDefinition = "varchar(50)", nullable = false)
    private String sheetNo;

    // 测评-满意度
    @Column(name = "cp_satisfaction", columnDefinition = "varchar(50)")
    private String cpSatisfaction;

    // 测评-解决情况
    @Column(name = "cp_is_ok", columnDefinition = "varchar(50)")
    private String cpIsOk;

    // 测评-响应情况
    @Column(name = "cp_timely_contact", columnDefinition = "varchar(50)")
    private String cpTimelyContact;

    // 未回访标识 已回访/未回访
    @Column(name = "no_visit_tag", columnDefinition = "varchar(50)")
    private String noVisitTag;

    // 地市编码
    @Column(name = "area_id", columnDefinition = "varchar(50)")
    private String areaId;

    // 地市名
    @Column(name = "area_name", columnDefinition = "varchar(50)")
    private String areaName;

    // 区县编码
    @Column(name = "city_id", columnDefinition = "varchar(50)")
    private String cityId;

    // 区县名
    @Column(name = "city_name", columnDefinition = "varchar(50)")
    private String cityName;

    // 最后确认的地市
    @Column(name = "checked_city", columnDefinition = "varchar(50)")
    private String checkedCity;

    // 确认地市的原因
    @Column(name = "checked_city_reason", columnDefinition = "varchar(50)")
    private String checkedCityReason;

    // 最后确认的区县
    @Column(name = "checked_region", columnDefinition = "varchar(50)")
    private String checkedRegion;

    // 确认区县的原因
    @Column(name = "checked_region_reason", columnDefinition = "varchar(50)")
    private String checkedRegionReason;

    @CreatedDate
    private Instant createDate;

    @LastModifiedDate
    private Instant lastUpdateDate;
}
