package com.bocloud.cmp.model;

import java.util.Date;

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

/**
 * 负载均衡器实体类
 *
 * @author wangyu
 * @version 1.0
 * @since 2017年8月29日
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class LoadBalancerModel {

	private Long id;// ID
	private String lbUuid;// 负载均衡器ID
	private Integer feeType;// 资费类别
	private Long subnetId;// 子网ID
	private String subnetUuid;// 子网UUID
	private String tenantUuid;// 租户
	private String vipAddress;// vip地址
	private String vipPortUuid;// vip端口ID
	private Boolean adminStateUp;// 管理状态
	private String provisioningStatus;// 准备状态
	private String operatingStatus;// 操作状态
	private String provider;// 供应者
	private Long vendorId;// 云平台ID
	private Long portId;// 端口ID
	private Long tenantId;// 租户ID
	private Long projectId;// 项目ID
	private Long vpcId;
	private String vpcUuid;
	private String region;
	private int listenerNum;// 监听器总数
	private String floatingIpAddress;// 浮动IP
	private Long fipId;
	private String vendorName;
	private String tenantName;
	private String osTenantName;
	private Date gmtCreate;
	private Date gmtModify;
	private Long creatorId;
	private Long ownerId;
	private Long menderId;
	private String name;
	private String status;
	private Boolean deleted;
	private String props;
	private String remark;

	public void preSave(Long creatorId, Long menderId, Long vendorId, Long subnetId, Long portId, Long tenantId,
			Long projectId) {
		this.setCreatorId(creatorId);
		this.setMenderId(menderId);
		this.setVendorId(vendorId);
		this.setSubnetId(subnetId);
		this.setPortId(portId);
		this.setTenantId(tenantId);
		this.setProjectId(projectId);
	}

	/**
	 * @param lbUuid
	 * @param feeType
	 * @param subnetUuid
	 * @param tenantUuid
	 * @param vipAddress
	 * @param vipPortUuid
	 * @param adminStateUp
	 * @param provisioningStatus
	 * @param operatingStatus
	 * @param provider
	 */
	public LoadBalancerModel(String lbUuid, Integer feeType, String subnetUuid, String tenantUuid, String vipAddress,
			String vipPortUuid, Boolean adminStateUp, String provisioningStatus, String operatingStatus,
			String provider) {
		super();
		this.lbUuid = lbUuid;
		this.feeType = feeType;
		this.subnetUuid = subnetUuid;
		this.tenantUuid = tenantUuid;
		this.vipAddress = vipAddress;
		this.vipPortUuid = vipPortUuid;
		this.adminStateUp = adminStateUp;
		this.provisioningStatus = provisioningStatus;
		this.operatingStatus = operatingStatus;
		this.provider = provider;
	}

}
