34 lines
1.0 KiB
C#

using System.ComponentModel.DataAnnotations.Schema;
using Marco.Pms.Model.Employees;
using Marco.Pms.Model.Utilities;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
namespace Marco.Pms.Model.DocumentManager
{
public class Document : TenantRelation
{
public Guid Id { get; set; }
public Guid? BatchId { get; set; }
public string FileName { get; set; } = string.Empty;
/// <summary>
/// Full S3 object key
/// </summary>
public string S3Key { get; set; } = string.Empty;
/// <summary>
/// S3 key for thumbnail image
/// </summary>
public string? ThumbS3Key { get; set; }
public string? Base64Data { get; set; } = null;
public long FileSize { get; set; }
public string ContentType { get; set; } = string.Empty;
public Guid? UploadedById { get; set; }
[ValidateNever]
[ForeignKey("UploadedById")]
public Employee? UploadedBy { get; set; }
public DateTime UploadedAt { get; set; }
}
}