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

namespace Managing.Infrastructure.Databases.PostgreSql.Entities;

[Table("Bots")]
public class BotEntity
{
    [Key] public Guid Identifier { get; set; }

    [Required] [MaxLength(255)] public required string Name { get; set; }

    public Ticker Ticker { get; set; }

    public int UserId { get; set; }

    [ForeignKey("UserId")] public UserEntity User { get; set; }

    public BotStatus Status { get; set; }
    public DateTime CreateDate { get; set; }
    public DateTime UpdatedAt { get; set; }
    public DateTime StartupTime { get; set; }
    public int TradeWins { get; set; }
    public int TradeLosses { get; set; }
    public decimal Pnl { get; set; }
    public decimal Roi { get; set; }
    public decimal Volume { get; set; }
    public decimal Fees { get; set; }
    public int LongPositionCount { get; set; }
    public int ShortPositionCount { get; set; }
}