package com.bocloud.ims.entity.resource;

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.Generic;
import com.bocloud.entity.meta.PKStrategy;

import java.util.List;
import java.util.Set;

/**
 * 区域实体类（子区域为zone）
 *
 * @author wangyu
 */
@Table("region")
public class Region extends Generic {

	@PK(value = PKStrategy.AUTO)
	private Long id; // ID
	@Column("name")
	private String name; // 名称
	@Column("code")
	private String code;// 编码
	@Column("vendor_id")
	private Long vendorId;// 云供应商ID
	@Column("region_id")
	private String regionId; // 区域的ID
	@Column("guid")
	private String guid;

	@IgnoreAll
	private List<Zone> zones;
	@IgnoreAll
	private Set<String> zoneIds;

	public Region() {
	}

	public Region(String name, String code, Long vendorId) {
		this.name = name;
		this.code = code;
		this.vendorId = vendorId;
	}

	/**
	 * @return the regionId
	 */
	public String getRegionId() {
		return regionId;
	}

	/**
	 * @param regionId
	 *            the regionId to set
	 */
	public void setRegionId(String regionId) {
		this.regionId = regionId;
	}

	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the code
	 */
	public String getCode() {
		return code;
	}

	/**
	 * @param code
	 *            the code to set
	 */
	public void setCode(String code) {
		this.code = code;
	}

	/**
	 * @return the vendorId
	 */
	public Long getVendorId() {
		return vendorId;
	}

	/**
	 * @param vendorId
	 *            the vendorId to set
	 */
	public void setVendorId(Long vendorId) {
		this.vendorId = vendorId;
	}

	public String getGuid() {
		return guid;
	}

	public void setGuid(String guid) {
		this.guid = guid;
	}

	public List<Zone> getZones() {
		return zones;
	}

	public void setZones(List<Zone> zones) {
		this.zones = zones;
	}

	public Set<String> getZoneIds() {
		return zoneIds;
	}

	public void setZoneIds(Set<String> zoneIds) {
		this.zoneIds = zoneIds;
	}

}
