package fi.oispakaljaa.karhu.domain;

import org.springframework.data.jpa.domain.AbstractPersistable;

import javax.persistence.Entity;

/**
 * Created by julkku on 11/29/16.
 */


@Entity
public class Drink extends AbstractPersistable<Long> {

    private String name; // KARJALA /

    private String drinkType; // BEER / CIDER

    private Bar bar;
    
    private Integer price;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Bar getBar() {
        return bar;
    }

    public void setBar(Bar bar) {
        this.bar = bar;
    }

    public String getDrinkType() {
        return drinkType;
    }

    public void setDrinkType(String drinkType) {
        this.drinkType = drinkType;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public Integer getPrice() {
        return price;
    }
    
    
}

@@ -31,16 +31,39 @@
 omain;%0A%0A
+import java.util.Date;%0A
 import o
@@ -156,51 +156,81 @@
 ty;%0A
-%0A/**%0A * Created by julkku on 11/29/16.%0A */%0A
+import javax.persistence.Temporal;%0Aimport javax.persistence.TemporalType;
 %0A%0A@E
@@ -398,20 +398,16 @@
 ar bar;%0A
-    
 %0A    pri
@@ -427,16 +427,135 @@
 price;%0A%0A
+    @Temporal(TemporalType.DATE)%0A    private Date added;%0A%0A    @Temporal(TemporalType.DATE)%0A    private Date lastEdit;%0A%0A
     publ
@@ -1095,16 +1095,289 @@
   %7D%0A
-    
 %0A    
+public void setAdded(Date added) %7B%0A        this.added = added;%0A    %7D%0A%0A    public void setLastEdit(Date lastEdit) %7B%0A        this.lastEdit = lastEdit;%0A    %7D%0A%0A    public Date getAdded() %7B%0A        return added;%0A    %7D%0A%0A    public Date getLastEdit() %7B%0A        return lastEdit;%0A    %7D%0A
 %0A%7D%0A

Add added and lastEdit attributes to Drink