Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.ius.foodyapi.model;
- import javax.persistence.*;
- /**
- * This is the Entity that we defined for the Account Model
- */
- @Entity
- public class Account {
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- private Long id;
- @Column(nullable = false, unique = true)
- private String username;
- @Column(nullable = false)
- private String email;
- @Column(nullable = false)
- private String password;
- private boolean isAdmin = false;
- @OneToOne(targetEntity = Provider.class)
- private Provider provider = null;
- public boolean isAdmin() {
- return isAdmin;
- }
- public void setAdmin(boolean admin) {
- isAdmin = admin;
- }
- public Provider getProvider() {
- return provider;
- }
- public void setProvider(Provider provider) {
- this.provider = provider;
- }
- public String getUsername() {
- return username;
- }
- public void setUsername(String username) {
- this.username = username;
- }
- public String getEmail() {
- return email;
- }
- public void setEmail(String email) {
- this.email = email;
- }
- public String getPassword() {
- return password;
- }
- public void setPassword(String password) {
- this.password = password;
- }
- }
Add Comment
Please, Sign In to add comment