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

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xunhong.erp.turbo.datasource.domain.entity.BaseDO;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * @author shenyifei
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "role")
public class RoleDO extends BaseDO<RoleDO> {

	/**
	 * 角色id
	 */
	@TableId(value = "role_id", type = IdType.ASSIGN_ID)
	private Long roleId;

	/**
	 * 标识
	 */
	@TableField(value = "slug")
	private String slug;

	/**
	 * 名称
	 */
	@TableField(value = "name")
	private String name;

	/**
	 * 角色类型1系统内置2商家自定义
	 */
	@TableField(value = "type")
	private String type;

	/**
	 * platformId
	 */
	@TableField(value = "platform_id")
	private Long platformId;

	/**
	 * 描述
	 */
	@TableField(value = "description")
	private String description;

	@TableField(exist = false)
	private List<RolePermissionDO> rolePermissionDOList;

	@TableField(exist = false)
	private List<RoleMenuDO> roleMenuDOList;
}
