using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace PARR.Domain.Entities
{
    [Table("OrderStatuses")]
    public class OrderStatus
    {
        [Key]
        public int Code { get; set; }

        public required string Name { get; set; }

        public required string Description { get; set; }

        [InverseProperty(nameof(Order.OrderStatus))]
        public ICollection<Order> Orders { get; set; } = new HashSet<Order>();

        [InverseProperty(nameof(Order.NextStatus))]
        public ICollection<Order> OrdersNext { get; set; } = new HashSet<Order>();
    }
}
