package com.YuyeTech.TPlat.dataobject;

import lombok.Data;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 * @author:slambb
 * @date:2020/2/5
 */
@Entity
@DynamicUpdate
@Data
public class GameCategory {
    // 类目id
    //采用的是 IDENTITY。主键由数据库自动生成（主要是自动增长型）
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer categoryId;
    //类目名字
    private String categoryName;
    //类目编号
    private Integer categoryType;

    public GameCategory() {
    }

    public GameCategory(String categoryName, Integer categoryType) {
        this.categoryName = categoryName;
        this.categoryType = categoryType;
    }
}
