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

import java.util.Objects;

@Table("harbor_project")
public class HarborProject extends GenericEntity {

	@PK(value = PKStrategy.AUTO)
	private Long id;
	@Column("harbor_id")
	private Long harborId;
	@Column("harbor_project_id")
	private Long harborProjectId;
	@Column("creation_time")
	private String creationTime;
	@Column("update_time")
	private String updateTime;
	@Column("repo_count")
	private Integer repoCount;
	@Column("chart_count")
	private Integer chartCount;
	@Column("metadata")
	private String metadata;
	@Column("cve_whitelist")
	private String cveWhitelist;

	public Long getId() {
		return id;
	}

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

	public Long getHarborId() {
		return harborId;
	}

	public void setHarborId(Long harborId) {
		this.harborId = harborId;
	}

	public Long getHarborProjectId() {
		return harborProjectId;
	}

	public void setHarborProjectId(Long harborProjectId) {
		this.harborProjectId = harborProjectId;
	}

	public String getCreationTime() {
		return creationTime;
	}

	public void setCreationTime(String creationTime) {
		this.creationTime = creationTime;
	}

	public String getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(String updateTime) {
		this.updateTime = updateTime;
	}

	public Integer getRepoCount() {
		return repoCount;
	}

	public void setRepoCount(Integer repoCount) {
		this.repoCount = repoCount;
	}

	public Integer getChartCount() {
		return chartCount;
	}

	public void setChartCount(Integer chartCount) {
		this.chartCount = chartCount;
	}

	public String getMetadata() {
		return metadata;
	}

	public void setMetadata(String metadata) {
		this.metadata = metadata;
	}

	public String getCveWhitelist() {
		return cveWhitelist;
	}

	public void setCveWhitelist(String cveWhitelist) {
		this.cveWhitelist = cveWhitelist;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) {
			return true;
		}
		if (o == null || getClass() != o.getClass()) {
			return false;
		}
		HarborProject that = (HarborProject) o;
		return Objects.equals(harborId, that.harborId) && Objects.equals(harborProjectId, that.harborProjectId);
	}

	@Override
	public int hashCode() {
		return Objects.hash(harborId, harborProjectId);
	}
}
