package com.bocloud.ims.entity.resource.azure.db;

import com.bocloud.common.utils.DateDeserializer;
import com.bocloud.common.utils.DateSerializer;
import com.bocloud.entity.annotations.Column;
import com.bocloud.entity.annotations.PK;
import com.bocloud.entity.annotations.Table;
import com.bocloud.entity.meta.PKStrategy;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @Company: 博云 www.bocloud.com
 * @ClassName: AzureDatabaseServerLog
 * @Description:
 * @author: zhenpingLi/李振平
 * @date: 2021/2/4 15:24
 */
@Getter
@Setter
@Table("azure_database_server_log")
public class AzureDatabaseServerLog {
    @PK(value = PKStrategy.AUTO)
    private Long id; // ID
    @Column("uuid")
    private String uuid;
    @Column("name")
    private String name;
    @Column("type")
    private String type;
    @Column("log_size")
    private Integer logSize;//日志文件的大小。
    @JsonSerialize(using = DateSerializer.class)
    @JsonDeserialize(using = DateDeserializer.class)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column("log_created_time")
    private Date logCreatedTime;//日志文件的创建时间戳。
    @JsonSerialize(using = DateSerializer.class)
    @JsonDeserialize(using = DateDeserializer.class)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column("log_last_modified_time")
    private Date logLastModifiedTime;//日志文件的上次修改时间戳。
    @Column("log_type")
    private String logType;//日志文件的类型
    @Column("log_url")
    private String logUrl;//要从中下载日志文件的 url。
    @Column("database_server_id")
    private Long databaseServerId;

}