package de.avatic.taricdb.model;

import java.util.HashSet;
import java.util.Set;

import org.springframework.data.annotation.Id;
import org.springframework.data.relational.core.mapping.MappedCollection;

import jakarta.validation.constraints.Size;

public class CertificateType {

	@Id
    private Integer id;
    
    @Size(max = 1)
    private String certificateTypeCode;
    
    @MappedCollection(idColumn = "ref_id")
    private Set<CertificateTypeDesc> certificateTypeDesc;

    public CertificateType(String certificateTypeCode) {
		this.certificateTypeCode = certificateTypeCode;
		this.certificateTypeDesc = new HashSet<>();
	}

	public Integer getId() {
        return id;
    }

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

    public String getCertificateTypeCode() {
        return certificateTypeCode;
    }

    public void setCertificateTypeCode(final String certificateTypeCode) {
        this.certificateTypeCode = certificateTypeCode;
    }
    
	public void addCertificateTypeDesc(CertificateTypeDesc certificateTypeDesc) {
		this.certificateTypeDesc.add(certificateTypeDesc);
	}



}
