package com.bocloud.ims.entity.resource;

import com.bocloud.entity.annotations.Column;
import com.bocloud.entity.annotations.PK;
import com.bocloud.entity.annotations.Table;
import com.bocloud.entity.bean.Generic;
import com.bocloud.entity.meta.PKStrategy;

import lombok.Data;

/**
 * 云主机与安全组关系类
 * 
 * @author weiwei
 */
@Table("server_sgroup")
@Data
public class ServerSgroup extends Generic {

	@PK(value = PKStrategy.AUTO)
	private Long id;// ID
	@Column("server_id")
	private Long serverId;// 云主机ID
	@Column("group_id")
	private Long groupId;// 云硬盘ID
	@Column("nic_id")
	private Long nicId;// 网卡ID（networkCard）

	public ServerSgroup(Long serverId, Long groupId, Long nicId) {
		this.serverId = serverId;
		this.groupId = groupId;
		this.nicId = nicId;
	}

	/**
	 * 
	 */
	public ServerSgroup() {
		super();
	}

	/**
	 * @param serverId
	 * @param volumeId
	 * @param device
	 */
	public ServerSgroup(Long serverId, Long groupId) {
		super();
		this.serverId = serverId;
		this.groupId = groupId;
	}

}
