using SolutionErp.Domain.Common;

namespace SolutionErp.Domain.Hrm;

// Satellite — File scan CCCD/Bằng/Chứng chỉ/HĐLĐ (NamGroup `CT_TAILIEU`).
// FK Cascade từ EmployeeProfile.
//
// File lưu local storage qua IFileStorage (mirror PurchaseEvaluationAttachment
// + ContractAttachment pattern). FilePath relative root storage dir.
public class EmployeeDocument : AuditableEntity
{
    public Guid EmployeeProfileId { get; set; }

    public EmployeeDocumentType DocumentType { get; set; }

    public string FileName { get; set; } = string.Empty;   // Tên file gốc khi upload
    public string FilePath { get; set; } = string.Empty;   // Relative path trong storage
    public long FileSize { get; set; }                     // Byte
    public string ContentType { get; set; } = string.Empty; // MIME (vd "application/pdf")

    public DateOnly? IssueDate { get; set; }               // Ngày cấp
    public DateOnly? ExpiryDate { get; set; }              // Ngày hết hạn
    public string? Notes { get; set; }

    public EmployeeProfile? EmployeeProfile { get; set; }
}
