| | | 1 | | using System.ComponentModel.DataAnnotations; |
| | | 2 | | |
| | | 3 | | namespace ClutterStock.Contracts.Items; |
| | | 4 | | |
| | | 5 | | /// <summary>Request body for creating an item.</summary> |
| | | 6 | | /// <param name="RoomId" example="1">Id of the room this item belongs to.</param> |
| | | 7 | | /// <param name="Name" example="Vintage Lamp">Display name of the item.</param> |
| | | 8 | | /// <param name="Description" example="Brass table lamp, 1980s">Optional longer description.</param> |
| | | 9 | | /// <param name="Category" example="Electronics">Optional category (e.g. Electronics, Furniture).</param> |
| | | 10 | | /// <param name="Notes" example="Needs new shade">Optional free-form notes.</param> |
| | 17 | 11 | | public record AddItemRequest( |
| | 17 | 12 | | [property: Range(1, int.MaxValue)] int RoomId, |
| | 17 | 13 | | [property: Required, StringLength(200, MinimumLength = 1)] string Name, |
| | 17 | 14 | | [property: StringLength(2000)] string? Description, |
| | 17 | 15 | | [property: StringLength(100)] string? Category, |
| | 17 | 16 | | [property: StringLength(2000)] string? Notes); |