using System.Numerics;
using Managing.Infrastructure.Evm.Services.Gmx;

namespace Managing.Infrastructure.Evm.Models.Gmx.v2;

public class GmxV2Position
{
    public string Key { get; set; }
    public string? ContractKey { get; set; }
    public string Account { get; set; }
    public string MarketAddress { get; set; }
    public string CollateralTokenAddress { get; set; }
    public BigInteger SizeInUsd { get; set; }
    public BigInteger SizeInTokens { get; set; }
    public BigInteger CollateralAmount { get; set; }
    public BigInteger PendingBorrowingFeesUsd { get; set; }
    public BigInteger IncreasedAtTime { get; set; }
    public BigInteger DecreasedAtTime { get; set; }
    public bool IsLong { get; set; }
    public BigInteger FundingFeeAmount { get; set; }
    public BigInteger ClaimableLongTokenAmount { get; set; }
    public BigInteger ClaimableShortTokenAmount { get; set; }
    public bool? IsOpening { get; set; }
    public PendingPositionUpdate PendingUpdate { get; set; }
    public string Data { get; set; }
    public GmxMarketInfo MarketInfo { get; set; }
    public GmxToken TokenData { get; set; }
}

public class PendingPositionUpdate
{
    public bool IsIncrease { get; set; }
    public string PositionKey { get; set; }
    public BigInteger SizeDeltaUsd { get; set; }
    public BigInteger SizeDeltaInTokens { get; set; }
    public BigInteger CollateralDeltaAmount { get; set; }
    public int UpdatedAt { get; set; }
    public BigInteger UpdatedAtTime { get; set; }
}