/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.web.mavenproject6.entities;


import java.io.Serializable;
import java.sql.Date;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.validator.constraints.Length;

/**
 *
 * @author Татьяна Юрченко
 */
@Entity
@Table(name = "stock")
public class Stock implements Serializable 
{
    @Id
    @GeneratedValue(generator = "increment")
    @GenericGenerator(name= "increment", strategy= "increment")
    @Column(name = "id", nullable = false)
    private Long id;
    
    private String prizes;
    private String category;
    
    @NotNull
    private byte[] image;
    
    private boolean rented;
    private boolean sold;
    
    private long comingdate;

//    @OneToOne
//    private BasketLog basketLog;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getPrizes() {
        return prizes;
    }

    public void setPrizes(String prizes) {
        this.prizes = prizes;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public byte[] getImage() {
        return image;
    }

    public void setImage(byte[] image) {
        this.image = image;
    }

    public boolean isRented() {
        return rented;
    }

    public void setRented(boolean rented) {
        this.rented = rented;
    }

    public boolean isSold() {
        return sold;
    }

    public void setSold(boolean sold) {
        this.sold = sold;
    }

    public long getComingdate() {
        return comingdate;
    }

    public void setComingdate(long comingdate) {
        this.comingdate = comingdate;
    }

//    public BasketLog getBasketLog() {
//        return basketLog;
//    }
//
//    public void setBasketLog(BasketLog basketLog) {
//        this.basketLog = basketLog;
//    }

  
    
}
