package com.hdkj.lt.base.model.entity;

import com.hdkj.lt.base.annotations.DateTimeValid;
import cn.hutool.core.date.DatePattern;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * @Description:
 * @Author: wenhao
 * @Create: 2022/09/17 10:29
 * @Version: 1.0
 */
@Getter
@Setter
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel("oss附件信息")
public class OssEntity {

    @ApiModelProperty("文件id（管理信息大区ossid）")
    @NotEmpty(message = "文件id不能为空")
    private String id;

    @ApiModelProperty("互联网大区ossid")
    private String internetRegionOssid;

    @ApiModelProperty("数据来源，0-内网；1-外网")
    private String dataSources;

    @ApiModelProperty("同步状态（内外网文件同步时使用）：0-未同步；1-已同步")
    private String syncStatus;

    @ApiModelProperty("附件名称")
    @NotEmpty(message = "附件名称不能为空")
    private String attachmentName;

    @ApiModelProperty("附件路径")
    private String attachmentDir;

    @ApiModelProperty("附件类型")
    @NotEmpty(message = "附件类型不能为空")
    private String attachmentType; //附件原始类型，如：jpg.avi等

    @ApiModelProperty("文件大小")
    @NotNull(message = "文件大小不能为空")
    private long bytes;

    @ApiModelProperty("文件路径")
    @NotEmpty(message = "文件路径不能为空")
    private String path;

    @ApiModelProperty("文件名称")
    @NotEmpty(message = "文件名称不能为空")
    private String fileName;

    @ApiModelProperty("文件类型")
    private String fileType;

    @ApiModelProperty("上传人")
    @NotEmpty(message = "上传人不能为空")
    private String uploadPer;

    @ApiModelProperty("上传时间")
    @NotEmpty(message = "上传时间不能为空")
    @DateTimeValid(message = "上传时间格式应为：" + DatePattern.NORM_DATETIME_PATTERN)
    private String uploadDate;

    @ApiModelProperty("创建人")
    @NotEmpty(message = "创建人不能为空")
    private String creator;

    @ApiModelProperty("创建时间")
    @NotEmpty(message = "创建时间不能为空")
    @DateTimeValid(message = "创建时间格式应为：" + DatePattern.NORM_DATETIME_PATTERN)
    private String createTime;

    @ApiModelProperty("最后一次修改人")
    @NotEmpty(message = "最后一次修改人不能为空")
    private String lastEditor;

    @ApiModelProperty("最后一次修改时间")
    @NotEmpty(message = "最后一次修改时间不能为空")
    @DateTimeValid(message = "最后一次修改时间格式应为：" + DatePattern.NORM_DATETIME_PATTERN)
    private String lastTime;

}
