package com.theironyard.entities;

/**
 * Created by jeffryporter on 7/19/16.
 */
public class Photo
{
}

@@ -28,16 +28,45 @@
 ities;%0A%0A
+import javax.persistence.*;%0A%0A
 /**%0A * C
@@ -108,27 +108,1611 @@
  */%0A
-public class Photo%0A%7B
+@Entity%0A@Table(name = %22items%22)%0Apublic class Photo%0A%7B%0A    @Id%0A    @GeneratedValue%0A    private int id;%0A%0A    @Column(nullable = false)%0A    private String originalFilename;%0A%0A    @Column(nullable = false)%0A    private String newFilename;%0A%0A    @Column(nullable = false)%0A    private String caption;%0A%0A    @ManyToOne%0A    User user;%0A%0A    @ManyToOne%0A    Item item;%0A%0A    public Photo()%0A    %7B%0A    %7D%0A%0A    public Photo(String originalFilename, String newFilename, String caption, User user, Item item)%0A    %7B%0A        this.originalFilename = originalFilename;%0A        this.newFilename = newFilename;%0A        this.caption = caption;%0A        this.user = user;%0A        this.item = item;%0A    %7D%0A%0A    public int getId()%0A    %7B%0A        return id;%0A    %7D%0A%0A    public void setId(int id)%0A    %7B%0A        this.id = id;%0A    %7D%0A%0A    public String getOriginalFilename()%0A    %7B%0A        return originalFilename;%0A    %7D%0A%0A    public void setOriginalFilename(String originalFilename)%0A    %7B%0A        this.originalFilename = originalFilename;%0A    %7D%0A%0A    public String getNewFilename()%0A    %7B%0A        return newFilename;%0A    %7D%0A%0A    public void setNewFilename(String newFilename)%0A    %7B%0A        this.newFilename = newFilename;%0A    %7D%0A%0A    public String getCaption()%0A    %7B%0A        return caption;%0A    %7D%0A%0A    public void setCaption(String caption)%0A    %7B%0A        this.caption = caption;%0A    %7D%0A%0A    public User getUser()%0A    %7B%0A        return user;%0A    %7D%0A%0A    public void setUser(User user)%0A    %7B%0A        this.user = user;%0A    %7D%0A%0A    public Item getItem()%0A    %7B%0A        return item;%0A    %7D%0A%0A    public void setItem(Item item)%0A    %7B%0A        this.item = item;%0A    %7D
 %0A%7D%0A

Add Photo Class