package de.avatic.taric.model;

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

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import de.avatic.taric.serializer.DescSetSerializer;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.relational.core.mapping.MappedCollection;
import org.springframework.data.relational.core.mapping.Table;

import jakarta.validation.constraints.Size;

@Getter
@Setter
@Table("measure_series")
public class MeasureSeries {

	@Id
    @JsonIgnore
    private Integer id;
    
    @Size(max = 1)
    private String measureSeriesCode;
    
    @MappedCollection(idColumn = "ref_id")
    @JsonSerialize(using = DescSetSerializer.class)
    private Set<MeasureSeriesDesc> measureSeriesDesc;



}
