package com.bocloud.ims.entity.resource;

import com.bocloud.common.utils.DateSerializer;
import com.bocloud.entity.annotations.Column;
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 com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 云主机模板
 * 
 * @author ymh
 * @时间 2019年3月8日
 */
@Table("server_template")
public class ServerTemplate extends GenericEntity {

	@PK(value = PKStrategy.AUTO)
	private Long id;
	@Column("vendor_id")
	private Long vendorId;
	@Column("tenant_id")
	private Long tenantId;// 租户ID
	@Column("project_id")
	private Long projectId;// 项目ID
	@Column("region")
	private String region;
	@Column("zone")
	private String zone;
	@Column("create_time")
	@JsonSerialize(using = DateSerializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createTime;
	@Column("template_uuid")
	private String templateUuid;
	@Column("default_version_number")
	private Long defaultVersionNumber;
	@Column("latest_version_number")
	private Long latestVersionNumber;
	@Column("resource_group_id")
	private Long resourceGroupId;
	@Column("tags")
	private String tags;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getVendorId() {
		return vendorId;
	}

	public void setVendorId(Long vendorId) {
		this.vendorId = vendorId;
	}

	public Long getTenantId() {
		return tenantId;
	}

	public void setTenantId(Long tenantId) {
		this.tenantId = tenantId;
	}

	public Long getProjectId() {
		return projectId;
	}

	public void setProjectId(Long projectId) {
		this.projectId = projectId;
	}

	public String getRegion() {
		return region;
	}

	public void setRegion(String region) {
		this.region = region;
	}

	public String getZone() {
		return zone;
	}

	public void setZone(String zone) {
		this.zone = zone;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getTemplateUuid() {
		return templateUuid;
	}

	public void setTemplateUuid(String templateUuid) {
		this.templateUuid = templateUuid;
	}

	public Long getDefaultVersionNumber() {
		return defaultVersionNumber;
	}

	public void setDefaultVersionNumber(Long defaultVersionNumber) {
		this.defaultVersionNumber = defaultVersionNumber;
	}

	public Long getLatestVersionNumber() {
		return latestVersionNumber;
	}

	public void setLatestVersionNumber(Long latestVersionNumber) {
		this.latestVersionNumber = latestVersionNumber;
	}

	public Long getResourceGroupId() {
		return resourceGroupId;
	}

	public void setResourceGroupId(Long resourceGroupId) {
		this.resourceGroupId = resourceGroupId;
	}

	public String getTags() {
		return tags;
	}

	public void setTags(String tags) {
		this.tags = tags;
	}

}
