package cz.utb.tadis.attacks.model;

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

@Entity
@Table(name = "attackers")
public class Attacker {

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

    @NotBlank
    private String name;

    @Enumerated(EnumType.STRING)
    private Gender gender;

    private Short age;

    @Size(max = 60)
    private String residence;

    @Enumerated(EnumType.STRING)
    private Locality attackLocality;

    @Size(max = 500)
    private String origin;

    public Attacker() {
    }

    public Attacker(@NotBlank String name, Gender gender, Short age, @Size(max = 60) String residence, Locality attackLocality, @Size(max = 500) String origin) {
        this.name = name;
        this.gender = gender;
        this.age = age;
        this.residence = residence;
        this.attackLocality = attackLocality;
        this.origin = origin;
    }

    public Long getId() {
        return id;
    }

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

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Gender getGender() {
        return gender;
    }

    public void setGender(Gender gender) {
        this.gender = gender;
    }

    public Short getAge() {
        return age;
    }

    public void setAge(Short age) {
        this.age = age;
    }

    public String getResidence() {
        return residence;
    }

    public void setResidence(String residence) {
        this.residence = residence;
    }

    public Locality getAttackLocality() {
        return attackLocality;
    }

    public void setAttackLocality(Locality attackLocality) {
        this.attackLocality = attackLocality;
    }

    public String getOrigin() {
        return origin;
    }

    public void setOrigin(String origin) {
        this.origin = origin;
    }
}
