using System.ComponentModel.DataAnnotations;
using Managing.Domain.Users;
using Orleans;
using static Managing.Common.Enums;

namespace Managing.Domain.Accounts;

[GenerateSerializer]
public class Account
{
    [Id(0)]
    public int Id { get; set; }
    
    [Id(1)]
    [Required] public string Name { get; set; }
    
    [Id(2)]
    [Required] public TradingExchanges Exchange { get; set; }
    
    [Id(3)]
    [Required] public AccountType Type { get; set; }
    
    [Id(4)]
    public string Key { get; set; }
    
    [Id(5)]
    public string Secret { get; set; }
    
    [Id(6)]
    public User User { get; set; }
    
    [Id(7)]
    public List<Balance> Balances { get; set; }
    
    [Id(8)]
    public bool IsGmxInitialized { get; set; } = false;

    public bool IsPrivyWallet => Type == AccountType.Privy;
}