package cn.temptation.domain;

import javax.persistence.*;

@Entity
@Table(name = "product")
public class Product {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "productid")
    private Integer productid;
    @Column(name = "productname")
    private String productname;
    @ManyToOne(cascade = {CascadeType.MERGE, CascadeType.REFRESH}, optional = false)
    @JoinColumn(name = "categoryid", foreignKey = @ForeignKey(name = "none"))
    private Category category;

    public Integer getProductid() {
        return productid;
    }

    public void setProductid(Integer productid) {
        this.productid = productid;
    }

    public String getProductname() {
        return productname;
    }

    public void setProductname(String productname) {
        this.productname = productname;
    }

    public Category getCategory() {
        return category;
    }

    public void setCategory(Category category) {
        this.category = category;
    }
}
最近下载更多
呵呵哈哈哈  LV10 2022年9月3日
cab123123  LV8 2022年4月15日
9843637  LV9 2021年12月12日
huaua7676  LV30 2021年11月1日
阳光黎明  LV2 2021年10月11日
wang512237140  LV20 2021年9月30日
起名字是个麻烦事  LV12 2021年9月26日
a412291709  LV3 2021年9月18日
Altria  LV5 2021年8月13日
cas  LV9 2021年7月16日
最近浏览更多
WBelong  LV7 4月2日
沈从文  LV2 1月1日
lingtiejing  LV15 2023年12月18日
微信网友_6658069491355648  LV2 2023年10月18日
张朕朕  LV3 2023年9月10日
淡心伤  LV11 2023年8月2日
cwb6357123  LV6 2023年6月30日
neuwxr2015  LV8 2023年6月28日
遗留问题  LV2 2023年6月9日
skook7  LV2 2023年6月1日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友