[Verify+Complaints] Facility document review + facility complaints; card location line
Card: move location to its own line above the date in the shift card (job card already did). Verification workflow: employers upload documents (license/permit) on a new Employer/Verify page; uploading marks the facility Pending. Admins see pending facilities with their documents on Admin/Facilities, can download each doc, and approve (تأیید شد) or reject with a reason. Documents stored as bytea in the DB (survives deploys via the existing volume); served only to the owner or an admin via /facility-doc/{id}. Facility model gains Verification status enum + note + requested-at; IsVerified kept in sync. Complaints: registered users/visitors can file a شکایت about a facility from shift/job detail pages (targets ReportTargetType.Facility, surfaces in Admin/Reports as مرکز). Migration backfills existing verified facilities to Verified.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user