Files
hermes/WebApp/DTOs/EventSummaryDto.cs
eee4 efb71b24d3 fix: offload building DTOs to GUHF
DTO building allows for fully returning correct event's
skills and registrations
2025-06-01 20:33:58 +02:00

20 lines
710 B
C#

using System.ComponentModel.DataAnnotations;
using WebApp.Entities;
namespace WebApp.DTOs;
// Output values in JSON file
public record class EventSummaryDto {
public int EventId { get; set; }
[Required] public string Organisation { get; set; }
[Required] public int OrganisationId { get; set; }
[Required] [StringLength(50)] public string Title { get; set; }
[StringLength(500)] public string Description { get; set; }
[Required] [StringLength(100)] public string Location { get; set; }
[Required] public DateTime? EventDate { get; set; }
public ICollection<EventSkill> EventSkills { get; set; }
public ICollection<EventRegistration> EventRegistrations { get; set; }
};