using System.ComponentModel.DataAnnotations;
using ERPCore.Domain.Enums;

namespace ERPCore.Dtos.Brands;

/// <summary>Brand resource (docs/11-BACKEND-PHASE1.md §2.6).</summary>
public sealed record BrandDto(
    int BrandId, string Name, EntityStatus Status, DateTime CreatedAt, DateTime? UpdatedAt);

// Request DTOs — narrow: server-controlled fields (status, ids, timestamps)
// are intentionally excluded to prevent over-posting (02-SECURITY B.6 / C.1). ----

public sealed class CreateBrandRequest
{
    [Required, StringLength(200)] public string Name { get; set; } = string.Empty;
}

public sealed class UpdateBrandRequest
{
    [Required, StringLength(200)] public string Name { get; set; } = string.Empty;
}

public sealed class UpdateBrandStatusRequest
{
    [Required, EnumDataType(typeof(EntityStatus))] public EntityStatus Status { get; set; }
}
