package de.avatic.taric.model;


import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import de.avatic.taric.serializer.FootnoteReferenceSerializer;
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.Table;

import java.time.LocalDate;

@Getter
@Setter
@Table("measure_footnote")
public class MeasureFootnote {

	@Id
    @JsonIgnore
    private Integer id;

    @Column("start_date")
    private LocalDate startDate;

    @Column("end_date")
    private LocalDate endDate;

    @Column("footnote_id")
    @JsonSerialize(using = FootnoteReferenceSerializer.class)
    private AggregateReference<Footnote, Integer> footnote;



}
