package com.crunii.micro.domain.entity.main;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.io.Serializable;

@Entity
@Table(name = "tsm_role")
@NamedQuery(name = "TsmRole.findAll", query="SELECT t FROM TsmRole t")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@EqualsAndHashCode(of= {"roleId"})
@ApiModel(description = "角色表")
public class TsmRole  implements Serializable {

	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name = "tsm_role_role_id_seq", sequenceName = "tsm_role_role_id_seq", allocationSize = 1)
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "tsm_role_role_id_seq")
	@Column(name = "role_id")
	@ApiModelProperty(value = "角色id")
	private int roleId;

	@Column(name = "role_name")
	@ApiModelProperty(value = "角色名称")
	private String roleName;

	@Column(name = "role_desc")
	@ApiModelProperty(value = "角色描述")
	private String roleDesc;

	@Column(name = "state")
	@ApiModelProperty(value = " 0 无效，1有效")
	private int state;

	@Column(name = "create_time")
	@ApiModelProperty(value = "创建时间")
	private java.util.Date createTime;

}
