namespace Knot.Contracts.Auth.Domain;

public class UserContract
{
    public Guid Id { get; set; }
    public string Username { get; set; } = string.Empty;
    public string DisplayName { get; set; } = string.Empty;
    public string PasswordHash { get; set; } = string.Empty;
    public string? PhoneNumber { get; set; }
    public string? Email { get; set; }
    public string? Bio { get; set; }
    public string? Avatar { get; set; }
    public DateTime? Birthday { get; set; }
    public bool IsBot { get; set; }
    public DateTime CreatedAt { get; set; }
    public DateTime? BannedUntil { get; set; }
    public bool IsBanned { get; set; }
    public bool IsOnline { get; set; }
    public bool IsExternal { get; set; }
    public string? Domain { get; set; }
    public DateTime? LastSeen { get; set; }
    public string? RefreshToken { get; set; }
    public DateTime? RefreshTokenExpiry { get; set; }

    public void SetRefreshToken(string? refreshToken, DateTime? expiry = null)
    {
        RefreshToken = refreshToken;
        RefreshTokenExpiry = expiry;
    }
}
