package com.storlead.user.pojo.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.storlead.framework.mybatis.entity.SysBaseField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Collections;
import java.util.List;

/**
 * <p>
 * 角色表
 * </p>
 *
 * @Author scott
 * @since 2018-12-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("role")
public class RoleEntity extends SysBaseField {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "角色ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "角色名称")
    private String name;

    @ApiModelProperty(value = "角色描述")
    @TableField("`desc`")
    private String desc;

    @ApiModelProperty(value = "权限范围(全部 本公司 自定义 自己)")
    private String dataScope;

    @ApiModelProperty(value = "备注")
    private String remark;

    @TableField(exist = false)
    private String userNames = "";
    /**
     * 用户id集合
     */
    @TableField(exist = false)
    private List<Long> userIds = Collections.emptyList();
}
