49 lines
1.9 KiB
C#

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.DocumentManager
{
public class DocumentAttachment : TenantRelation
{
public Guid Id { get; set; }
public string Name { get; set; } = string.Empty;
public string? DocumentId { get; set; }
public string Description { get; set; } = string.Empty;
public bool IsCurrentVersion { get; set; } = true;
public DateTime UploadedAt { get; set; }
public Guid UploadedById { get; set; } // References the employee who uploaded the document
[ValidateNever]
[ForeignKey("UploadedById")]
public Employee? UploadedBy { get; set; }
public DateTime? UpdatedAt { get; set; }
public Guid? UpdatedById { get; set; } // References the employee who updates the document
[ValidateNever]
[ForeignKey("UpdatedById")]
public Employee? UpdatedBy { get; set; }
public DateTime? VerifiedAt { get; set; }
public bool? IsVerified { get; set; }
public Guid? VerifiedById { get; set; } // Associates the document with a specific employee, if applicable
[ValidateNever]
[ForeignKey("VerifiedById")]
public Employee? VerifiedBy { get; set; }
public Guid EntityId { get; set; } // Associates the document with a specific project, if applicable
public Guid DocumentTypeId { get; set; }
[ValidateNever]
[ForeignKey("DocumentTypeId")]
public DocumentTypeMaster? DocumentType { get; set; }
public Guid DocumentDataId { get; set; }
[ValidateNever]
[ForeignKey("DocumentDataId")]
public Document? Document { get; set; }
public bool IsActive { get; set; } = true;
}
}