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_url_group")
@NamedQuery(name = "TsmRoleUrlGroup.findAll", query="SELECT t FROM TsmRoleUrlGroup t")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@EqualsAndHashCode(of= {"id"})
@ApiModel(description = "角色对应url组表")
public class TsmRoleUrlGroup  implements Serializable {

	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name = "tsm_role_url_group_id_seq", sequenceName = "tsm_role_url_group_id_seq", allocationSize = 1)
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "tsm_role_url_group_id_seq")
	@Column(name = "id")
	@ApiModelProperty(value = "主键")
	private int id;

	@Column(name = "role_id")
	@ApiModelProperty(value = "角色id")
	private int roleId;

	@Column(name = "group_id")
	@ApiModelProperty(value = "URL组Id")
	private int groupId;

}
