package com.bocloud.cmp.model;

import java.util.Date;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 
 * @description IP管理
 * @version 5.1.0
 * @author wangyu
 * @date: 2020-11-30
 *
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class IpModel {

	private Long id; // ID
	private String ip;// IP地址
	private String gateway; // 网关
	private String dns; // DNS
	private String mask; // DNS
	private Long vendorId;// 平台ID
	private Long poolId;// IP池ID
	private String resourceId;// 资源ID
	private Long target;// 目标ID
	private String catalog;// 目标类型
	private Long networkId; // 网络ID
	private Long subnetId; // 子网id
	private IpStatus status;// IP状态
	private String remark;//备注
	private Date gmtCreate;// 创建时间
	private String networkName;// 网络名称
	private String subnetName;// 子网名称
	private String vendorName;// 平台名称
	private String targetName;// ip绑定目标名称

	public IpModel(String ip, String mask, String gateway, String dns, Long vendorId, String resourceId, Long poolId,
                   IpStatus status) {
		super();
		this.ip = ip;
		this.mask = mask;
		this.gateway = gateway;
		this.dns = dns;
		this.vendorId = vendorId;
		this.resourceId = resourceId;
		this.poolId = poolId;
		this.status = status;
	}

	/**
	 * 
	 * @description IP状态枚举
	 * @version 5.1.0
	 * @author wangyu
	 * @date: 2020-11-30
	 *
	 */
	public enum IpStatus {
		free, // 空闲
		used, // 已使用
		locked// 已锁定
	}
}
