package de.effigenix.infrastructure.masterdata.persistence.entity;

import jakarta.persistence.Column;
import jakarta.persistence.Embeddable;

import java.time.LocalDate;

@Embeddable
public class QualityCertificateEmbeddable {

    @Column(name = "certificate_type", nullable = false, length = 100)
    private String certificateType;

    @Column(name = "issuer", length = 200)
    private String issuer;

    @Column(name = "valid_from")
    private LocalDate validFrom;

    @Column(name = "valid_until")
    private LocalDate validUntil;

    protected QualityCertificateEmbeddable() {}

    public QualityCertificateEmbeddable(String certificateType, String issuer, LocalDate validFrom, LocalDate validUntil) {
        this.certificateType = certificateType;
        this.issuer = issuer;
        this.validFrom = validFrom;
        this.validUntil = validUntil;
    }

    public String getCertificateType() { return certificateType; }
    public String getIssuer() { return issuer; }
    public LocalDate getValidFrom() { return validFrom; }
    public LocalDate getValidUntil() { return validUntil; }

    public void setCertificateType(String certificateType) { this.certificateType = certificateType; }
    public void setIssuer(String issuer) { this.issuer = issuer; }
    public void setValidFrom(LocalDate validFrom) { this.validFrom = validFrom; }
    public void setValidUntil(LocalDate validUntil) { this.validUntil = validUntil; }
}
