package com.imooc.dataobject; import lombok.Data;import org.hibernate.annotations.DynamicUpdate; import javax.persistence.Entity;import javax.persistence.GeneratedValue;import javax.persistence.Id;import java.util.Date; /** * 类目 * Created by 廖师兄 * 2017-05-07 14:30 */@Entity //映射数据库@DynamicUpdate //时间自动更新@Data // 省略set get ,需要下载lombok插件public class ProductCategory { /** 类目id. */ @Id @GeneratedValue private Integer categoryId; /** 类目名字. */ private String categoryName; /** 类目编号. */ private Integer categoryType; private Date createTime; private Date updateTime; public ProductCategory() { } public ProductCategory(String categoryName, Integer categoryType) { this.categoryName = categoryName; this.categoryType = categoryType; }}
原文地址:https://www.cnblogs.com/mark-luo/p/10447757.html
时间: 2024-11-09 19:50:42