using System.ComponentModel.DataAnnotations;

namespace WarehouseAppSHIPS.Models
{
    public class Material
    {
        [Key]
        public int Id { get; set; }

        [Required, MaxLength(50)]
        public string AssetCode { get; set; } = string.Empty;

        [Required, MaxLength(100)]
        public string Name { get; set; } = string.Empty;

        [Required, MaxLength(50)]
        public string Category { get; set; } = string.Empty;

        public int Stock { get; set; } = 0;
        public int MinStock { get; set; }
        public string? ImagePath { get; set; }

        public virtual ICollection<InboundTransaction> InboundTransactions { get; set; } = new List<InboundTransaction>();
        public virtual ICollection<MaterialRequest> MaterialRequests { get; set; } = new List<MaterialRequest>();
        public virtual ICollection<StockOpname> StockOpnames { get; set; } = new List<StockOpname>();
    }
}