32 lines
947 B
C#

using Marco.Pms.Model.Entitlements;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using System.ComponentModel.DataAnnotations.Schema;
namespace Marco.Pms.Model.DocumentManager
{
public class Document
{
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 int FileSize { get; set; }
public string ContentType { get; set; } = string.Empty;
public DateTime UploadedAt { get; set; }
public int TenantId { get; set; }
[ValidateNever]
[ForeignKey(nameof(TenantId))]
public Tenant? Tenant { get; set; }
}
}