using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using static Managing.Common.Enums;

namespace Managing.Infrastructure.Databases.PostgreSql.Entities;

[Table("FundingRates")]
public class FundingRateEntity
{
    [Key]
    public int Id { get; set; }
    
    public Ticker Ticker { get; set; }
    public TradingExchanges Exchange { get; set; }
    
    [Column(TypeName = "decimal(18,8)")]
    public decimal Rate { get; set; }
    
    [Column(TypeName = "decimal(18,8)")]
    public decimal OpenInterest { get; set; }
    
    public DateTime Date { get; set; }
    public TradeDirection Direction { get; set; }
    
    public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
    public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
} 