using Lada.Framework.Data.Domains.BaseEntities;
using System.ComponentModel.DataAnnotations;

namespace Lada.Framework.Data.Domains.ErrorReports
{
    /// <summary>
    /// Entity lưu trữ hình ảnh báo lỗi
    /// </summary>
    public class ErrorReportMedia : BaseEntityWithKey<int>
    {
        /// <summary>
        /// ID báo lỗi
        /// </summary>
        public int ErrorReportId { get; set; }

        /// <summary>
        /// Đường dẫn vật lý trên server
        /// Ex: C:\user\admin\websites\images\error-reports\abc.jpg
        /// </summary>
        [MaxLength(2500)]
        public string SystemPath { get; set; } = string.Empty;

        /// <summary>
        /// Tên file gốc
        /// </summary>
        [MaxLength(255)]
        public string OriginalFileName { get; set; } = string.Empty;

        /// <summary>
        /// Kích thước file (bytes)
        /// </summary>
        public long FileSize { get; set; }

        /// <summary>
        /// Loại file (image/jpeg, image/png, etc.)
        /// </summary>
        [MaxLength(100)]
        public string ContentType { get; set; } = string.Empty;

        /// <summary>
        /// Mô tả hình ảnh
        /// </summary>
        [MaxLength(500)]
        public string Description { get; set; } = string.Empty;

        /// <summary>
        /// Thứ tự hiển thị
        /// </summary>
        public int DisplayOrder { get; set; }

        /// <summary>
        /// Navigation property
        /// </summary>
        public virtual ErrorReport ErrorReport { get; set; }
    }
}
