package cz.utb.tadis.attacks.model;

import com.fasterxml.jackson.annotation.JsonIgnore;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

@Entity
@Table(name = "related_attacks")
public class RelatedAttack {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @NotNull
    private Long relatedAttackId;

    @Size(max = 200)
    private String note;

    public RelatedAttack() {
    }

    public RelatedAttack(@NotNull Long relatedAttackId, @Size(max = 200) String note) {
        this.relatedAttackId = relatedAttackId;
        this.note = note;
    }

    public Long getId() {
        return id;
    }

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

    public Long getRelatedAttackId() {
        return relatedAttackId;
    }

    public void setRelatedAttackId(Long relatedAttackId) {
        this.relatedAttackId = relatedAttackId;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }
}
