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

namespace TakeoutSaaS.Domain.Products.Entities;

/// <summary>
/// 加料/做法分组。
/// </summary>
public sealed class ProductAddonGroup : MultiTenantEntityBase
{
    /// <summary>
    /// 所属商品。
    /// </summary>
    public long ProductId { get; set; }

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

    /// <summary>
    /// 选择类型。
    /// </summary>
    public AddonSelectionType SelectionType { get; set; } = AddonSelectionType.Single;

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

    /// <summary>
    /// 最大选择数量。
    /// </summary>
    public int? MaxSelect { get; set; }

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

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