package de.avatic.taricdb.model;

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.lang.Nullable;

import jakarta.validation.constraints.NotNull;

public class AppliedMeasureCondition {

	@Id
	private Integer id;

	private Integer sequenceNo;

	private String amount;

	@NotNull
	@Column("measure_action_id")
	private AggregateReference<MeasureAction, Integer> measureAction;

	@Column("monetary_unit_id")
	@Nullable
	private AggregateReference<MonetaryUnit, Integer> monetaryUnit;


	@Column("unit_id")
	@Nullable
	private AggregateReference<Unit, Integer> unit;

	@Column("certificate_id")
	@Nullable
	private AggregateReference<Certificate, Integer> certificate;

	@NotNull
	@Column("condition_type_id")
	private AggregateReference<ConditionType, Integer> conditionType;

	public AppliedMeasureCondition(AggregateReference<MeasureAction, Integer> measureAction,
			AggregateReference<MonetaryUnit, Integer> monetaryUnit,
			AggregateReference<Unit, Integer> unit,
			AggregateReference<Certificate, Integer> certificate,
			AggregateReference<ConditionType, Integer> conditionType, String amount, Integer squenceNo) {
		this.measureAction = measureAction;
		this.monetaryUnit = monetaryUnit;
		this.unit = unit;
		this.certificate = certificate;
		this.conditionType = conditionType;
		this.amount = amount;
		this.sequenceNo = squenceNo;
	}

	public Integer getId() {
		return id;
	}

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

	public Integer getSequenceNo() {
		return sequenceNo;
	}

	public void setSequenceNo(final Integer sequenceNo) {
		this.sequenceNo = sequenceNo;
	}

	public String getAmount() {
		return amount;
	}

	public void setAmount(final String amount) {
		this.amount = amount;
	}

	public AggregateReference<MeasureAction, Integer> getMeasureAction() {
		return measureAction;
	}

	public void setMeasureAction(final AggregateReference<MeasureAction, Integer> measureAction) {
		this.measureAction = measureAction;
	}

	public AggregateReference<MonetaryUnit, Integer> getMonetaryUnit() {
		return monetaryUnit;
	}

	public void setMonetaryUnit(final AggregateReference<MonetaryUnit, Integer> monetaryUnit) {
		this.monetaryUnit = monetaryUnit;
	}

	public AggregateReference<Unit, Integer> getUnit() {
		return unit;
	}

	public void setUnit(final AggregateReference<Unit, Integer> unit) {
		this.unit = unit;
	}

	public AggregateReference<Certificate, Integer> getCertificate() {
		return certificate;
	}

	public void setCertificate(final AggregateReference<Certificate, Integer> certificate) {
		this.certificate = certificate;
	}

	public AggregateReference<ConditionType, Integer> getConditionType() {
		return conditionType;
	}

	public void setConditionType(final AggregateReference<ConditionType, Integer> conditionType) {
		this.conditionType = conditionType;
	}

}
