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

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.deser.std.DateDeserializers;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.njcn.db.bo.BaseEntity;

import java.sql.Timestamp;
import java.time.LocalDate;
import java.time.LocalDateTime;

import com.njcn.harmonic.utils.TimestampAsLongSerializer;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 电能质量全过程管理用户
 * </p>
 *
 * @author cdf
 * @since 2024-10-09
 */
@Getter
@Setter
@TableName("pms_tem_user")
public class PmsTemUserPO {

    private static final long serialVersionUID = 1L;

    @TableId
    private String objId;

    /**
     * 所属网省
     */
    private String provinceOrg;

    /**
     * 所属网省名称
     */
    private String provinceOrgName;

    /**
     * 所属地市
     */
    private String cityOrg;

    /**
     * 所属地市名称
     */
    private String cityOrgName;

    /**
     * 运维单位
     */
    private String maintOrg;

    /**
     * 运维单位名称
     */
    private String maintOrgName;

    /**
     * 用户/项目名称
     */
    private String consName;

    /**
     * 干扰源类型
     */
    private String sourceType;

    /**
     * 干扰源类别
     */
    private String sourceCategory;

    /**
     * 场站属性
     */
    private String sourceAttr;

    /**
     * 并网/供电电压等级
     */
    private String gcVoltageLevel;

    /**
     * 并网/供电变电站
     */
    private String gcSubstationId;

    /**
     * 并网/供电变电站名称
     */
    private String gcSubstationName;

    /**
     * 并网/供电变电站电压等级
     */
    private String gcSubstationVoltageLevel;

    /**
     * 并网/供电线路
     */
    private String gcFeederId;

    /**
     * 并网/供电线路名称
     */
    private String gcFeederName;

    /**
     * 总装机容量（MVA）
     */
    private Double ratedCapacity;

    /**
     * 档案状态
     */
    private String userDossierStatus;

    /**
     * 删除标记
     */
    private Boolean isDelete;

    /**
     * 删除时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @JSONField(serializeUsing = TimestampAsLongSerializer.class)
    private Timestamp deleteTime;

    /**
     * 发布人
     */
    private String releaseUserName;

    /**
     * 所属电站类型
     */
    private String gcSubstationType;

    /**
     * 投运日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private LocalDate operateTime;

    /**
     * 发布时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @JSONField(serializeUsing = TimestampAsLongSerializer.class)
    private Timestamp releaseTime;

    /**
     * 营销用户编号
     */
    private String consNo;

    /**
     * 用户id
     */
    private String consObjId;

    private Integer uploadStatus;


    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(serializeUsing = TimestampAsLongSerializer.class)
    private Timestamp createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(serializeUsing = TimestampAsLongSerializer.class)
    private Timestamp updateTime;


}
