package com.xydl.cac.entity;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.util.Date;

@JsonInclude(JsonInclude.Include.NON_NULL)
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "remote_download")
@ApiModel("远端文件下载记录表")
public class RemoteDownload {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Integer id;

    @ApiModelProperty("服务器ID")
    @Column(name = "config_id")
    private Integer configId;

    @ApiModelProperty("源路径")
    @Column(name = "remote_path")
    private String remotePath;

    @ApiModelProperty("本地路径")
    @Column(name = "path")
    private String path;

    @ApiModelProperty("文件名")
    @Column(name = "filename")
    private String filename;

    @ApiModelProperty("创建时间")
    @Column(name = "create_time")
    private Date createTime;

    @Transient
    RemoteConfig server;

}