package com.purui.prims.auth.api.authentication.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class UserWithPassword extends User {

    private String password;

    public UserWithPassword(Long id, String name, String displayName, String email, String password, Integer isAdmin, Integer roleId,
                            String roleName) {
        super(id, name, displayName, email, isAdmin, roleId, roleName, "");
        this.password = password;
    }

    public static UserWithPassword get(Long id, String name, String displayName,
                                       String email, String password, Integer isAdmin, Integer roleId, String roleName) {
        return new UserWithPassword(id, name, displayName, email, password, isAdmin, roleId, roleName);
    }

}
