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

import cn.novalon.gym.manage.sys.primitive.Email;
import cn.novalon.gym.manage.sys.primitive.Password;
import cn.novalon.gym.manage.sys.primitive.Username;

/**
 * 创建用户命令对象
 * 
 * @author 张翔
 * @date 2026-03-13
 */
public record CreateUserCommand(
        Username username,
        Password password,
        Email email,
        String nickname,
        String phone,
        Long roleId,
        Integer status
) {
    public static CreateUserCommand of(String username, String password, String email, String nickname, String phone, Long roleId, Integer status) {
        return new CreateUserCommand(
                Username.of(username),
                Password.of(password),
                Email.of(email),
                nickname,
                phone,
                roleId,
                status
        );
    }
}
