SHARE
TWEET

Untitled

a guest Apr 21st, 2018 115 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.ius.foodyapi.model;
  2.  
  3. import javax.persistence.*;
  4.  
  5. /**
  6.  * This is the Entity that we defined for the Account Model
  7.  */
  8. @Entity
  9. public class Account {
  10.     @Id
  11.     @GeneratedValue(strategy = GenerationType.AUTO)
  12.     private Long id;
  13.     @Column(nullable = false, unique = true)
  14.     private String username;
  15.     @Column(nullable = false)
  16.     private String email;
  17.     @Column(nullable = false)
  18.     private String password;
  19.     private boolean isAdmin = false;
  20.     @OneToOne(targetEntity = Provider.class)
  21.     private Provider provider = null;
  22.  
  23.     public boolean isAdmin() {
  24.         return isAdmin;
  25.     }
  26.  
  27.     public void setAdmin(boolean admin) {
  28.         isAdmin = admin;
  29.     }
  30.  
  31.     public Provider getProvider() {
  32.         return provider;
  33.     }
  34.  
  35.     public void setProvider(Provider provider) {
  36.         this.provider = provider;
  37.     }
  38.  
  39.     public String getUsername() {
  40.         return username;
  41.     }
  42.  
  43.     public void setUsername(String username) {
  44.         this.username = username;
  45.     }
  46.  
  47.     public String getEmail() {
  48.         return email;
  49.     }
  50.  
  51.     public void setEmail(String email) {
  52.         this.email = email;
  53.     }
  54.  
  55.     public String getPassword() {
  56.         return password;
  57.     }
  58.  
  59.     public void setPassword(String password) {
  60.         this.password = password;
  61.     }
  62. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top