package cn.novalon.manage.sys.core.command;

/**
 * 更新用户命令对象
 * 
 * @author 张翔
 * @date 2026-03-13
 */
public record UpdateUserCommand(
        Long id,
        String username,
        String password,
        String email,
        Long roleId,
        Integer status,
        boolean clearRole
) {
    public static UpdateUserCommand of(Long id, String username, String password, String email, Long roleId, Integer status) {
        return new UpdateUserCommand(id, username, password, email, roleId, status, false);
    }
    
    public static UpdateUserCommand of(Long id, String username, String password, String email, Long roleId, Integer status, boolean clearRole) {
        return new UpdateUserCommand(id, username, password, email, roleId, status, clearRole);
    }
}
