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

namespace WarehouseAppSHIPS.Models
{
    public class StockOpname
    {
        [Key]
        public int Id { get; set; }
        public DateTime AuditDate { get; set; } = DateTime.Now;

        [ForeignKey("Material")]
        public int MaterialId { get; set; }
        public virtual Material? Material { get; set; }

        public int SystemStock { get; set; }

        [Required]
        public int PhysicalStock { get; set; }

        public int Difference { get; set; } // Selisih = Fisik - Sistem

        [MaxLength(255)]
        public string? Remarks { get; set; }

        [ForeignKey("Auditor")]
        public int AuditorId { get; set; }
        public virtual AppUser? Auditor { get; set; }
    }
}