using Marco.Pms.Model.Employees; using Marco.Pms.Model.Utilities; using Microsoft.AspNetCore.Mvc.ModelBinding.Validation; using System.ComponentModel.DataAnnotations.Schema; namespace Marco.Pms.Model.PurchaseInvoice { /// /// Represents a detail of a delivery challan in the Purchase Invoice system. /// This class inherits from the TenantRelation class and adds specific properties related to a delivery challan. /// public class DeliveryChallanDetails : TenantRelation { /// /// Gets or sets the unique identifier for the delivery challan. /// public Guid Id { get; set; } /// /// Gets or sets the delivery challan number. /// public string DeliveryChallanNumber { get; set; } = default!; /// /// Gets or sets the date of the delivery challan. /// public DateTime DeliveryChallanDate { get; set; } /// /// Gets or sets the description of the delivery challan. /// public string Description { get; set; } = default!; /// /// Gets or sets the unique identifier of the associated PurchaseInvoice. /// public Guid PurchaseInvoiceId { get; set; } /// /// Gets or sets the associated PurchaseInvoice. /// [ValidateNever] [ForeignKey("PurchaseInvoiceId")] public PurchaseInvoiceDetails? PurchaseInvoice { get; set; } /// /// Gets or sets the unique identifier of the associated Attachment. /// public Guid AttachmentId { get; set; } /// /// Gets or sets the associated Attachment. /// [ValidateNever] [ForeignKey("AttachmentId")] public PurchaseInvoiceAttachment? Attachment { get; set; } /// /// Gets or sets the date and time the record was created. /// public DateTime CreatedAt { get; set; } /// /// Gets or sets the unique identifier of the user who created the record. /// public Guid CreatedById { get; set; } /// /// Gets or sets the user who created the record. /// [ValidateNever] [ForeignKey("CreatedById")] public Employee? CreatedBy { get; set; } } }