package com.tymiller.model;

import java.util.Date;

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

import org.hibernate.annotations.CreationTimestamp;

@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;
}

@@ -49,40 +49,137 @@
 te;%0A
-%0Aimport javax.persistence.Entity
+import java.util.List;%0A%0Aimport javax.persistence.CascadeType;%0Aimport javax.persistence.Entity;%0Aimport javax.persistence.FetchType
 ;%0Aim
@@ -286,16 +286,52 @@
 ence.Id;
+%0Aimport javax.persistence.OneToMany;
 %0A%0Aimport
@@ -377,16 +377,79 @@
 stamp;%0A%0A
+import com.fasterxml.jackson.annotation.JsonManagedReference;%0A%0A
 @Entity%0A
@@ -695,10 +695,150 @@
 reated;%0A
+%09%0A%09@OneToMany(mappedBy = %22user%22, cascade = CascadeType.ALL, fetch = FetchType.EAGER)%0A%09@JsonManagedReference%0A%09private List%3CPhoto%3E photoList;%0A
 %7D%0A

add json annotation