package com.njcn.harmonic.pojo.po.upload;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
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.njcn.db.bo.BaseEntity;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;

/**
 * <p>
 * 电能质量报表上送
 * </p>
 *
 * @author xy
 * @since 2024-08-07
 */
@Getter
@Setter
@TableName("r_upload_report")
public class RUploadReport {

    private static final long serialVersionUID = 1L;

    @TableId
    private String objId;

    /**
     * 省单位id
     */
    private String provinceOrg;

    /**
     * 省单位名称
     */
    private String provinceOrgName;

    /**
     * 报表类型
     */
    @NotBlank(message = "报表类型不可为空")
    private String reportType;

    /**
     * Json字符串
     */
    @NotBlank(message = "Json字符串不可为空")
    private String reportData;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime updateTime;

    private String isDelete;

    private LocalDateTime deleteTime;

    private Integer uploadStatus;


}
