using Microsoft.AspNetCore.Http;

namespace FutureMailAPI.DTOs
{
    public class FileUploadDto
    {
        public string FileName { get; set; } = string.Empty;
        public string ContentType { get; set; } = string.Empty;
        public long FileSize { get; set; }
        public string FilePath { get; set; } = string.Empty;
        public string FileUrl { get; set; } = string.Empty;
        public string ThumbnailUrl { get; set; } = string.Empty;
        public AttachmentType Type { get; set; }
    }
    
    public class FileUploadRequestDto
    {
        public AttachmentType Type { get; set; }
        public string? Category { get; set; } // 分类：avatar, attachment等
    }
    
    public class FileUploadWithFileRequestDto : FileUploadRequestDto
    {
        public IFormFile File { get; set; } = null!;
    }
    
    public class FileUploadResponseDto
    {
        public string FileId { get; set; } = string.Empty;
        public string FileName { get; set; } = string.Empty;
        public string FileUrl { get; set; } = string.Empty;
        public string ThumbnailUrl { get; set; } = string.Empty;
        public long FileSize { get; set; }
        public string ContentType { get; set; } = string.Empty;
        public AttachmentType Type { get; set; }
        public DateTime UploadedAt { get; set; }
    }
    
    public enum AttachmentType
    {
        IMAGE,
        VOICE,
        VIDEO,
        DOCUMENT,
        OTHER
    }
}