package com.zksy.base.warning.domain;

import com.baomidou.mybatisplus.annotation.IdType;
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 io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

@TableName(value = "warning_attachment", schema = "app_user")
@Api("预警附件")
@Data
public class WarningAttachment implements Serializable {

    @TableId(value = "attachment_id", type = IdType.ASSIGN_UUID)
    @ApiModelProperty("附件ID")
    private String attachmentId;

    @TableField("warning_id")
    @ApiModelProperty("预警ID")
    private String warningId;

    @TableField("attachment_name")
    @ApiModelProperty("附件名称")
    private String attachmentName;

    @TableField("attachment_url")
    @ApiModelProperty("附件地址")
    private String attachmentUrl;

    @TableField("attachment_type")
    @ApiModelProperty("附件类型")
    private String attachmentType;

    @TableField("attachment_size")
    @ApiModelProperty("附件大小（字节）")
    private Long attachmentSize;

    @TableField("create_by")
    @ApiModelProperty("上传人")
    private String createBy;

    @TableField("create_time")
    @ApiModelProperty("上传时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
