Files
hamkadr/src/JobsMedical.Web/Models/FacilityDocument.cs
T

26 lines
963 B
C#
Raw Normal View History

using System.ComponentModel.DataAnnotations;
namespace JobsMedical.Web.Models;
/// <summary>
/// A verification document an employer uploads for their facility (license, permit, ID…).
/// Stored as bytes in the DB so it survives deploys via the existing Postgres volume/backups
/// (no separate file volume to mount). Only the facility owner and admins can read it back.
/// </summary>
public class FacilityDocument
{
public int Id { get; set; }
public int FacilityId { get; set; }
public Facility Facility { get; set; } = null!;
[MaxLength(200)] public string FileName { get; set; } = "";
[MaxLength(120)] public string ContentType { get; set; } = "application/octet-stream";
public long Size { get; set; }
/// <summary>Raw file bytes (images/PDF). Capped at the upload handler (a few MB).</summary>
public byte[] Data { get; set; } = Array.Empty<byte>();
public DateTime UploadedAt { get; set; } = DateTime.UtcNow;
}