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_org_temporary")
@NamedQuery(name = "TsmWorkerOrgTemporary.findAll", query="SELECT t FROM TsmWorkerOrgTemporary t")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@EqualsAndHashCode(of= {"id"})
@ApiModel(description = "用户挂职表")
public class TsmWorkerOrgTemporary implements Serializable {

	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "id")
	@ApiModelProperty(value = "主键")
	private int id;

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

	@Column(name = "org_id")
	@ApiModelProperty(value = "角色id")
	private Long orgId;

}
