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