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

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

        public DateTime TransactionDate { get; set; } = DateTime.Now;

        // Barang apa yang masuk?
        [ForeignKey("Material")]
        public int MaterialId { get; set; }
        public virtual Material? Material { get; set; }

        // Jumlah yang ditambahkan ke gudang
        [Required]
        public int Qty { get; set; }

        // Dari supplier / vendor mana?
        [MaxLength(255)]
        public string? SupplierName { get; set; }

        // Catatan nomor PO / DO (Delivery Order)
        [MaxLength(255)]
        public string? Remarks { get; set; }

        // Siapa staff gudang yang menerima?
        [ForeignKey("Receiver")]
        public int ReceiverId { get; set; }
        public virtual AppUser? Receiver { get; set; }
    }
}