廖师兄springboot微信点餐开发中相关注解使用解释

时间:2019-02-28 00:03:24   收藏:0   阅读:259
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

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!