using SqlSugar;
using Volo.Abp.Domain.Entities;
using Yi.Framework.AiHub.Domain.Shared.Enums;
using Yi.Framework.Core.Data;

namespace Yi.Framework.AiHub.Domain.Entities.Model;

/// <summary>
/// ai模型定义
/// </summary>
[SugarTable("Ai_Model")]
public class AiModelEntity : Entity<Guid>, IOrderNum, ISoftDelete
{
    /// <summary>
    /// 处理名
    /// </summary>
    public string HandlerName { get; set; }

    /// <summary>
    /// 模型id
    /// </summary>
    public string ModelId { get; set; }

    /// <summary>
    /// 模型名称
    /// </summary>
    public string Name { get; set; }

    /// <summary>
    /// 模型描述
    /// </summary>
    public string? Description { get; set; }

    /// <summary>
    /// 排序
    /// </summary>
    public int OrderNum { get; set; }

    /// <summary>
    /// 软删除
    /// </summary>
    public bool IsDeleted { get; set; }

    /// <summary>
    /// ai应用id
    /// </summary>
    public Guid AiAppId { get; set; }

    /// <summary>
    /// 额外信息
    /// </summary>
    public string? ExtraInfo { get; set; }

    /// <summary>
    /// 模型类型(聊天/图片等)
    /// </summary>
    public ModelTypeEnum ModelType { get; set; }

    /// <summary>
    /// 模型Api类型，现支持同一个模型id，多种接口格式
    /// </summary>
    public ModelApiTypeEnum ModelApiType { get; set; }

    /// <summary>
    /// 模型倍率
    /// </summary>
    public decimal Multiplier { get; set; } = 1;
    
    /// <summary>
    /// 模型显示倍率
    /// </summary>
    public decimal MultiplierShow { get; set; } = 1;

    /// <summary>
    /// 供应商分组名称(如：OpenAI、Anthropic、Google等)
    /// </summary>
    public string? ProviderName { get; set; }

    /// <summary>
    /// 模型图标URL
    /// </summary>
    public string? IconUrl { get; set; }

    /// <summary>
    /// 是否为尊享模型
    /// </summary>
    public bool IsPremium { get; set; }

    /// <summary>
    /// 是否启用
    /// </summary>
    public bool IsEnabled { get; set; } = true;
}