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

namespace Managing.Infrastructure.Databases.PostgreSql.Entities;

[Table("Signals")]
public class SignalEntity
{
    [Key]
    public int Id { get; set; }
    
    [Required]
    [MaxLength(255)]
    public string Identifier { get; set; }
    
    public TradeDirection Direction { get; set; }
    public Confidence Confidence { get; set; }
    public DateTime Date { get; set; }
    public Ticker Ticker { get; set; }
    public SignalStatus Status { get; set; }
    public Timeframe Timeframe { get; set; }
    public IndicatorType Type { get; set; }
    public SignalType SignalType { get; set; }
    
    [MaxLength(255)]
    public string IndicatorName { get; set; }
    
    public int? UserId { get; set; }
    
    // Navigation property
    public UserEntity? User { get; set; }
    
    // Candle data stored as JSON
    [Column(TypeName = "text")]
    public string? CandleJson { get; set; }
    
    public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
    public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
} 