hibernate注解
package com.jbit.entity;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
@Entity
@Table(name="auction_product")
public class Product implements Serializable{
private static final long serialVersionUID = 1L;
private Integer id; //商品编号
private String name; //商品名称
private String desc; //商品描述
private Double start_price; //起拍价
private Double reserve_price; //底价
private Date begin_date; //开始拍卖日期
private Date end_date; //结束拍卖日期
private Integer status=1; //1:新添加 2:在售 3:已售出 默认为1
@GeneratedValue(generator="sequence")
@SequenceGenerator(name="sequence",sequenceName="sq_product")
@Id
@Column(name="id")
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
@Column(name="name")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Column(name="des")
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
@Column(name="start_price")
public Double getStart_price() {
return start_price;
}
public void setStart_price(Double start_price) {
this.start_price = start_price;
}
@Column(name="reserve_price")
public Double getReserve_price() {
return reserve_price;
}
public void setReserve_price(Double reserve_price) {
this.reserve_price = reserve_price;
}
@Column(name="begin_date")
public Date getBegin_date() {
return begin_date;
}
public void setBegin_date(Date begin_date) {
this.begin_date = begin_date;
}
@Column(name="end_date")