using Marco.Pms.Model.DocumentManager; 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 an attachment for a purchase invoice. /// public class PurchaseInvoiceAttachment : TenantRelation { /// /// Gets or sets the unique identifier for the attachment. /// public Guid Id { get; set; } /// /// Gets or sets the unique identifier for the purchase invoice. /// public Guid PurchaseInvoiceId { get; set; } /// /// Gets or sets the purchase invoice associated with the attachment. /// [ValidateNever] [ForeignKey("PurchaseInvoiceId")] public PurchaseInvoiceDetails? PurchaseInvoice { get; set; } /// /// Gets or sets the unique identifier for the type of the invoice attachment. /// public Guid InvoiceAttachmentTypeId { get; set; } /// /// Gets or sets the type of the invoice attachment. /// [ValidateNever] [ForeignKey("InvoiceAttachmentTypeId")] public InvoiceAttachmentType? InvoiceAttachmentType { get; set; } /// /// Gets or sets the unique identifier for the document. /// public Guid DocumentId { get; set; } /// /// Gets or sets the document associated with the attachment. /// [ValidateNever] [ForeignKey("DocumentId")] public Document? Document { get; set; } /// /// Gets or sets the date and time when the attachment was uploaded. /// public DateTime UploadedAt { get; set; } /// /// Gets or sets the unique identifier of the employee who uploaded the attachment. /// public Guid UploadedById { get; set; } /// /// Gets or sets the employee who uploaded the attachment. /// [ValidateNever] [ForeignKey("UploadedById")] public Employee? UploadedBy { get; set; } } }