package org.example.demo.uebung2.aufgabe21;

import jakarta.persistence.*;
import java.io.Serializable;

@Entity
public class Mitarbeiter implements Serializable {

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

    private String name;
    private int personalnummer;

    public Mitarbeiter() {
    }

    public Mitarbeiter(String name, int personalnummer) {
        this.name = name;
        this.personalnummer = personalnummer;
    }

    public int getId() {
        return id;
    }

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

    public String getName() {
        return name;
    }

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

    public int getPersonalnummer() {
        return personalnummer;
    }

    public void setPersonalnummer(int personalnummer) {
        this.personalnummer = personalnummer;
    }

    @Override
    public String toString() {
        return "Mitarbeiter{" +
               "id=" + id +
               ", name='" + name + '\'' +
               ", personalnummer=" + personalnummer +
               '}';
    }
}
