package com.backendsys.modules.system.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 jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.util.List;

@Data
@TableName("sys_user_role_relation")
public class SysUserRoleRelation {

    public static interface Update{}

    @TableId(type = IdType.AUTO)
    private Long id;
    private Long user_id;
    private Long role_id;

    @TableField(exist = false)
    @NotNull(message="role_ids 不能为空", groups = { Update.class })
    private List<Long> role_ids;
}
