package com.tofly.water.entity;


import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiModel;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.codehaus.jackson.map.ser.std.ToStringSerializer;
import org.springframework.format.annotation.DateTimeFormat;
import lombok.Data;

import java.util.*;

import org.springframework.web.multipart.MultipartFile;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;

import lombok.EqualsAndHashCode;
import com.haiqiu.tools.excel.annotation.Excel;

/**
 * 设备档案和外部主键关联(DeviceBusiness)表实体类
 *
 * @author HaiQiu
 * @since 2022-11-30 15:36:46
 */
@Data
@Accessors(chain = true)
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@TableName(value = "TF_DEVICE_BUSINESS", resultMap = "DeviceBusinessMap")
@ApiModel(value = "DeviceBusiness对象", description = "设备档案和外部主键关联")
public class DeviceBusiness extends Model<DeviceBusiness> {

    private static final long serialVersionUID = 257589351097959247L;

    /**
     * 主键ID
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @JsonSerialize(using = ToStringSerializer.class)
    @Excel(name = "主键ID")
    @ApiModelProperty(value = "主键ID")
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 业务主键ID
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @JsonSerialize(using = ToStringSerializer.class)
    @Excel(name = "业务主键ID")
    @ApiModelProperty(value = "业务主键ID")
    private Long businessId;
    /**
     * 外部业务表名称
     */
    @Excel(name = "外部业务表名称")
    @ApiModelProperty(value = "外部业务表名称")
    private String outsideTable;
    /**
     * 创建时间
     */
    @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;

    @Excel(name = "业务表数据")
    @ApiModelProperty(value = "业务表数据")
    @TableField(exist = false)
    private Map<String,Object> business;
}

