package de.avatic.taric.model;

import java.util.Set;

import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.jdbc.core.mapping.AggregateReference;
import org.springframework.data.relational.core.mapping.Column;
import org.springframework.data.relational.core.mapping.MappedCollection;
import org.springframework.data.relational.core.mapping.Table;

import jakarta.validation.constraints.NotNull;

@Setter
@Getter
@Table("import")
public class Import {

	@Id
    private Integer id;

    @NotNull
    @Column("nomenclature_id")
    private Integer nomenclature;

    @Column("additional_code_id")
    private Integer additionalCode;

    @Column("geo_id")
    private AggregateReference<Geo, Integer> geo;

    @Column("geo_group_id")
    private AggregateReference<GeoGroup, Integer> geoGroup;

    @MappedCollection(idColumn = "import_id")
    Set<AppliedMeasure> appliedMeasures;


}
