package com.tofly.spire.entity;


import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.haiqiu.tools.excel.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 小表（户表）(SpireUser)表实体类
 *
 * @author HaiQiu
 * @since 2022-11-11 13:22:39
 */
@Data
@Accessors(chain = true)
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@TableName(value = "SPIRE_USER", resultMap = "SpireUserMap")
@ApiModel(value = "SpireUser对象", description = "小表（户表）")
public class SpireUser extends Model<SpireUser> {

    private static final long serialVersionUID = 373816729992998517L;

    /**
     * 主键ID
     */
    @Excel(name = "主键ID")
    @ApiModelProperty(value = "主键ID")
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 用户地址
     */
    @Excel(name = "用户地址")
    @ApiModelProperty(value = "用户地址")
    private String address;

    /**
     * 门牌号
     */
    @Excel(name = "门牌号")
    @ApiModelProperty(value = "门牌号")
    private String houseNumber;

    /**
     * 电话
     */
    @Excel(name = "电话")
    @ApiModelProperty(value = "电话")
    private String phone;

    /**
     * 表号
     */
    @Excel(name = "表号")
    @ApiModelProperty(value = "表号")
    private String sn;

    /**
     * 表具类型
     */
    @Excel(name = "表具类型")
    @ApiModelProperty(value = "表具类型")
    private String type;

    /**
     * 用户编码
     */
    @Excel(name = "用户编码")
    @ApiModelProperty(value = "用户编码")
    private String userGuid;

    /**
     * 用户名
     */
    @Excel(name = "用户名")
    @ApiModelProperty(value = "用户名")
    private String userName;

    /**
     * 阀门状态（自由、开启、 关闭、失联、卡死、未知）
     */
    @Excel(name = "阀门状态（自由、开启、 关闭、失联、卡死、未知）")
    @ApiModelProperty(value = "阀门状态（自由、开启、 关闭、失联、卡死、未知）")
    private String valveStatusTxt;

    /**
     * 阀门类型（无阀门、内置 阀、外置阀、温控阀
     */
    @Excel(name = "阀门类型（无阀门、内置 阀、外置阀、温控阀")
    @ApiModelProperty(value = "阀门类型（无阀门、内置 阀、外置阀、温控阀")
    private String valveType;

    /**
     * 上传时间
     */
    @Excel(name = "上传时间")
    @ApiModelProperty(value = "上传时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date uploadTime;

    /**
     * 创建时间
     */
    @Excel(name = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 修改时间
     */
    @Excel(name = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

}

