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_worker_menu")
@NamedQuery(name = "TsmWorkerMenu.findAll", query="SELECT t FROM TsmWorkerMenu t")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@EqualsAndHashCode(of= {"id"})
@ApiModel(description = "员工对应菜单表")
public class TsmWorkerMenu  implements Serializable {

	private static final long serialVersionUID = 1L;

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

	@Column(name = "login_id")
	@ApiModelProperty(value = "工号id")
	private int loginId;

	@Column(name = "menu_code")
	@ApiModelProperty(value = " 菜单编码")
	private String menuCode;

}
