package cn.reghao.tnb.auth.app.model.po;

import cn.reghao.jutil.jdk.web.db.BaseObject;
import lombok.Getter;
import lombok.NoArgsConstructor;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

/**
 * 持久化到数据库版本的 UserAuthority
 *
 * @author reghao
 * @date 2025-08-13 16:32:07
 */
@NoArgsConstructor
@Getter
public class UserRole extends BaseObject<Integer> {
    @NotNull
    private Long userId;
    @NotBlank
    @Size(min = 1, max = 20)
    private String name;

    public UserRole(long userId, String name) {
        this.userId = userId;
        this.name = name;
    }
}
