using System.ComponentModel.DataAnnotations;

namespace DramaLing.Api.Models.Entities;

public class ExampleImage
{
    public Guid Id { get; set; }

    [Required]
    [MaxLength(500)]
    public string RelativePath { get; set; } = string.Empty;

    [MaxLength(200)]
    public string? AltText { get; set; }

    // 兩階段生成相關欄位
    public string? GeminiPrompt { get; set; }
    public string? GeminiDescription { get; set; }
    public string? ReplicatePrompt { get; set; }

    [MaxLength(100)]
    public string? ReplicateModel { get; set; }

    [MaxLength(100)]
    public string? ReplicateVersion { get; set; }

    // 生成成本追蹤
    public decimal? GeminiCost { get; set; }
    public decimal? ReplicateCost { get; set; }
    public decimal? TotalGenerationCost { get; set; }

    // 圖片屬性
    public int? FileSize { get; set; }
    public int? ImageWidth { get; set; }
    public int? ImageHeight { get; set; }

    [MaxLength(64)]
    public string? ContentHash { get; set; }

    [Range(0.0, 1.0)]
    public decimal? QualityScore { get; set; }

    [MaxLength(20)]
    public string ModerationStatus { get; set; } = "pending";

    public string? ModerationNotes { get; set; }

    public int AccessCount { get; set; } = 0;

    public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
    public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;

    // Navigation Properties
    public virtual ICollection<FlashcardExampleImage> FlashcardExampleImages { get; set; } = new List<FlashcardExampleImage>();
}