package com.example.removetolocal.newuser.domin;

import com.example.removetolocal.config.BeanHelper;
import lombok.Data;
import javax.persistence.*;

import org.modelmapper.ModelMapper;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where;
import java.util.Date;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;

/**
 * entity class for user_role
*/
@Data
@Entity
@EntityListeners(AuditingEntityListener.class)
@Table(name = "user_role")
public class UserRole {

	/**
	* urId
	*/
	@Id
	@Column(name = "ur_id")
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer urId;
	/**
	* roleId
	*/
	@Column(name = "role_id")
	private Integer roleId;
	/**
	* userId
	*/
	@Column(name = "user_id")
	private Integer userId;


	public com.example.removetolocal.newentity.entity.UserRole toST() {
		ModelMapper mapper = BeanHelper.getUserMapper();
		return mapper.map(this, com.example.removetolocal.newentity.entity.UserRole.class);
	}
}
