using TakeoutSaaS.Domain.Products.Enums;
using TakeoutSaaS.Shared.Abstractions.Entities;

namespace TakeoutSaaS.Domain.Products.Entities;

/// <summary>
/// 门店规格做法模板。
/// </summary>
public sealed class ProductSpecTemplate : MultiTenantEntityBase
{
    /// <summary>
    /// 所属门店。
    /// </summary>
    public long StoreId { get; set; }

    /// <summary>
    /// 模板名称。
    /// </summary>
    public string Name { get; set; } = string.Empty;

    /// <summary>
    /// 模板描述。
    /// </summary>
    public string Description { get; set; } = string.Empty;

    /// <summary>
    /// 模板类型。
    /// </summary>
    public ProductSpecTemplateType TemplateType { get; set; } = ProductSpecTemplateType.Spec;

    /// <summary>
    /// 选择方式。
    /// </summary>
    public AttributeSelectionType SelectionType { get; set; } = AttributeSelectionType.Single;

    /// <summary>
    /// 是否必选。
    /// </summary>
    public bool IsRequired { get; set; } = true;

    /// <summary>
    /// 最小可选数。
    /// </summary>
    public int MinSelect { get; set; }

    /// <summary>
    /// 最大可选数。
    /// </summary>
    public int MaxSelect { get; set; } = 1;

    /// <summary>
    /// 排序值。
    /// </summary>
    public int SortOrder { get; set; } = 100;

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