namespace Knot.Modules.Relations.Domain;

using System;

public class UserReplica
{
    public Guid Id { get; init; }
    public string Username { get; init; } = string.Empty;
    public string DisplayName { get; init; } = string.Empty;
    public string Avatar { get; init; } = string.Empty;
    public bool IsExternal { get; init; }
    public string? Domain { get; init; }

    private UserReplica() { }

    public static UserReplica Create(
        Guid id,
        string username,
        string displayName,
        string avatar,
        bool isExternal,
        string? domain)
    {
        return new UserReplica
        {
            Id = id,
            Username = username,
            DisplayName = displayName,
            Avatar = avatar,
            IsExternal = isExternal,
            Domain = domain
        };
    }
}
