initial commit
This commit is contained in:
57
backend/API/DTOs/Materials/MaterialModifierDtos.cs
Normal file
57
backend/API/DTOs/Materials/MaterialModifierDtos.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Extrudex.API.DTOs.Materials;
|
||||
|
||||
/// <summary>
|
||||
/// Response DTO for MaterialModifier entity.
|
||||
/// </summary>
|
||||
public class MaterialModifierResponse
|
||||
{
|
||||
/// <summary>Unique identifier for the modifier.</summary>
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>Human-readable name (e.g., "Carbon Fiber", "Wood Fill").</summary>
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>Foreign key to the parent MaterialBase.</summary>
|
||||
public Guid MaterialBaseId { get; set; }
|
||||
|
||||
/// <summary>Name of the parent material base (for display).</summary>
|
||||
public string MaterialBaseName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>Timestamp when this record was created (UTC).</summary>
|
||||
public DateTime CreatedAt { get; set; }
|
||||
|
||||
/// <summary>Timestamp when this record was last updated (UTC).</summary>
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Request DTO for creating a new MaterialModifier.
|
||||
/// </summary>
|
||||
public class CreateMaterialModifierRequest
|
||||
{
|
||||
/// <summary>Human-readable name (e.g., "Carbon Fiber", "Wood Fill"). Required, max 50 characters.</summary>
|
||||
[Required(ErrorMessage = "Name is required.")]
|
||||
[StringLength(50, MinimumLength = 1, ErrorMessage = "Name must be between 1 and 50 characters.")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>Foreign key to the parent MaterialBase. Required.</summary>
|
||||
[Required(ErrorMessage = "MaterialBaseId is required.")]
|
||||
public Guid MaterialBaseId { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Request DTO for updating an existing MaterialModifier.
|
||||
/// </summary>
|
||||
public class UpdateMaterialModifierRequest
|
||||
{
|
||||
/// <summary>Human-readable name (e.g., "Carbon Fiber", "Wood Fill"). Required, max 50 characters.</summary>
|
||||
[Required(ErrorMessage = "Name is required.")]
|
||||
[StringLength(50, MinimumLength = 1, ErrorMessage = "Name must be between 1 and 50 characters.")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>Foreign key to the parent MaterialBase. Required.</summary>
|
||||
[Required(ErrorMessage = "MaterialBaseId is required.")]
|
||||
public Guid MaterialBaseId { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user