package com.xunhong.erp.turbo.rbac.infrastructure.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author shenyifei
 */
@Data
@TableName(value = "user_role")
@EqualsAndHashCode(callSuper = true)
public class UserRoleDO extends Model<UserRoleDO> {

	/**
	 * 用户id
	 */
	@TableField(value = "user_id", updateStrategy = FieldStrategy.NEVER)
	private Long userId;

	/**
	 * 角色id
	 */
	@TableField(value = "role_id")
	private Long roleId;

	@TableField(exist = false)
	private RoleDO roleDO;
}
