package com.bocloud.ims.entity.resource;

import com.bocloud.acd.entity.resource.Vendor;
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 lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.List;

/**
 * 云供应商实体类
 *
 * @author wangyu
 */
@Table("cloud_vendor")
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
public class CloudVendor extends GenericEntity implements Vendor {

	@PK(value = PKStrategy.AUTO)
	private Long id; // ID
	@Column("type")
	private String type; // 平台类型
	@Column("env_id")
	private Long envId;// 所在环境
	@Column("uuid")
	private String uuid; // butler uuid
	@Column("guid")
	private String guid;// 全局唯一标识
	/**
	 * 可提供服务目录id
	 */
	@Column("catalog_ids")
	private String catalogIds;
	@Column("is_alarm")
	private Boolean isAlarm;// 是否开启告警
	@Column("is_public")
	private Boolean isPublic;// 是否为公有云
	@Column("sync_cron")
	private String syncCron;// 云平台同步任务cron
	@Column("dc_id")
	private Long dcId;// 数据中心id
	@Column("version")
	private String version;// 版本
	@Column("logo")
	private String logo;// 平台图标
	@Column("vendor_category")
	private String vendorCategory;// 平台分类
	@Column("authentication")
	private String authentication;// 平台认证信息(address,account,password,tenant,access_key,secret_key,domain_name,project_name,region_id,regions,management_ips,subscription_id,client_id,token)
	@Column("region")
	private String region;// 区域
	@Column("availablitiy_zone")
	private String availablitiyZone;// 可用域
	@Column("location")
	private String location; // 站点位置
	@Column("supplier")
	private String supplier; // 供应商
	@Column("docker_address")
	private String dockerAddress; // 供应商
	@Column("remote_site")
	private String remoteSite; // 远程站点
	@Column("deploy_url")
	private String deployUrl; // 部署机url
	@Column("deploy_username")
	private String deployUsername; // 部署机用户名
	@Column("deploy_password")
	private String deployPassword; // 部署机密码
	@Column("harbor_id")
	private Long harborId;
	@Column("priority")
	private Integer priority;
	@Column("bill_factor")
	private BigDecimal billFactor;	// 账单系数
	@IgnoreAll
	private String harborName;
	@IgnoreAll
	private String regionsName;
	@IgnoreAll
	private List<Server> servers;
	@IgnoreAll
	private String envName;
	@IgnoreAll
	private String dcName;
	@IgnoreAll
	private Long instance; // 实例数量
	@IgnoreAll
	private Long online; // 在线
	@IgnoreAll
	private Long offline; // 离线
	@IgnoreAll
	private Long hostCount;// 主机数量
	@IgnoreAll
	private Long dataStoreCount;// 数据存储数量
	@IgnoreAll
	private Long templateCount;// 模板数量
	@IgnoreAll
	private Long clusterCount;// 集群数量
	@IgnoreAll
	private Long imageCount;// 镜像数量
	@IgnoreAll
	private Long cpuCount;// cpu核数
	@IgnoreAll
	private Long monCount;// 控制节点数量
	@IgnoreAll
	private Long osdCount; // osd节点数量
	@IgnoreAll
	private Long mdsCount;// mds节点数量
	@IgnoreAll
	private Long cpuTotal; // cpu总赫兹
	@IgnoreAll
	private Long cpuUsed;
	@IgnoreAll
	private Long cpuUnused;
	@IgnoreAll
	private BigDecimal memTotal;// 总内存
	@IgnoreAll
	private BigDecimal memUsed;
	@IgnoreAll
	private BigDecimal memUnused;
	@IgnoreAll
	private BigDecimal diskTotal;
	@IgnoreAll
	private BigDecimal diskUsed;
	@IgnoreAll
	private BigDecimal diskUnused;
	@IgnoreAll
	private Long tenantCount;// 租户数量
	@IgnoreAll
	private Long networkCount;// 网络数量
	@IgnoreAll
	private Long vsCount;// virtual server数量
	@IgnoreAll
	private Long poolCount;// pool数量
	@IgnoreAll
	private Long nodeCount;// node数量
	@IgnoreAll
	private Long profileCount;// profile数量
	@IgnoreAll
	private Long monitorCount;// monitor数量
	@IgnoreAll
	private Long vpcCount; // vpc数量
	@IgnoreAll
	private Long lparCount;// 逻辑分区数量
	@IgnoreAll
	private Long viosCount; // 虚拟IO服务器数量
	@IgnoreAll
	private Long mdiskCount; // mdisk数量
	@IgnoreAll
	private Long flashCopyCount;// FlashCopy数量
	@IgnoreAll
	private Long fabricCount;// 光纤交换机数量
	@IgnoreAll
	private Long zoneCount; // zone的数量
	@IgnoreAll
	private Long nsCount; // k8s namespace count
	@IgnoreAll
	private Long podCount;
	@IgnoreAll
	private Long serviceCount;
	@IgnoreAll
	private Long deploymentCount;
	@IgnoreAll
	private Long aliasCount; // 别名的数量
	@IgnoreAll
	private Long accessPathCount;
	@IgnoreAll
	private Long edgeClusterCount;// edge集群
	@IgnoreAll
	private Long groupCount;// NS组
	@IgnoreAll
	private Long transportZoneCount;// 传输区域
	@IgnoreAll
	private Long firewallCount;// 防火墙
	@IgnoreAll
	private Long routerCount;// 路由器
	@IgnoreAll
	private Long switchCount;// 交换机
	@IgnoreAll
	private Long objectUserCount;// 对象用户
	@IgnoreAll
	private Long objectBucketCount;// 存储桶
	@IgnoreAll
	private Long objectRouterCount;// 对象路由

	@IgnoreAll
	private Long fileUserCount; // xsky 文件用户
	@IgnoreAll
	private Long fileClientCount; // xsky 文件客户端
	@IgnoreAll
	private Long snapshotCount; // 快照
	@IgnoreAll
	private Long fileSystemCount; // 文件系统数量
	@IgnoreAll
	private Long logicPortCount; // 逻辑端口
	@IgnoreAll
	private Long vasCount; // 逻辑vas
	@IgnoreAll
	private Long dbCount; // 堡垒机-数据库数量
	@IgnoreAll
	private Long appCount; // 堡垒机-应用数量
	@IgnoreAll
	private Long sessionCount; // 堡垒机-会话数量
	/********** vmware horizon桌面池统计 **************/
	@IgnoreAll
	private Long desktopPools;
	@IgnoreAll
	private Long farms;
	@IgnoreAll
	private Long sessions;
	@IgnoreAll
	private Long users;
	@IgnoreAll
	private Long vcenters;
	@IgnoreAll
	private Long vendorGroupId;
	@IgnoreAll
	private String domainId;

	@IgnoreAll
	private String oldPassword;
	@IgnoreAll
	private String newPassword;
	@IgnoreAll
	private String secretKey;
	@IgnoreAll
	private String accessKey;
	@IgnoreAll
	private String clientId;
	@IgnoreAll
	private String tenant;
	// 平台超分比
	@IgnoreAll
	private Long excessRatio;

}
