using System.ComponentModel.DataAnnotations;
namespace JobsMedical.Web.Models;
///
/// 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.
///
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; }
/// Raw file bytes (images/PDF). Capped at the upload handler (a few MB).
public byte[] Data { get; set; } = Array.Empty();
public DateTime UploadedAt { get; set; } = DateTime.UtcNow;
}