1. 程式人生 > >廖師兄springboot微信點餐開發中相關註解使用解釋

廖師兄springboot微信點餐開發中相關註解使用解釋

tca rate pub datetime clas 自動 entity val rod

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;
}
}

廖師兄springboot微信點餐開發中相關註解使用解釋