package de.votian.services.entity;

import jakarta.persistence.*;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Entity
@Table(name = "user")
public class User {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "usr_id")
    private Long id;

    @Column(name = "usr_account")
    private String account;

    @Column(name = "usr_password")
    private String password;

    @Column(name = "usr_password_old")
    private String passwordOld;

    @Column(name = "usr_password_modify")
    private LocalDateTime passwordModify;

    @Column(name = "usr_name")
    private String name;

    @Column(name = "usr_firstname")
    private String firstname;

    @Column(name = "usr_email")
    private String email;

    @Column(name = "usr_inv_email")
    private String invoiceEmail;

    @Column(name = "usr_phone")
    private String phone;

    @Column(name = "usr_phone2")
    private String phone2;

    @Column(name = "usr_fax")
    private String fax;

    @Column(name = "usr_type")
    private Integer type;

    @Column(name = "hq_id")
    private Long headquartersId;

    @Column(name = "usr_birthdate")
    private LocalDate birthdate;

    @Column(name = "usr_country")
    private String country;

    @Column(name = "usr_totp_secret")
    private String totpSecret;

    @Column(name = "usr_totp_activated")
    private String totpActivated;

    @Column(name = "usr_totp_sessionkey")
    private String totpSessionKey;

    public User() {}

    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }
    public String getAccount() { return account; }
    public void setAccount(String account) { this.account = account; }
    public String getPassword() { return password; }
    public void setPassword(String password) { this.password = password; }
    public String getPasswordOld() { return passwordOld; }
    public void setPasswordOld(String passwordOld) { this.passwordOld = passwordOld; }
    public LocalDateTime getPasswordModify() { return passwordModify; }
    public void setPasswordModify(LocalDateTime passwordModify) { this.passwordModify = passwordModify; }
    public String getName() { return name; }
    public void setName(String name) { this.name = name; }
    public String getFirstname() { return firstname; }
    public void setFirstname(String firstname) { this.firstname = firstname; }
    public String getEmail() { return email; }
    public void setEmail(String email) { this.email = email; }
    public String getInvoiceEmail() { return invoiceEmail; }
    public void setInvoiceEmail(String invoiceEmail) { this.invoiceEmail = invoiceEmail; }
    public String getPhone() { return phone; }
    public void setPhone(String phone) { this.phone = phone; }
    public String getPhone2() { return phone2; }
    public void setPhone2(String phone2) { this.phone2 = phone2; }
    public String getFax() { return fax; }
    public void setFax(String fax) { this.fax = fax; }
    public Integer getType() { return type; }
    public void setType(Integer type) { this.type = type; }
    public Long getHeadquartersId() { return headquartersId; }
    public void setHeadquartersId(Long headquartersId) { this.headquartersId = headquartersId; }
    public LocalDate getBirthdate() { return birthdate; }
    public void setBirthdate(LocalDate birthdate) { this.birthdate = birthdate; }
    public String getCountry() { return country; }
    public void setCountry(String country) { this.country = country; }
    public String getTotpSecret() { return totpSecret; }
    public void setTotpSecret(String totpSecret) { this.totpSecret = totpSecret; }
    public String getTotpActivated() { return totpActivated; }
    public void setTotpActivated(String totpActivated) { this.totpActivated = totpActivated; }
    public String getTotpSessionKey() { return totpSessionKey; }
    public void setTotpSessionKey(String totpSessionKey) { this.totpSessionKey = totpSessionKey; }
}
