using SolutionErp.Domain.Common;

namespace SolutionErp.Domain.Contracts;

public enum AttachmentPurpose
{
    DraftExport = 1,     // File render từ template (.docx/.xlsx) ở phase DangSoanThao
    ScannedSigned = 2,   // Scan HĐ có chữ ký NCC ở phase DangInKy
    SealedCopy = 3,      // Scan HĐ đã đóng dấu ở phase DangDongDau
    Other = 99,
}

public class ContractAttachment : BaseEntity
{
    public Guid ContractId { get; set; }
    public string FileName { get; set; } = string.Empty;
    public string StoragePath { get; set; } = string.Empty;  // relative path under wwwroot/uploads/
    public long FileSize { get; set; }
    public string ContentType { get; set; } = string.Empty;
    public AttachmentPurpose Purpose { get; set; }
    public string? Note { get; set; }

    public Contract? Contract { get; set; }
}
