package com.tymiller.model;

import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;

import org.hibernate.annotations.CreationTimestamp;

import com.fasterxml.jackson.annotation.JsonManagedReference;

@Entity
public class User {

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long userId;
	private String firstName;
	private String lastName;
	private String userName;
	private String password;
	
	@CreationTimestamp
	private Date created;
	
	@OneToMany(mappedBy = "user", cascade = CascadeType.ALL, fetch = FetchType.EAGER)
	@JsonManagedReference
	private List<Photo> photoList;
	
	@ManyToMany
	private List<Photo> likedPhotoList;
}

@@ -923,11 +923,1096 @@
 otoList;
+%0A%0A%09public Long getUserId() %7B%0A%09%09return userId;%0A%09%7D%0A%0A%09public void setUserId(Long userId) %7B%0A%09%09this.userId = userId;%0A%09%7D%0A%0A%09public String getFirstName() %7B%0A%09%09return firstName;%0A%09%7D%0A%0A%09public void setFirstName(String firstName) %7B%0A%09%09this.firstName = firstName;%0A%09%7D%0A%0A%09public String getLastName() %7B%0A%09%09return lastName;%0A%09%7D%0A%0A%09public void setLastName(String lastName) %7B%0A%09%09this.lastName = lastName;%0A%09%7D%0A%0A%09public String getUserName() %7B%0A%09%09return userName;%0A%09%7D%0A%0A%09public void setUserName(String userName) %7B%0A%09%09this.userName = userName;%0A%09%7D%0A%0A%09public String getPassword() %7B%0A%09%09return password;%0A%09%7D%0A%0A%09public void setPassword(String password) %7B%0A%09%09this.password = password;%0A%09%7D%0A%0A%09public Date getCreated() %7B%0A%09%09return created;%0A%09%7D%0A%0A%09public void setCreated(Date created) %7B%0A%09%09this.created = created;%0A%09%7D%0A%0A%09public List%3CPhoto%3E getPhotoList() %7B%0A%09%09return photoList;%0A%09%7D%0A%0A%09public void setPhotoList(List%3CPhoto%3E photoList) %7B%0A%09%09this.photoList = photoList;%0A%09%7D%0A%0A%09public List%3CPhoto%3E getLikedPhotoList() %7B%0A%09%09return likedPhotoList;%0A%09%7D%0A%0A%09public void setLikedPhotoList(List%3CPhoto%3E likedPhotoList) %7B%0A%09%09this.likedPhotoList = likedPhotoList;%0A%09%7D%0A%09%09
 %0A%7D%0A

add getters and setters for fields