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

namespace Managing.Domain.MoneyManagements
{
    public class MoneyManagement
    {
        [Required]
        public string Name { get; set; }
        [Required]
        public Timeframe Timeframe { get; set; }
        [Required]
        public decimal StopLoss { get; set; }
        [Required]
        public decimal TakeProfit { get; set; }
        [Required]
        public decimal Leverage { get; set; }
        
        public User User { get; set; }

        public void FormatPercentage()
        {
            StopLoss /= 100;
            TakeProfit /= 100;
        }
    }
}
