/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.jpa.demo;

import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Administrator
 */
@Entity
public class Discount {

    @Id
    @GeneratedValue
    private Long id;
    double discountvalue;

    public Discount() {
    }
    @Temporal(TemporalType.DATE)
    private Date validateperoid;

    public Long getId() {
        return id;
    }

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

    public double getDiscountvalue() {
        return discountvalue;
    }

    public void setDiscountvalue(double discountvalue) {
        this.discountvalue = discountvalue;
    }

    public Date getValidateperoid() {
        return validateperoid;
    }

    public void setValidateperoid(Date validateperoid) {
        this.validateperoid = validateperoid;
    }

    public Customer getCid() {
        return cid;
    }

    public void setCid(Customer cid) {
        this.cid = cid;
    }
    @OneToOne(mappedBy = "discount")
    Customer cid;
}
