package com.bocloud.ims.entity.resource;

import com.bocloud.common.utils.DateSerializer;
import com.bocloud.entity.annotations.Column;
import com.bocloud.entity.annotations.IgnoreAll;
import com.bocloud.entity.annotations.PK;
import com.bocloud.entity.annotations.Table;
import com.bocloud.entity.bean.GenericEntity;
import com.bocloud.entity.meta.PKStrategy;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 华为备份存储库
 * 
 * @ClassName: BackupVaults.java
 * @Description:
 *
 * @author: ymh
 * @date: 2021年3月26日 下午5:45:09
 */
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
@Table("backup_vaults")
public class BackupVaults extends GenericEntity {

	@PK(PKStrategy.AUTO)
	private Long id;// ID

	@Column("region_id")
	private String regionId;// 所属域

	@Column("vendor_id")
	private Long vendorId;// 所属云平台

	@Column("vaults_uuid")
	private String vaultsUuid;

	@Column("create_time")
	@JsonSerialize(using = DateSerializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createTime;

	@Column("object_type")
	private String objectType;

	@Column("vault_size")
	private Integer vaultSize;

	@Column("protect_type")
	private String protectType;

	@Column("used")
	private Long used;

	@Column("allocated")
	private Long allocated;

	@Column("auto_bind")
	private Boolean autoBind;

	@Column("auto_expand")
	private Boolean autoExpand;

	@Column("tenant_id")
	private Long tenantId;// 租户ID
	@Column("project_id")
	private Long projectId;// 项目ID

	@IgnoreAll
	private String resources;
	@IgnoreAll
	private String type;
	@IgnoreAll
	private String regionName;
	@IgnoreAll
	private String tenantName;
	@IgnoreAll
	private String projectName;
	@IgnoreAll
	private String vendorType;
	@IgnoreAll
	private String vendorName;
	@IgnoreAll
	private Long diskCount;
	@IgnoreAll
	private Long serverCount;
}
