package com.example.demo.user;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

@Entity// this tells Hibernate to make a table out of this class
public class User {

    @Id
    @GeneratedValue(strategy =GenerationType.AUTO)
    private long id;
    private String username;
    private String email;
    private String password;



    public User(){

    }

    public User(String username, String email, String password) {
        this.username = username;
        this.password = password;
        this.email = email;

    }

    public long getId() {
        return id;

    }

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

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;

    }

    public String getEmail() {
        return email;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public void setEmail(String email) {
        this.email = email;
    }
}
